On Mon, Mar 28, 2011 at 2:31 PM, David Doria <[email protected]> wrote:
> On Mon, Mar 28, 2011 at 2:28 PM, Yuri Timenkov <[email protected]> wrote:
>> Try prefixing definitions with -D
>
> I changed to:
> SET(MAIN_BUILD_DEFINITIONS "${MAIN_BUILD_DEFINITIONS} -DUNIX;")
> SET(MAIN_BUILD_DEFINITIONS "${MAIN_BUILD_DEFINITIONS} -DPIXEL_DIMENSION=3;")
>
> and I get:
>
> <command-line>: error: macro names must be identifiers
>
> I think you don't have to add -D when you set COMPILE_DEFINITIONS, but
> you do if you set COMPILE_FLAGS.
>
> David
>
Hm, I noticed that if I do this:
set(my_definitions "UNIX;USE_ITK;USE_FLOAT_PIXELS;")
message("my definitions: " ${my_definitions})
the output is:
UNIXUSE_ITKUSE_FLOAT_PIXELS
but If I put spaces after the semicolons:
set(my_definitions "UNIX; USE_ITK; USE_FLOAT_PIXELS;")
the output is:
UNIX USE_ITK USE_FLOAT_PIXELS
In neither case are the semicolons preserved, which seems bad because
the set_target_properties call expects a semicolon separated list of
preprocessor definitions. Why are these semicolons being removed? They
are in a string (" "), right?
David
_______________________________________________
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