On 10/14/2010 7:11 PM, Ben Boeckel wrote:
[email protected]<[email protected]> wrote:
Something like this is probably better (crudely adapted from something
like this for test executables from here[1]):
macro (purify exename)
add_custom_target(purify-${exename})
add_custom_command(
TARGET purify-${exename}
COMMAND purify
${purify_arguments}
${EXECUTABLE_OUTPUT_PATH}/${exename}
${ARGN}
WORKING_DIRECTORY
${CMAKE_BINARY_DIR}
COMMENT "Running purify on \"${exename}\"")
add_dependencies(purify-${exename}
${exename})
endmacro (purify)
[1]http://git.benboeckel.net/?p=chasmd.git;a=blob;f=cmake/test.cmake
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
Running this:
purify foo
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)
-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