PREPROC_CXX

With PREPROC_CXX, the invocation of the preprocessing stage is specified for C++ files.

Example 1 (Microsoft cl):
PREPROC_CXX = %COMMAND% /E /nologo /D__CTC__ %FLAGS% %FILE% > %RESULT%
Example 2 (gcc):
PREPROC_CXX = %COMMAND% -E -D__CTC__ %FLAGS% %FILE% -o %RESULT%

Pattern

%COMMAND% is the compilation or linking command from the ctc call, followed by the option to preprocess a source file.

%FLAGS% will contain all necessary options from the original compilation command needed for preprocessing.

%FILE% is the name of the original source file. %RESULT% is a ctc-generated temporary file name for the preprocessed version of the source file.

Adding the __CTC__ macro is a useful convention. It allows to use #ifdef __CTC__ … #endif sections in original source code, being effective only for instrumentation.

If the compiler supports an option like -o to specify the %RESULT% file, this method should be preferred.