summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-07-24 12:00:53 (GMT)
committerBrad King <brad.king@kitware.com>2019-07-24 12:00:53 (GMT)
commit5cfc39127e4b9e20d9fdfca885b38272909c5694 (patch)
tree6524c3b6f528eaf259148a63dbbab9c15d1baf36 /Modules/Compiler
parent1f618fae4db3ce8f22494559ef7ef64ae650b3f4 (diff)
parentd50b31be35ed113a41f3944179f8e4a362018f86 (diff)
downloadCMake-5cfc39127e4b9e20d9fdfca885b38272909c5694.zip
CMake-5cfc39127e4b9e20d9fdfca885b38272909c5694.tar.gz
CMake-5cfc39127e4b9e20d9fdfca885b38272909c5694.tar.bz2
Merge branch 'backport-clang-gnulike-support' into clang-gnulike-support
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/Clang-CXX.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake
index 17f3917..61709f8 100644
--- a/Modules/Compiler/Clang-CXX.cmake
+++ b/Modules/Compiler/Clang-CXX.cmake
@@ -58,6 +58,13 @@ if("x${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "xGNU")
unset(_clang_version_std17)
if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
+ # The MSVC standard library requires C++14, and MSVC itself has no
+ # notion of operating in a mode not aware of at least that standard.
+ set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-std=c++14")
+ set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-std=gnu++14")
+ set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++14")
+ set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++14")
+
# This clang++ is missing some features because of MSVC compatibility.
unset(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT)
unset(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT)