Creating Conditional Build Settings

You can create a set of build-setting macros that Project Builder uses only when a specified condition is true. For example, you could specify that when the target is being installed, Project Builder should use the highest level of optimization and warning.

These conditional macro settings are appended to the end of the global macro settings. For example, if the global setting of WARNING_CFLAGS is -Wunused and a conditional setting is -Wtrigraphs, then the value of WARNING_CFLAGS if the condition is true is -Wunused -Wtrigraphs.

To add a new set of conditional settings:

  1. Click the Targets tab, select the target's name, and click the Build Settings tab.
  2. In the Build Flags section, choose "Add new conditional settings" from the Condition menu, and enter the new condition.
    The condition must use Jam syntax and can contain other build macros. For example, to specify that the macros should be used when the target is installed, use $(ACTION) in install.

To edit the macros in a conditional set:

  1. Click the Targets tab, select the target's name, and click the Build Settings tab.
  2. In the Build Flags section, choose the condition from the Condition menu, and edit the macros in the list below.

Related Topics

Build Variables