From b3e86f4e976562913bbe322bd2856a75a1542b27 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 3 Jan 2015 14:57:31 +0100 Subject: Features: Test an expectation of whether OVERRIDE_CONTROL is expected The tests below test the presence of both cxx_final and cxx_override, only one of which is supported by MSVC. The test is in part intended to verify that the COMPILE_FEATURES genex supports multiple arguments and allows users to define names for groups of features (Clang already calls cxx_final and cxx_override 'override control' as a group). Keep the test, and allow the expectation to be set as appropriate. --- Tests/CompileFeatures/CMakeLists.txt | 2 ++ Tests/CompileFeatures/genex_test.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt index ff5d745..ae666c8 100644 --- a/Tests/CompileFeatures/CMakeLists.txt +++ b/Tests/CompileFeatures/CMakeLists.txt @@ -120,6 +120,8 @@ if (CMAKE_CXX_COMPILE_FEATURES) add_executable(IfaceCompileFeatures main.cpp) target_link_libraries(IfaceCompileFeatures iface) + add_definitions(-DEXPECT_OVERRIDE_CONTROL=1) + add_executable(CompileFeaturesGenex genex_test.cpp) set_property(TARGET CompileFeaturesGenex PROPERTY CXX_STANDARD 11) target_compile_definitions(CompileFeaturesGenex PRIVATE HAVE_OVERRIDE_CONTROL=$) diff --git a/Tests/CompileFeatures/genex_test.cpp b/Tests/CompileFeatures/genex_test.cpp index ca38883..46b1942 100644 --- a/Tests/CompileFeatures/genex_test.cpp +++ b/Tests/CompileFeatures/genex_test.cpp @@ -1,6 +1,8 @@ #if !HAVE_OVERRIDE_CONTROL +#if EXPECT_OVERRIDE_CONTROL #error "Expect override control feature" +#endif #else struct A -- cgit v0.12