Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: mandrav on July 14, 2005, 01:57:12 pm

Title: Custom/environment variables
Post by: mandrav on July 14, 2005, 01:57:12 pm
Custom/environment variables can now be defined per-compiler, per-project and per-target.
The changes are in CVS.

After you build C::B once, change custom variables WX_DIR and WX_CFG in project build options to point to your wxWidgets dir.

Yiannis.
Title: Custom/environment variables
Post by: David Perfors on July 14, 2005, 05:35:13 pm
I can see now that it is possible to use variables, so I set the global compiler variables and project specific variables. (WX_DIR and WX_CFG for example)
Which variable will have the highest priority?
Title: Custom/environment variables
Post by: mandrav on July 14, 2005, 05:54:39 pm
Quote
Which variable will have the highest priority?

They 're applied in this order: Global -> Project -> Target
so if you set the same variable in global vars and in target vars, target's will be the one last set.

Yiannis.
Title: Custom/environment variables
Post by: darklordsatan on July 14, 2005, 05:56:44 pm
This is just awesome mandrav, will you ever stop?  :D
Now if it works correctly, I think this is a helluva feature

Cheers
Title: Custom/environment variables
Post by: tiwag on July 14, 2005, 06:10:51 pm
THANKS Yiannis !

really a great feature !!!

THANKS THANKS THANKS
Title: Custom/environment variables
Post by: rickg22 on July 14, 2005, 06:28:20 pm
Yiannis, when you say "in CVS", you mean in BOTH branches, right? (crosses fingers  :? )

Also, I suppose these variables are stored in a SEPARATE file, so the .cbp remains unchanged (otherwise, we'd see about 1,000 CVS commits of codeblocks.cbp :lol: )
Title: Custom/environment variables
Post by: mandrav on July 14, 2005, 06:42:55 pm
Quote from: rickg22
Yiannis, when you say "in CVS", you mean in BOTH branches, right? (crosses fingers  :? )

Cross them all you want ;)
Yes, both branches.
Quote from: rickg22
Also, I suppose these variables are stored in a SEPARATE file, so the .cbp remains unchanged (otherwise, we'd see about 1,000 CVS commits of codeblocks.cbp :lol: )

The global (per-compiler) vars are stored in the global C::B configuration (registry for win32).
The per-project and per-target are kept in the project file of course.

Yiannis.
Title: Custom/environment variables
Post by: rickg22 on July 14, 2005, 09:00:19 pm
Okay! :) I was just trying to figure out how this would make possible the building of both branches of codeblocks with the same global setup.
Title: Custom/environment variables
Post by: David Perfors on July 14, 2005, 09:31:53 pm
Quote from: mandrav
Quote
Which variable will have the highest priority?

They 're applied in this order: Global -> Project -> Target
so if you set the same variable in global vars and in target vars, target's will be the one last set.

It is strange that the Global variables are not overridden by the Project variables :roll:
I tried to compile codeblocks with the cvs projectfile (including WX_DIR var with a path that doesn't excist on my system) It couldn't compile, because the wx/ headers couldn't be found.
I added WX_DIR and WX_CFG to the Global variables and it worked...