summaryrefslogtreecommitdiff
path: root/Modules/Compiler/Intel-CXX.cmake
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2019-04-29 17:20:14 -0400
committerRobert Maynard <robert.maynard@kitware.com>2019-05-02 10:23:25 -0400
commit3dbec532555eb4d088f35b4a2593ca1cc247dab0 (patch)
treec4ff765bf8d93fa7878babb9c397cc3573b1b583 /Modules/Compiler/Intel-CXX.cmake
parentfb325daa55b1bd6aa2b2b7f2c615214378224938 (diff)
downloadcmake-3dbec532555eb4d088f35b4a2593ca1cc247dab0.tar.gz
CompileFeatures: Record when compilers gained full CXX14 support
Use the infrastructure added by commit 646fb1a646 (CompileFeatures: memoize C++ compilers with full language level support, 2019-03-27) to avoid using a `try_compile` to check for C++14 feature support when the running compiler is known to have all features.
Diffstat (limited to 'Modules/Compiler/Intel-CXX.cmake')
-rw-r--r--Modules/Compiler/Intel-CXX.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake
index 032071c70d..44b0c3d219 100644
--- a/Modules/Compiler/Intel-CXX.cmake
+++ b/Modules/Compiler/Intel-CXX.cmake
@@ -40,6 +40,16 @@ else()
set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=gnu++17")
endif()
+ # While full C++14 support was first introduced in Intel 17,
+ # Intel 18.0.0-4 don't have full support as they broke
+ # support for cxx_relaxed_constexpr.
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 18.0.4)
+ set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON)
+ elseif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 17.0.0
+ AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0.0)
+ set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON)
+ endif()
+
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0.2)
set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++14")
elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0.0)