diff options
author | Brad King <brad.king@kitware.com> | 2015-01-15 14:54:08 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-01-15 14:54:08 (GMT) |
commit | b4263abdea04bf445c3e99be3be627dfb6c3047d (patch) | |
tree | 82501d386069cc739edb631caa25f7abf2aab6d7 /Tests | |
parent | 9cdc2f38edea4b2d1b4421587bbe9b2a83999d4f (diff) | |
parent | dcd72a740573392b2074bbea3d9d992bcd8959f8 (diff) | |
download | CMake-b4263abdea04bf445c3e99be3be627dfb6c3047d.zip CMake-b4263abdea04bf445c3e99be3be627dfb6c3047d.tar.gz CMake-b4263abdea04bf445c3e99be3be627dfb6c3047d.tar.bz2 |
Merge topic 'Xcode-clang-compile-features'
dcd72a74 Help: Add notes for topic 'Xcode-clang-compile-features'
3ad893b5 Features: Record for historical Xcode clang versions.
98965fb1 Features: Record dialect flags for AppleClang 4.0+.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CompileFeatures/CMakeLists.txt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt index b164f06..4308508 100644 --- a/Tests/CompileFeatures/CMakeLists.txt +++ b/Tests/CompileFeatures/CMakeLists.txt @@ -31,6 +31,26 @@ foreach(feature ${cxx_features}) run_test(${feature} CXX) endforeach() +if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" + AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1) + # AppleClang prior to 5.1 does not set any preprocessor define to distinguish + # c++1y from c++11, so CMake does not support c++1y features before AppleClang 5.1. + list(REMOVE_ITEM CXX_non_features + cxx_attribute_deprecated + cxx_binary_literals + ) +endif() + +if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" + AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.2) + # AppleClang prior to 4.1 reports false for __has_feature(cxx_local_type_template_args) + # and __has_feature(cxx_unrestricted_unions) but it happens to pass these tests. + list(REMOVE_ITEM CXX_non_features + cxx_local_type_template_args + cxx_unrestricted_unions + ) +endif() + if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8) # The cxx_alignof feature happens to work (for *this* testcase) with |