Difference between revisions of "Per-project variables"
From Code::Blocks
(Created page with "Category:User Documentation In addition to global variables, Code::Blocks supports usage of variables whose definition is stored within a projec...") |
m (Added "See also".) |
||
Line 5: | Line 5: | ||
''Note: all [[Global compiler variables#Constraints|global variable constraints]] apply to per-project variables as well.'' | ''Note: all [[Global compiler variables#Constraints|global variable constraints]] apply to per-project variables as well.'' | ||
+ | |||
+ | == See also == | ||
+ | * [[Variable expansion#List of available builtins|List of predefined variables]] |
Revision as of 14:39, 24 September 2011
In addition to global variables, Code::Blocks supports usage of variables whose definition is stored within a project. To create a project variable, open Project->Build options...->Custom variables (tab). From the tree selection on the left-hand side, Code::Blocks offers the option of having the variable defined for the entire project, or per build target.
The center box contains a list of all currently defined project variables (this is often empty). Any variable defined here is accessible through $(variable). It is often useful to use project variables to manage filename pre/post-fixes, as it enables all occurrences to be changed simultaneously.
Note: all global variable constraints apply to per-project variables as well.