Use ctcwrap for makefiles
With the small example from the basic tutorial, we describe a convenient way how to use Testwell CTC++ with makefiles and ctcwrap.
ctcwrap -i m nmake
Whenever the makefile emits cl
and link
commands, they are
executed as if they were ctc -i m cl
and ctc -i m link
commands. Hence the program source files get instrumented, compiled and linked with Testwell CTC++ using the given instrumentation options. This special
treatment on cl and link commands is in effect
only during the execution of the ctcwrap argument command.
This arrangement does not require that the makefile is written in some special way, for example that the compile and link commands can be redefined. The makefile may also call inner makefiles.
ctcwrap -i d -v mybuildscript.bat
The only requirement for such a usage is that the compile and link commands are emitted using the environment variable PATH, not with an explicit path.