diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2014-12-22 15:25:18 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-01-11 15:47:58 (GMT) |
commit | 64c30bdc48d0a3e1da48fdbfeb200740fa5dac43 (patch) | |
tree | 594a91878a7d178e026c4079b04def6c964074d7 /Modules/Platform | |
parent | 225c0ef88bf21c39694b51798390b87328a163de (diff) | |
download | CMake-64c30bdc48d0a3e1da48fdbfeb200740fa5dac43.zip CMake-64c30bdc48d0a3e1da48fdbfeb200740fa5dac43.tar.gz CMake-64c30bdc48d0a3e1da48fdbfeb200740fa5dac43.tar.bz2 |
Features: Record for MSVC C++ 2015 and MSVC C 2010-2015.
Initializer lists are only properly supported in 2015 and above.
Previous Visual Studio releases said they supported initializer lists
but silently produced bad code.
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/Windows-MSVC-C.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/Windows-MSVC-CXX.cmake | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Modules/Platform/Windows-MSVC-C.cmake b/Modules/Platform/Windows-MSVC-C.cmake index cbe1586..c7792eb 100644 --- a/Modules/Platform/Windows-MSVC-C.cmake +++ b/Modules/Platform/Windows-MSVC-C.cmake @@ -3,3 +3,5 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 18.0) set(_FS_C " /FS") endif() __windows_compiler_msvc(C) + +set(CMAKE_C_STANDARD_DEFAULT 90) diff --git a/Modules/Platform/Windows-MSVC-CXX.cmake b/Modules/Platform/Windows-MSVC-CXX.cmake index 89885b8..ad56f68 100644 --- a/Modules/Platform/Windows-MSVC-CXX.cmake +++ b/Modules/Platform/Windows-MSVC-CXX.cmake @@ -5,6 +5,11 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0) endif() __windows_compiler_msvc(CXX) +# No version of MSVC has full conformance to C++11. Therefore the +# __cplusplus macro always evaluates to 98 even if the compilers come with +# C++11/14/+ features enabled. +set(CMAKE_CXX_STANDARD_DEFAULT 98) + macro(cmake_record_cxx_compile_features) record_compiler_features(CXX "" CMAKE_CXX_COMPILE_FEATURES) endmacro() |