diff options
author | Brad King <brad.king@kitware.com> | 2016-10-26 18:56:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-10-26 19:03:53 (GMT) |
commit | 05e05cd2aae9d00d2ed89a4f0cb9ef2f2976ae80 (patch) | |
tree | e0eeca36fedd22321126b3353bb8af81732acbf7 /Modules/Compiler/Intel-CXX.cmake | |
parent | 554b4f9010add22ef83bb22858f9fdcb52afbc7e (diff) | |
download | CMake-05e05cd2aae9d00d2ed89a4f0cb9ef2f2976ae80.zip CMake-05e05cd2aae9d00d2ed89a4f0cb9ef2f2976ae80.tar.gz CMake-05e05cd2aae9d00d2ed89a4f0cb9ef2f2976ae80.tar.bz2 |
Intel: Fix compiler C++98 standard flag on Windows
The Intel C++ Compiler for Windows does not support the `-Qstd=c++98`
flag but does support `-Qstd=gnu++98`.
Issue: #16384
Diffstat (limited to 'Modules/Compiler/Intel-CXX.cmake')
-rw-r--r-- | Modules/Compiler/Intel-CXX.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake index 73dd7fa..29e02d3 100644 --- a/Modules/Compiler/Intel-CXX.cmake +++ b/Modules/Compiler/Intel-CXX.cmake @@ -34,7 +34,11 @@ elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1) endif() if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1) - set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "${_std}=c++98") + if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") + set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "${_std}=gnu++98") + else() + set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "${_std}=c++98") + endif() set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "${_std}=${_ext}98") endif() |