Configuration of Instrumented Compiler and Linker Calls
For setting up the managed build system of Eclipse to use Testwell CTC++, it is recommended to create a special configuration for a project, using the release configuration as a basis.
Setting up the Compiler
Per default, the command line pattern for compiling C-Files is defined as:
${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}
To introduce instrumentation, a call to the preprocessor ctc together with its instrumentation options needs to be prepended to the original pattern.
ctc [ctc options] ${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}
Setting up the Linker
In contrast to the compiler settings, the linker settings are always tied to a project resource. The runtime library of Testwell CTC++ has to be included into the linking stage. The default configuration has the command line pattern for link object files defined as:
${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}
And this can be prepended by a ctc call with:
ctc ${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}