Thanks - that got me part of the way there and then<br><br>set(CMAKE_C_LINK_EXECUTABLE &quot;${PURIFYCOMMAND} ${CMAKE_C_LINK_EXECUTABLE}&quot;)<br><br>for the link step.<br><br>thanks again<br>b.<br><br><div class="gmail_quote">
On Fri, Feb 6, 2009 at 4:09 PM, Naram Qashat <span dir="ltr">&lt;<a href="mailto:cyberbotx@cyberbotx.com">cyberbotx@cyberbotx.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">Bill O&#39;Hara wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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>
</blockquote>
<br></div></div>
What you could do instead is set CMAKE_C_COMPILE_OBJECT, like so:<br>
<br>
set(CMAKE_C_COMPILE_OBJECT &quot;${PURIFYCOMMAND} ${CMAKE_C_COMPILE_OBJECT}&quot;)<br>
<br>
That&#39;ll modify the command used to compile by prefixing it.<br><font color="#888888">
<br>
Naram Qashat<br>
</font></blockquote></div><br>