summaryrefslogtreecommitdiff
path: root/Modules/Compiler/Intel-CXX.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-11-10 11:50:12 -0500
committerBrad King <brad.king@kitware.com>2016-11-10 12:54:06 -0500
commitbe73273952974e15ed12cf41180162bbbda70da3 (patch)
tree082734d19b4cfa309fa92ce539d14096f506e6d8 /Modules/Compiler/Intel-CXX.cmake
parentfd8e6b1edaf451b1a695939fea5548f599eacccb (diff)
downloadcmake-be73273952974e15ed12cf41180162bbbda70da3.tar.gz
Features: Fix standards and features for Intel 15 on Windows
The Intel 15 compiler for Windows does not support the same set of standards and features as the same version for other platforms.
Diffstat (limited to 'Modules/Compiler/Intel-CXX.cmake')
-rw-r--r--Modules/Compiler/Intel-CXX.cmake28
1 files changed, 17 insertions, 11 deletions
diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake
index 6673a2df0a..d01d38d886 100644
--- a/Modules/Compiler/Intel-CXX.cmake
+++ b/Modules/Compiler/Intel-CXX.cmake
@@ -10,19 +10,23 @@ set(CMAKE_DEPFILE_FLAGS_CXX "-MD -MT <OBJECT> -MF <DEPFILE>")
if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
set(_std -Qstd)
set(_ext c++)
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16.0)
+ set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-Qstd=c++14")
+ # todo: there is no gnu++14 value supported; figure out what to do
+ set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-Qstd=c++14")
+ endif()
else()
set(_std -std)
set(_ext gnu++)
-endif()
-
-if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0.2)
- set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "${_std}=c++14")
- # todo: there is no gnu++14 value supported; figure out what to do
- set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "${_std}=c++14")
-elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0.0)
- set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "${_std}=c++1y")
- # todo: there is no gnu++14 value supported; figure out what to do
- set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "${_std}=c++1y")
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0.2)
+ set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++14")
+ # todo: there is no gnu++14 value supported; figure out what to do
+ set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=c++14")
+ elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0.0)
+ set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++1y")
+ # todo: there is no gnu++14 value supported; figure out what to do
+ set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=c++1y")
+ endif()
endif()
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.0)
@@ -62,7 +66,9 @@ unset(_ext)
macro(cmake_record_cxx_compile_features)
set(_result 0)
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1)
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0)
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16.0
+ OR (NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC" AND
+ NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0))
_record_compiler_features_cxx(14)
endif()
if (_result EQUAL 0)