[CMake] Syntax of set_target_properties

Alexander Neundorf a.neundorf-work at gmx.net
Mon Nov 20 06:41:47 EST 2006


Von: "Sylvain Benner" <benner at virtools.com>

> Have you tried this ?
> 
> set_target_properties( test PROPERTIES
>                        COMPILE_FLAGS -DTEST -DDIR="./" )
> 
> Just an idea, I'm not sure it will work.

I think this should work.
set_target_properties( test PROPERTIES
                       COMPILE_FLAGS -DTEST 
                       COMPILE_FLAGS -DDIR="./" )

basically does

target("test").compileFlags="-DTEST";
target("test").compileFlags="-DDIR=\"./\"";

So if you want to append, you probably should use GET_TARGET_PROPERTIES() first followed by SET_TARGET_PROPERTIES().

Bye
Alex





-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer


More information about the CMake mailing list