Hierarchy of Configuration Files and Command Blocks

Configurations files are looked up from several locations, and determine the settings in a certain order.

Configuration Files

All configuration files found in the following locations are used by Testwell CTC++:

  • Windows
    1. ctc.ini in the Testwell CTC++ home directory (environment variable CTCHOME).
    2. Files specified by the environment variable CTCINIT.
    3. ctc.ini in the current directory.
    4. Configuration files explicitly specified in the command line by the -c option. Multiple files are separated by a semicolon, and they are read in the given order.
  • Linux/ Unix
    1. /usr/local/lib/ctc/ctc.ini
    2. lib/ctc/ctc.ini in the user's home directory.
    3. ctc.ini in the Testwell CTC++ home directory (environment variable CTCHOME).
    4. File .ctc.ini in the user's home directory.
    5. Files specified by the environment variable CTCINIT.
    6. .ctc.ini in the current directory.
    7. Configuration files explicitly specified in the command line by the -c option. Multiple files are separated by a semicolon, and they are read in the given order.

Remark: Some cross compiler add-ons from Verifysoft, e.g. for keil, use the command line option to add a compiler specific configuration file in the background (ctc-keil.ini in this example).

All configuration files found are used, hence it is recommended not to use more of these locations than necessary. The -V option from ctc or ctcpost shows which configurations files are used. The settings from the latter files are appended to former settings, or replace them.

Command Blocks

In a command block like
[Microsoft Visual C++]
  #VC++ 6.0 compliant at least...
  COMMAND = cl
  # Intel compiler
  COMMAND + icl
  TYPE    = compiler_linker
  PREPROC_C   = %COMMAND% /E /nologo /D__CTC__ %FLAGS% %FILE% > %RESULT%
  PREPROC_CXX = %COMMAND% /E /nologo /D__CTC__ %FLAGS% %FILE% > %RESULT%
  ...
the options for one or more compiler/ linker (the command) are defined. The parameter "COMMAND" is the determining item in this block.

When processing the settings inside some command block, the configuration parameter adaption applies to the settings seen so far in this command block. If the same command block appears again in another configuration file later, its settings are processed as if they had been at the end of the already processed command block.

To specify additional settings for a compiler or linker command in a second configuration file, it is necessary that the command block has the same name.

After all configuration files have been read, a [command block] has got selected and all adaptions to the configuration parameters from the .ini files have been set, the configuration parameters are possibly further fine-tuned from command line by -C option of ctc.