summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/Intel-CXX-FeatureTests.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-03-31 18:19:17 (GMT)
committerBrad King <brad.king@kitware.com>2017-03-31 18:29:18 (GMT)
commit4af0c9daf41dfe08c776e77f5b19aebd81469479 (patch)
treef24ba74f6d9a98608f4193c974d10216c1226312 /Modules/Compiler/Intel-CXX-FeatureTests.cmake
parent18eeed41948b265168497ea3360e7b0d56e8e8a9 (diff)
downloadCMake-4af0c9daf41dfe08c776e77f5b19aebd81469479.zip
CMake-4af0c9daf41dfe08c776e77f5b19aebd81469479.tar.gz
CMake-4af0c9daf41dfe08c776e77f5b19aebd81469479.tar.bz2
Features: Update features for Intel C++ 17.0.2 on UNIX
Intel 17.0.2 on UNIX introduced a regression from 17.0.1 in its definition of `__cpp_constexpr` in `-std=c++14` mode. It incorrectly defines it as `200704` instead of the expected `201304`. Fix our feature detection table to account for this.
Diffstat (limited to 'Modules/Compiler/Intel-CXX-FeatureTests.cmake')
-rw-r--r--Modules/Compiler/Intel-CXX-FeatureTests.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/Compiler/Intel-CXX-FeatureTests.cmake b/Modules/Compiler/Intel-CXX-FeatureTests.cmake
index e370647..929a7c6 100644
--- a/Modules/Compiler/Intel-CXX-FeatureTests.cmake
+++ b/Modules/Compiler/Intel-CXX-FeatureTests.cmake
@@ -13,7 +13,6 @@
# - __cpp_variadic_templates 200704
set(_cmake_feature_test_cxx_variable_templates "__cpp_variable_templates >= 201304")
-set(_cmake_feature_test_cxx_relaxed_constexpr "__cpp_constexpr >= 201304")
set(_cmake_oldestSupported "__INTEL_COMPILER >= 1210")
set(DETECT_CXX11 "((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__))")
@@ -24,6 +23,9 @@ set(DETECT_BUGGY_ICC15 "((__INTEL_COMPILER == 1500) && (__INTEL_COMPILER_UPDATE
set(DETECT_CXX14 "((__cplusplus >= 201300L) || ((__cplusplus == 201103L) && !defined(__INTEL_CXX11_MODE__)) || ((${DETECT_BUGGY_ICC15}) && defined(__GXX_EXPERIMENTAL_CXX0X__) && !defined(__INTEL_CXX11_MODE__) ) || (defined(__INTEL_CXX11_MODE__) && defined(__cpp_aggregate_nsdmi)) )")
unset(DETECT_BUGGY_ICC15)
+set(Intel17_CXX14 "__INTEL_COMPILER >= 1700 && ${DETECT_CXX14}")
+set(_cmake_feature_test_cxx_relaxed_constexpr "__cpp_constexpr >= 201304 || (${Intel17_CXX14} && !defined(_MSC_VER))")
+
set(Intel16_CXX14 "__INTEL_COMPILER >= 1600 && ${DETECT_CXX14}")
set(_cmake_feature_test_cxx_aggregate_default_initializers "${Intel16_CXX14}")
set(_cmake_feature_test_cxx_contextual_conversions "${Intel16_CXX14}")