summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/Intel-CXX.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-24 18:16:22 (GMT)
committerBrad King <brad.king@kitware.com>2016-10-24 18:29:40 (GMT)
commit881585f9757972473519d5394ea04a7d962ac70e (patch)
treea75701f83bcd21fef3243b9685686e329b1980a1 /Modules/Compiler/Intel-CXX.cmake
parent876da11858ab6649bb088c4bb7758fc84910ba20 (diff)
downloadCMake-881585f9757972473519d5394ea04a7d962ac70e.zip
CMake-881585f9757972473519d5394ea04a7d962ac70e.tar.gz
CMake-881585f9757972473519d5394ea04a7d962ac70e.tar.bz2
Intel: Fix compiler extension flags on Windows
The extension flags enabled by commit v3.6.0-rc1~120^2~1 (Features: Record standard flags for Intel C/C++ on Windows, 2016-04-18) of the form `-Qstd=gnu++11` are not supported by the Intel C/C++ Compiler for Windows. Fall back to using the non-extension form of the flags. Issue: #16384
Diffstat (limited to 'Modules/Compiler/Intel-CXX.cmake')
-rw-r--r--Modules/Compiler/Intel-CXX.cmake9
1 files changed, 6 insertions, 3 deletions
diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake
index 3cc4503..73dd7fa 100644
--- a/Modules/Compiler/Intel-CXX.cmake
+++ b/Modules/Compiler/Intel-CXX.cmake
@@ -9,8 +9,10 @@ set(CMAKE_DEPFILE_FLAGS_CXX "-MD -MT <OBJECT> -MF <DEPFILE>")
if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
set(_std -Qstd)
+ set(_ext c++)
else()
set(_std -std)
+ set(_ext gnu++)
endif()
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0.2)
@@ -25,15 +27,15 @@ endif()
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.0)
set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "${_std}=c++11")
- set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "${_std}=gnu++11")
+ set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "${_std}=${_ext}11")
elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1)
set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "${_std}=c++0x")
- set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "${_std}=gnu++0x")
+ set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "${_std}=${_ext}0x")
endif()
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1)
set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "${_std}=c++98")
- set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "${_std}=gnu++98")
+ set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "${_std}=${_ext}98")
endif()
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1)
@@ -50,6 +52,7 @@ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1)
endif()
unset(_std)
+unset(_ext)
macro(cmake_record_cxx_compile_features)
macro(_get_intel_features std_version list)