william.croc...@analog.com <william.croc...@analog.com> wrote:
> Hello:
> 
> I needed to build a purified version of my test program.
> A search of the mailing list archives produced a number of
> options, but they all had drawbacks.
> 
> I came upon the solution below which seems to work well.
> I introduce a new language "PURIFY" for the purposes
> of linking the purified executable.
> 
> Any comments?
> 
> Bill

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

_______________________________________________
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

Reply via email to