Philip Lowman schrieb:
How about GET_TARGET_PROPERTY(var MyTarget DEBUG_LOCATION) followed by a second ADD_CUSTOM_COMMAND() for the debug binary?

Ok, found the solution: Latest CMake (2.5 nightly, tested with the binary from March 1) supports COMMAND with a normal target in ADD_CUSTOM_COMMAND, so I can pass MyTarget to it, which gets filled with the right value.

ADD_EXECUTABLE(Test ${TEST_SOURCES})

SET_TARGET_PROPERTIES(Test PROPERTIES DEBUG_POSTFIX "d")

ADD_CUSTOM_COMMAND(
        TARGET Test
        POST_BUILD
        COMMAND Test
 )

works fine.

Cheers,
  Anteru

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to