[CMake] Problem with SET_TARGET_PROPERTIES DEFINE_SYMBOL property

Alexander Neundorf a.neundorf-work at gmx.net
Tue Apr 4 02:15:05 EDT 2006


> Von: Dan Mueller <d.mueller at qut.edu.au> 
>  
> Hi cmake users: 
>  
> I am trying to use cmake to define a symbol so that I can use the #if  
> syntax in C++. 
>  
> I have read the documentation for the SET_TARGET_PROPERTIES command and  
> it seems to me that there is a property called DEFINE_SYMBOL which sets  
> "... /a symbol that is defined when compiling C or C++ sources/"  
> (http://www.cmake.org/HTML/Documentation.html). However, when I use 
this  
> property it does *not *define the symbol. I am using CMake v2.2.3 with  
> Microsoft Visual Studio 7 .NET 2003 on a Win32 machine. 
>  
> FYI I can get the LINK_FLAGS property to work, but not the 
> DEFINE_SYMBOL... 
>  
> Have I misunderstood something? Am I setting the property correctly?  
 
The name of the property is slightly misleading. 
This property is used when compiling shared libraries under windows, 
there always a different compile flag has to be used when compiling the 
shared lib itself (as opposed to compiling software which links to this 
lib). 
 
Current cmake cvs has a target property "COMPILE_FLAGS", this is probably 
what you want. 
 
Bye 
Alex 
 

-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail


More information about the CMake mailing list