diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-05-05 22:21:14 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-05-22 16:01:23 (GMT) |
commit | dd043c3f21fbfab17d7f400bd2bc9f927215b18e (patch) | |
tree | 73f942d1294819f457309e1ccb507a057901a180 /Tests/CompileFeatures/CMakeLists.txt | |
parent | 3ea9bde8450a28b58730230e9e73e4b8d439f701 (diff) | |
download | CMake-dd043c3f21fbfab17d7f400bd2bc9f927215b18e.zip CMake-dd043c3f21fbfab17d7f400bd2bc9f927215b18e.tar.gz CMake-dd043c3f21fbfab17d7f400bd2bc9f927215b18e.tar.bz2 |
Features: Add support for C++14 features.
Record the features implemented by GNU 4.9 and Clang 3.4.
Diffstat (limited to 'Tests/CompileFeatures/CMakeLists.txt')
-rw-r--r-- | Tests/CompileFeatures/CMakeLists.txt | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt index 7a8a975..d02ddaf 100644 --- a/Tests/CompileFeatures/CMakeLists.txt +++ b/Tests/CompileFeatures/CMakeLists.txt @@ -37,11 +37,24 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL GNU cxx_alignof ) endif() +if (CMAKE_CXX_COMPILER_ID STREQUAL GNU + AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) + # GNU prior to 4.9 does not set any preprocessor define to distinguish + # c++1y from c++11, so CMake does not support c++1y features before GNU 4.9. + list(REMOVE_ITEM CXX_non_features + # GNU 4.8 knows cxx_attributes, but doesn't know [[deprecated]] + # and warns that it is unknown and ignored. + cxx_attribute_deprecated + cxx_binary_literals + cxx_lambda_init_captures + cxx_return_type_deduction + ) +endif() set(C_ext c) set(C_standard_flag 11) set(CXX_ext cpp) -set(CXX_standard_flag 11) +set(CXX_standard_flag 14) foreach(lang CXX C) if (CMAKE_${lang}_COMPILE_FEATURES) foreach(feature ${${lang}_non_features}) |