[CMake] set_target_properties not setting COMPILE_DEFINITIONS?

David Doria daviddoria at gmail.com
Mon Mar 28 14:31:46 EDT 2011


On Mon, Mar 28, 2011 at 2:28 PM, Yuri Timenkov <yuri at timenkov.ru> 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


More information about the CMake mailing list