views:

41

answers:

2

I have got several projects in my workspace. I have a script which set a different environment for each project. How can i get Eclipse CDT to use this script to set up the environment instead of setting everything by hand for each project?

Thanks.

A: 

Eclipse CDT Properties for the C/C++ Build has an "Environment" page. You can set variables in this (per project) and either replace or append the native environment.

Right click your project and choose Properties Expand the C/C++ Build item and choose Environment. From there you can modify the properties page.

Unless you have something complicated in your script, this could replace the need for a script altogether. Check out the other settings in the properties page - these might help you to customize each project as you need.

twokats
I know, but there IS something complicated in my script. So i cannot setup the environment by hand.
Dape
Without anymore details on what "complicated" means, I'm not sure what else to suggest. You might try to replace your build command with a script that calls your script and then the build command.
twokats
A: 

You can translate your script into java, then develop a plug-in to call the API of CDT to apply the environment.

Kane