Commit 68a9fc1b authored by Brad King's avatar Brad King Committed by Kitware Robot

Merge topic 'intel-compile-features'

5e428389 Features: Detect Intel C++14 mode more reliably
1f848031 Features: Suppress c_static_assert test coverage on Intel <= 15
parents 3bb73a05 5e428389
......@@ -21,7 +21,7 @@ set(DETECT_CXX11 "((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) ||
#if you are compiling as 98/11/14. So to properly detect C++14 with this version
#we look for the existence of __GXX_EXPERIMENTAL_CXX0X__ but not __INTEL_CXX11_MODE__
set(DETECT_BUGGY_ICC15 "((__INTEL_COMPILER == 1500) && (__INTEL_COMPILER_UPDATE == 1))")
set(DETECT_CXX14 "((__cplusplus >= 201300L) || ((__cplusplus == 201103L) && !defined(__INTEL_CXX11_MODE__)) || ((${DETECT_BUGGY_ICC15}) && defined(__GXX_EXPERIMENTAL_CXX0X__) && !defined(__INTEL_CXX11_MODE__) ) || (defined(_MSC_VER) && defined(__INTEL_CXX11_MODE__) && defined(__cpp_aggregate_nsdmi)) )")
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(Intel16_CXX14 "__INTEL_COMPILER >= 1600 && ${DETECT_CXX14}")
......
......@@ -170,6 +170,15 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
endif()
endif()
if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
if (CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0.2)
# This works on some pre-15.0.2 versions and not others.
list(REMOVE_ITEM C_non_features
c_static_assert
)
endif()
endif()
set(C_ext c)
set(C_standard_flag 11)
set(CXX_ext cpp)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment