[CMake] How to use Purify with CMake.
william.crocker at analog.com
william.crocker at analog.com
Fri Oct 15 06:47:59 EDT 2010
>
> Ben, I think the problem is that some versions of purify are run by
> putting purify in front of the final link line. Like this:
>
> purify gcc -o foo foo.o
Yes. This is how it is done on Linux.
The instrumentation takes place a link time.
>
> Running this:
>
> purify foo
I believe this is how it is done on Windows.
The instrumentation is done at run time (less desirable).
>
> Will not work. So, you have to do something like what was suggested.
>
> Another way is something like this:
>
> set (CMAKE_CXX_LINK_EXECUTABLE
> "purify ${CMAKE_CXX_LINK_EXECUTABLE}")
> add_executable (foo foo.cxx)
>
But, does not this permanently change CMAKE_CXX_LINK_EXECUTABLE.
At the least you need to save and restore it.
I tried this first and my feeble attempts to save and
restore CMAKE_CXX_LINK_EXECUTABLE did not work for some strange
reason.
>
> -Bill
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
More information about the CMake
mailing list