Clang-CXX-FeatureTests.cmake 1.7 KB

123456789101112131415161718192021222324252627282930313233
  1. # Reference: http://clang.llvm.org/cxx_status.html
  2. # http://clang.llvm.org/docs/LanguageExtensions.html
  3. set(_cmake_oldestSupported "((__clang_major__ * 100) + __clang_minor__) >= 301")
  4. include("${CMAKE_CURRENT_LIST_DIR}/Clang-CXX-TestableFeatures.cmake")
  5. set(Clang34_CXX14 "((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus > 201103L")
  6. # http://llvm.org/bugs/show_bug.cgi?id=19242
  7. set(_cmake_feature_test_cxx_attribute_deprecated "${Clang34_CXX14}")
  8. # http://llvm.org/bugs/show_bug.cgi?id=19698
  9. set(_cmake_feature_test_cxx_decltype_auto "${Clang34_CXX14}")
  10. set(_cmake_feature_test_cxx_digit_separators "${Clang34_CXX14}")
  11. # http://llvm.org/bugs/show_bug.cgi?id=19674
  12. set(_cmake_feature_test_cxx_generic_lambdas "${Clang34_CXX14}")
  13. set(Clang31_CXX11 "${_cmake_oldestSupported} && __cplusplus >= 201103L")
  14. set(_cmake_feature_test_cxx_enum_forward_declarations "${Clang31_CXX11}")
  15. set(_cmake_feature_test_cxx_sizeof_member "${Clang31_CXX11}")
  16. # TODO: Should be supported by Clang 2.9
  17. set(Clang29_CXX11 "${_cmake_oldestSupported} && __cplusplus >= 201103L")
  18. set(_cmake_feature_test_cxx_extended_friend_declarations "${Clang29_CXX11}")
  19. set(_cmake_feature_test_cxx_extern_templates "${Clang29_CXX11}")
  20. set(_cmake_feature_test_cxx_func_identifier "${Clang29_CXX11}")
  21. set(_cmake_feature_test_cxx_inline_namespaces "${Clang29_CXX11}")
  22. set(_cmake_feature_test_cxx_long_long_type "${Clang29_CXX11}")
  23. set(_cmake_feature_test_cxx_right_angle_brackets "${Clang29_CXX11}")
  24. set(_cmake_feature_test_cxx_variadic_macros "${Clang29_CXX11}")
  25. # TODO: Should be supported forever?
  26. set(Clang_CXX98 "${_cmake_oldestSupported} && __cplusplus >= 199711L")
  27. set(_cmake_feature_test_cxx_template_template_parameters "${Clang_CXX98}")