RAD Studio (Common)
ContentsIndex
PreviousUpNext
Build Configurations Overview

Build configurations consist of options that you can set on all the build-related pages of the ProjectOptions dialog box. Build configurations are saved in the project file (such as .dproj or .cbproj ).

Base, Debug, and Release are the three default build configurations: 

  • Base acts as a base set of option values that is used in all the configurations you subsequently create.
  • The Debug configuration enables optimization and debugging, as well as setting specific syntax options.
  • The Release configuration doesn't produce symbolic debugging information, and the code is not generated for TRACE and ASSERT calls, meaning the size of your executable is reduced.
 

You can change option values in any configuration, including Base. You can delete the Debug and Release configurations, but you cannot delete the Base configuration.

Every project has an active build configuration associated with it, as well as any number of other inactive build configurations that you have created.  

The active build configuration is used in Compile, Build, and Clean commands for the project. Use the Configuration Manager to specify the active configuration for a selected project or project group (choose ProjectConfiguration Manager or double-click the configuration in the Project Manager).

Each configuration, except Base, is based on another configuration from which it inherits its values. The Debug and Release configurations inherit their values from Base.  

You can, in turn, create a new configuration based on any given configuration, and the new configuration inherits its option values from its parent. After creating a configuration, you can change its option values to whatever you want, and you can make it the active configuration for a project or projects. You can also delete any configuration except Base

Unless their values are changed, options inherit the values of their parent configuration. This inheritance is not static: if the parent configuration changes, so do its children for all inherited values. 

The default value of an option is its value in the parent configuration. You can revert an option to its default value.

You can also save a configuration's option values to a file as a named option set using a file save dialog. You can apply an option set to any configuration in any project. You also have the choice to apply an option set by value (applying the option set's values at that one time only) or by reference (so that subsequent changes to the option set are reflected in the configuration) or by value. 

Note that a build configuration is different from an option set, though they are related. Both consist of sets of option values. The main distinction is that configurations are associated with projects, whereas option sets are saved in files independent of projects. Build configuration values are stored in the project file, so saving a project saves changes to configurations, but option sets are unaffected. Changing a project's configurations and adding or deleting configurations does not affect option sets. Similarly, saving option sets does not change configurations.  

Each project has its own list of configurations, independent of other projects. However, you can apply any option set to any project. On the Project Options dialog box, the Build Configuration drop-down list includes all the build configurations for that project — but not option sets. The Project Manager, on the other hand, lists both configurations and referenced option sets under the Build configurations node.

Note that configurations and option sets might not contain values for all possible project options — they contain only the options that are different from the parent configuration. The Base configuration also does not contain values for all possible options.  

If an option value is not in a configuration, the IDE looks in its parent configuration, then the parent's parent configuration, and so on. If not found in any of the configurations in the inheritance chain, the value comes from the appropriate tool that is being configured.  

For instance, if a configuration inheritance chain does not include a value for a particular compiler option, the default value is specified by the compiler itself. When you save a configuration or option set, only its values are saved — not values for every option.

Some options available in previous releases are no longer available, except possibly through the appropriate command line tool's option flags. See Unavailable Options for more information.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!