[CMake] Converting a VS Build to CMake/Problems with Post-Build steps, questions

Anteru Anteru at shelter13.net
Mon Mar 3 04:00:27 EST 2008


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



More information about the CMake mailing list