In the configuration file, put the character $ at the beginning of the names of environment variables. For example, the if directive in the following line tests whether an environment variable named TEST has been defined:
if defined($TEST) { /* ... */}
The value and type of environment variables are set by the environment and cannot be changed within the configuration file. You can use your own environment variables, those that are predefined by VisualAge C++, or any that are set by other processes. Use the operating system to define your own environment variables before starting the build.
Environment variables can appear in expressions or in directives where string values are expected. You can test whether they are defined and use them in a conditional expression to control the logic of the configuration file. For example, the following if directive sets options only when an environment variable named OS2 is set:
if $OS2 {
option generalopt = incl(searchPath, ".")
option targetops = link(linkWithMultiThreadLib), opt(size)
}
![]()
Configuration Files
How Configuration Files Are
Processed
Application
Run-Time Environment Variables
Conditional
Processing in Builds
![]()
Change a Build Setup
Build
Set OS/2 Environment
Variables
Set Windows
Environment Variables
![]()
Build Options
Variables in Configuration Files
Predefined Build Environment Variabless
