Intel-C-FeatureTests.cmake 1.0 KB

1234567891011121314151617181920
  1. # References:
  2. # - https://software.intel.com/en-us/articles/iso-iec-standards-language-conformance-for-intel-c-compiler
  3. # - https://software.intel.com/en-us/articles/c99-support-in-intel-c-compiler
  4. # - https://software.intel.com/en-us/articles/c11-support-in-intel-c-compiler
  5. set(DETECT_C99 "defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L")
  6. set(DETECT_C11 "defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L")
  7. #static assert is only around in version 1500 update 2 and above
  8. set(_cmake_feature_test_c_static_assert "(__INTEL_COMPILER > 1500 || (__INTEL_COMPILER == 1500 && __INTEL_COMPILER_UPDATE > 1) ) && (${DETECT_C11} || ${DETECT_C99} && !defined(_MSC_VER))")
  9. set(_cmake_oldestSupported "__INTEL_COMPILER >= 1110")
  10. set(Intel_C99 "${_cmake_oldestSupported} && ${DETECT_C99}")
  11. set(_cmake_feature_test_c_restrict "${Intel_C99}")
  12. set(_cmake_feature_test_c_variadic_macros "${Intel_C99}")
  13. set(_cmake_feature_test_c_function_prototypes "${_cmake_oldestSupported}")
  14. unset(Intel_C99)
  15. unset(DETECT_C99)
  16. unset(DETECT_C11)