[CMake] Visual Studio 2013 No CXX flags applied

Daniel Kollmann dankolle at mail.de
Thu Jan 22 06:00:07 EST 2015


Hello everybody,

 

I have the big problem that my flags are not forwarded to VS. I am not sure
why, I suspect that maybe it does not realise that the CXX flags are
supposed to be used.

 

 

Here is what my cache looks like:

 

CMAKE_CXX_FLAGS:STRING= /DWIN32 /D_WINDOWS /W3 /GR /EHsc

CMAKE_CXX_FLAGS_DEBUG:STRING=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 /MTd

 

When VS calls the compiler I get basically this output:

 

cl /c /IC:\Depot\Source /IC:\Depot\include /W1 /WX- /O2 /D CONFIG_64 /D
_ALLOW_KEYWORD_MACROS /D BOOST_ALL_NO_LIB /D BOOST_FILESYSTEM_NO_DEPRECATED
/D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /MD /GS /fp:precise /Zc:wchar_t
/Zc:forScope /Fo"Creator.dir\Debug\\" /Fd"Creator.dir\Debug\vc120.pdb" /Gd
/TP /errorReport:prompt Main.cpp

 

As you can see none of the flags are listed. Strangely enough the
combination of the first few flags can also not be found anywhere in the
cache file so I guess it is some project defaults VS put in place.

 

Any suggestion why CMAKE_CXX_FLAGS would not be applied to VS builds?

 

 

I am using Cmake 3.1.0 and VS2013. My cmake call looks like this:

 

cmake.exe -H. -B"../../../../Intermediate/Creator" -G "Visual Studio 12 2013
Win64" -DWIN64=1 --trace

 

 

Thanks

Dan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150122/cb45a565/attachment.html>


More information about the CMake mailing list