The following table gives the various forms of the option directive and shows examples of each.
| Syntax | Example |
|---|---|
| option option_list | option lang(digraph, no),
incl(searchPath, "."),
opt(size)
This example lists three options but does not apply them to any directives. Nor does it define a group for use later. The syntax is valid, but VisualAge C++ outputs a warning that the directive has no effect. |
| option option_group = option_list | option targetopts =
link(linkWithSharedLib),
link(linkwithmulitthreadlib)
This example creates an option group named targetopts and assigns two link options to the group. The group can be used in subsequent directives. |
| option option_list directive_block | option
lang(noKeyword, "true"),
lang(noKeyword, "false") {
source "a.cpp", "b.cpp"
}
This example applies two language options to the source files a.cpp and b.cpp. |
| option option_group = option_list directive_block | option hd = macros(global) {
source "a.hpp", "b.hpp"
}
This example creates a group named hd and assigns the option macros(global) to the group. The option group is applied to source files a.hpp and b.hpp. |
| option option_group = null | option headers = null This example creates an empty group named headers. This directive on its own has no effect, but constructs like this may be useful in if directives. |
| option null | option null This directive has no effect. |
![]()
Configuration Files
How Configuration Files Are
Processed
![]()
Configuration File Directives
Build Options
