[CMake] Compile project as C++ if MSVC
Pau Garcia i Quiles
pgquiles at elpauer.org
Thu Dec 22 20:28:25 EST 2011
Hi,
Visual C++ 2010 does not support C99 yet and it seems it will be a
long time before MSVC supports it. For now, the usual work-around is
to build the project as C++.
I'd like to build as C if using mingw, and as C++ if using MSVC. How
can I do that? project() seems not to be valid here (I can't do
if(MSVC) before project()) and I cannot find a target property to say
"compile as language CXX"
Thank you
--
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
More information about the CMake
mailing list