[CMake] Windows/Visual Studio compilation options

Jean-Sébastien Guay jean-sebastien.guay at polymtl.ca
Thu Mar 15 14:02:56 EST 2007


Hello,

While investigating a problem I had (see thread "Debug build compiles  
and links, but Release build fails to link?") I noticed that some  
compiler options were being set in the "Additional Options" field in  
the compiler options window in Visual Studio (I'm using 2005, but I  
suspect this is the case for others too).

The options are:
  /DWIN32 /D_WINDOWS /Zm1000 /D NDEBUG -DCMAKE_INTDIR=\"Release\"

Now, apart from /Zm1000 which can only be set there (according to the  
Visual Studio documentation, see  
http://msdn2.microsoft.com/en-us/library/bdscwf1c.aspx) the rest can  
be set in the Preprocessor definitions field of the compilation  
options window. That would be more intuitive, as otherwise I could  
have easily overlooked them if I hadn't happened to look there. And  
indeed, the define I was looking for was there (NDEBUG).

Also, -DCMAKE_INTDIR=\"Release\" should probably be   
/DCMAKE_INTDIR=\"Release\" for Windows...

Just a suggestion. Thanks,

J-S
-- 
______________________________________________________
Jean-Sebastien Guay     jean-sebastien.guay at polymtl.ca
                         http://whitestar02.webhop.org/

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the CMake mailing list