Configuration File

Configuration files (ctc.ini) store compiler-specific settings, a link to the license used settings from the user.

The file starts with license settings, followed by general settings for all compilers. After that, several specific command blocks for compiler families follow. These generic elements are used:
  • Comments, starting with an #
  • Beginning of command blocks, with the name given in squared brackets
  • Settings with the structure PARAMETER = value
  • Environment variables starting with $, for example $CTCHOME

Exemplary Extract from ctc.ini

# Global (applicable on all supported compilers) default definitions:
# (In a single compiler-specific definition block these may be overridden)
#
WARNING_LEVEL = warn
TIMER = clock
TICK  = 1
EXECUTION_COST_TYPE = Clock ticks

#
# Compiler-specific definitions:
#

[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%
  RUN_BEFORE_ALL  =
  RUN_AFTER_CPP   =
  RUN_AFTER_INSTR =
  RUN_AFTER_COMP  =

Command blocks

The term "command" refers to compilers and linkers, e.g. cl, link, gcc, ld, armcc, armlink. A command is the entity that the preprocessor ctc works with when called:
ctc options-to-ctc command options-and-arguments-to-command

ctc needs to know what the command does (compile only, both compile and link, or link only) and what options it has (e.g. /Foobjectfile, -oobjectfile).

For a specific command, all settings from the corresponding blocks are used. The command blocks are identified by the name of the first block found for this command.

Testwell CTC++ is preconfigured for many compilers from start, and Verifysoft provides additional settings for several cross compilers.