[CMake] set_target_properties not setting COMPILE_DEFINITIONS?
David Doria
daviddoria at gmail.com
Mon Mar 28 14:59:56 EDT 2011
> No, the semicolons are removed by message() itself, you'll still see
> them if you enclose the ${} inside the quotes:
>
> message( "DEFS: ${MAIN_BUILD_DEFINITIONS}" )
You're right - the output now contains the semicolons. I tried
enclosing the variable in quotes in the set_target_properties line as
well but the definitions are still undefined as far as the compiler is
concerned.
set_target_properties(ImageCompleter1f PROPERTIES COMPILE_DEFINITIONS
"${my_definitions}")
Here is the output of make VERBOSE=1
http://pastebin.com/zXaj9kWS
You can see that none of these are defined even though:
set(my_definitions "UNIX;USE_ITK;USE_FLOAT_PIXELS;PIXEL_DIMENSION=1")
message("my definitions: ${my_definitions}")
set_target_properties(ImageCompleter1f PROPERTIES COMPILE_DEFINITIONS
"${my_definitions}")
displays them correctly.
Thoughts?
David
More information about the CMake
mailing list