I have a relatively simple CMakeLists.txt
that contains the following line(s):
target_compile_features(myapp PRIVATE
cxx_generalized_initializers
cxx_lambdas
cxx_nullptr)
When I run cmake
on a Windows 2012 Server with MSVC++ 2013 Express installed, I get the following error:
CMake Error at CMakeLists.txt:61 (target_compile_features):
target_compile_features no known features for CXX compiler
"MSVC"
version 18.0.30723.0.
What is causing this error, and what can I do about it? CMake doesn't seem to have any problems when I build the project in Ubuntu 14.10 with GCC.
I am using CMake 3.1.0, in case that helps (it was the first CMake release to support target_compile_features
).