[CMake] set_target_properties not setting COMPILE_DEFINITIONS?

Yuri Timenkov yuri at timenkov.ru
Mon Mar 28 14:39:49 EDT 2011


Then it can be a problem with mixing spaces and semicolons. Look at
command-line with make VERBOSE=1, this may give you some clues.

On Mar 28, 2011 10:31 PM, "David Doria" <daviddoria at gmail.com> wrote:
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110328/975e02bb/attachment.htm>


More information about the CMake mailing list