summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-12-05 15:56:32 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-12-05 15:56:32 (GMT)
commit41f11259317668d53c9712afbb6cbc1580c45681 (patch)
treeba8bd87267694f449f1e6d20d9467c8e6b86eef9 /Tests
parentd59010e47fa953afb7f638fbab1a65195478d3fa (diff)
parent97c1e569245f655b5701c0b5b38bc1daa19f1750 (diff)
downloadCMake-41f11259317668d53c9712afbb6cbc1580c45681.zip
CMake-41f11259317668d53c9712afbb6cbc1580c45681.tar.gz
CMake-41f11259317668d53c9712afbb6cbc1580c45681.tar.bz2
Merge topic 'features-c++17'
97c1e569 Help: Add release note for C++ 17 support 85c8e652 Features: Activate C++ 17 support for AppleClang 6.1+ 8084f7a6 Features: Activate C++ 17 support for Clang 3.5+ 24e29d41 Features: Activate C++ 17 support for GNU 5.1+ ae1a6815 Features: Add infrastructure for C++ 17 language standard 684e4d20 Features: Make feature recording conditions more consistent
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CompileFeatures/CMakeLists.txt3
-rw-r--r--Tests/CompileFeatures/default_dialect.cpp6
2 files changed, 7 insertions, 2 deletions
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index 8acdd93..0405def 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -28,7 +28,7 @@ foreach(feature ${c_features})
run_test(${feature} C)
endforeach()
get_property(cxx_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES)
-list(REMOVE_ITEM cxx_features cxx_std_98 cxx_std_11 cxx_std_14)
+list(REMOVE_ITEM cxx_features cxx_std_98 cxx_std_11 cxx_std_14 cxx_std_17)
foreach(feature ${cxx_features})
run_test(${feature} CXX)
endforeach()
@@ -268,6 +268,7 @@ if (CMAKE_CXX_COMPILE_FEATURES)
if (std_flag_idx EQUAL -1)
add_executable(default_dialect default_dialect.cpp)
target_compile_definitions(default_dialect PRIVATE
+ DEFAULT_CXX17=$<EQUAL:${CMAKE_CXX_STANDARD_DEFAULT},17>
DEFAULT_CXX14=$<EQUAL:${CMAKE_CXX_STANDARD_DEFAULT},14>
DEFAULT_CXX11=$<EQUAL:${CMAKE_CXX_STANDARD_DEFAULT},11>
DEFAULT_CXX98=$<EQUAL:${CMAKE_CXX_STANDARD_DEFAULT},98>
diff --git a/Tests/CompileFeatures/default_dialect.cpp b/Tests/CompileFeatures/default_dialect.cpp
index 0efaefa..9b65b42 100644
--- a/Tests/CompileFeatures/default_dialect.cpp
+++ b/Tests/CompileFeatures/default_dialect.cpp
@@ -2,7 +2,11 @@
template <long l>
struct Outputter;
-#if DEFAULT_CXX14
+#if DEFAULT_CXX17
+#if __cplusplus <= 201402L
+Outputter<__cplusplus> o;
+#endif
+#elif DEFAULT_CXX14
#if __cplusplus != 201402L
Outputter<__cplusplus> o;
#endif