[CMake] Need to prepend compiler with static analysis tool

Bill Hoffman bill.hoffman at kitware.com
Thu May 24 09:42:45 EDT 2012


On 5/23/2012 5:55 PM, Oliver Smith wrote:
> On 5/23/2012 4:45 PM, jrosensw wrote:
>> Hi Alexander,
>>
>> I tried this already. However I'm not sure what a "clean build tree"
>> means. Maybe thats my problems. All I did was this:
>>
>> CXX="<path>/insure<path>/g++" cmake .
>>
>> But when I compiled I did not see a change. How do I get my tree to a
>> "clean state"? Other than running "make clean" which I did do.
>>
> rm -rf CMakeCache* CMakeFiles*
>
> - Oliver
>

One other option is to use the link rule variables.

Something like this:

project (foo)

set (CMAKE_CXX_LINK_EXECUTABLE
     "/usr/bin/insure ${CMAKE_CXX_LINK_EXECUTABLE}")
add_executable (foo foo.cxx)

-Bill



More information about the CMake mailing list