In my top-level CMakeLists.txt I&#39;m trying to fiddle with the CMAKE_C_COMPILER when certain CMAKE_BUILD_TYPEs are set. In particular if the build type is purify then I&#39;m trying to do this:<br><br>set(CMAKE_C_COMPILER &quot;${PURIFYCOMMAND} ${CMAKE_C_COMPILER}&quot;)<br>
<br>The problem is that the resulting attempt to compile breaks because /bin/sh is fed <br><br>&quot;/path/to/my/purify /path/to/my/gcc&quot; hello.c<br><br>complete with quote characters.. and sh promptly complains it can&#39;t find any such command. <br>
<br>Is this just a daft way to try to do this? Is there a recommended way to extend the compiler command itself (rather than flags to the compiler)?<br><br>b.<br><br>