[CMake] Compile project as C++ if MSVC

Pau Garcia i Quiles pgquiles at elpauer.org
Fri Dec 23 07:43:51 EST 2011


2011/12/23 Mateusz Łoskot <mateusz at loskot.net>:
>>>> For now, the usual work-around is to build the project as C++.
>>>
>>> If a certain feature from C99 is not supported by Visual C++,
>>> how it is supposed to be workaround?
>>
>> Many C99 features were already supported by standard C++ and/or Visual
>> C++-specific features: mixing declarations and code, snprintf, inline
>> functions, more data types, etc
>
> No.
>
> All the features you listed above are C++ standard features, including
> snprintf which is C++11 feature introduced as part of C99 compatibility.

That's exactly why the workaround is to compile the C project as C++
to get the C99 features that are both in C99 and in C++.

-- 
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