summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-07-24 12:12:51 (GMT)
committerBrad King <brad.king@kitware.com>2019-07-24 12:12:51 (GMT)
commit420073e53622bd344c9525bce4778ed6aed6276d (patch)
treef819ae72f778b4a022d274a30b9287646a7fac1b /Modules
parent07b93cb1850fa8365c42c4f9e671a423689b3d0a (diff)
parent4f15a6a5c200be8235c3e38390aba438186e7f19 (diff)
downloadCMake-420073e53622bd344c9525bce4778ed6aed6276d.zip
CMake-420073e53622bd344c9525bce4778ed6aed6276d.tar.gz
CMake-420073e53622bd344c9525bce4778ed6aed6276d.tar.bz2
Merge branch 'backport-clang-gnulike-support' into release-3.15
Merge-request: !3592
Diffstat (limited to 'Modules')
-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)