[CMake] add_definitions() bug?

Marcel Loose loose at astron.nl
Thu May 28 03:55:33 EDT 2009


Hi all,

I ran into this while trying to compile a few assembly sources (see
thread: Problem with ASM and COMPILE_DEFINITIONS).

Definitions added using add_definitions() with a quoted string
containing more than one argument are NOT discarded by CMake
when /usr/bin/as is called. For example, when using: 

  add_defintions("-DMYDEF -DMYOTHERDEF")

these definitions remain as arguments to /usr/bin/as.

However, when supplying only a single argument, quotes don't seem to
matter. Also, when removing the quotes on the multiple arguments above,
CMake properly discards these preprocessor variables when
invoking /usr/bin/as.

Is this a bug in add_definitions?

Best regards,
Marcel Loose.



More information about the CMake mailing list