summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/Intel-CXX.cmake
diff options
context:
space:
mode:
authorChristian Pfeiffer <cpfeiffer@live.de>2018-01-27 14:08:39 (GMT)
committerChristian Pfeiffer <cpfeiffer@live.de>2018-01-27 14:09:58 (GMT)
commitc3d576f5d685f2703ebed0dd0e76209b0fd6e6cf (patch)
tree5b49de9ee4cf8cbec706edaf19a84602e8ca7379 /Modules/Compiler/Intel-CXX.cmake
parent4a5727d375e893f147b46e2a58aea647a9afddcf (diff)
downloadCMake-c3d576f5d685f2703ebed0dd0e76209b0fd6e6cf.zip
CMake-c3d576f5d685f2703ebed0dd0e76209b0fd6e6cf.tar.gz
CMake-c3d576f5d685f2703ebed0dd0e76209b0fd6e6cf.tar.bz2
Intel: Add C++17 compiler options
Since Intel C++ 18.0, some C++17 features are supported if the flags -std=c++17, respectively /Qstd=c++17 are given. Fixes: #17687
Diffstat (limited to 'Modules/Compiler/Intel-CXX.cmake')
-rw-r--r--Modules/Compiler/Intel-CXX.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake
index 0eb9e1f..d9c5749 100644
--- a/Modules/Compiler/Intel-CXX.cmake
+++ b/Modules/Compiler/Intel-CXX.cmake
@@ -9,6 +9,11 @@ set(CMAKE_DEPFILE_FLAGS_CXX "-MD -MT <OBJECT> -MF <DEPFILE>")
if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0.0)
+ set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-Qstd=c++17")
+ set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-Qstd=c++17")
+ endif()
+
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16.0)
set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-Qstd=c++14")
set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-Qstd=c++14")
@@ -29,6 +34,12 @@ if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
else()
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0.0)
+ set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std=c++17")
+ # todo: there is no gnu++17 value supported; figure out what to do
+ set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=c++17")
+ 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