diff options
author | Brad King <brad.king@kitware.com> | 2019-02-28 16:41:32 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-02-28 16:41:43 (GMT) |
commit | bfd71fc05c8495d9afefc920f2d59776b184098c (patch) | |
tree | 1436f3a8fcd3071375821e3fb8339dee2fd84a84 /Tests | |
parent | 4a79cdc85f885abfde9c3da393a55ef8ec947637 (diff) | |
parent | c7213ca87064ba47984b4dd07192389366d5856a (diff) | |
download | CMake-bfd71fc05c8495d9afefc920f2d59776b184098c.zip CMake-bfd71fc05c8495d9afefc920f2d59776b184098c.tar.gz CMake-bfd71fc05c8495d9afefc920f2d59776b184098c.tar.bz2 |
Merge topic 'features-from-default-standard'
c7213ca870 Features: Do not use a lower-than-default standard for requested features
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3023
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CompileFeatures/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/CompileFeatures/genex_test.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt index b0bc656..6ccdcc3 100644 --- a/Tests/CompileFeatures/CMakeLists.txt +++ b/Tests/CompileFeatures/CMakeLists.txt @@ -338,11 +338,11 @@ else() add_executable(CompileFeaturesGenex2 genex_test.cpp) target_compile_features(CompileFeaturesGenex2 PRIVATE cxx_std_11) - target_compile_definitions(CompileFeaturesGenex2 PRIVATE ${genex_test_defs}) + target_compile_definitions(CompileFeaturesGenex2 PRIVATE ${genex_test_defs} ALLOW_LATER_STANDARDS=1) add_library(std_11_iface INTERFACE) target_compile_features(std_11_iface INTERFACE cxx_std_11) add_executable(CompileFeaturesGenex3 genex_test.cpp) target_link_libraries(CompileFeaturesGenex3 PRIVATE std_11_iface) - target_compile_definitions(CompileFeaturesGenex3 PRIVATE ${genex_test_defs}) + target_compile_definitions(CompileFeaturesGenex3 PRIVATE ${genex_test_defs} ALLOW_LATER_STANDARDS=1) endif() diff --git a/Tests/CompileFeatures/genex_test.cpp b/Tests/CompileFeatures/genex_test.cpp index 59f9006..4539789 100644 --- a/Tests/CompileFeatures/genex_test.cpp +++ b/Tests/CompileFeatures/genex_test.cpp @@ -15,10 +15,10 @@ # if !HAVE_CXX_STD_11 # error HAVE_CXX_STD_11 is false with CXX_STANDARD == 11 # endif -# if HAVE_CXX_STD_14 +# if HAVE_CXX_STD_14 && !defined(ALLOW_LATER_STANDARDS) # error HAVE_CXX_STD_14 is true with CXX_STANDARD == 11 # endif -# if HAVE_CXX_STD_17 +# if HAVE_CXX_STD_17 && !defined(ALLOW_LATER_STANDARDS) # error HAVE_CXX_STD_17 is true with CXX_STANDARD == 11 # endif #endif |