summaryrefslogtreecommitdiff
path: root/Tests/CompileFeatures
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-01-03 14:57:31 +0100
committerStephen Kelly <steveire@gmail.com>2015-01-03 15:09:58 +0100
commitb3e86f4e976562913bbe322bd2856a75a1542b27 (patch)
tree9da8ac2f4eccfba771a5fbf346a2315bc33417b9 /Tests/CompileFeatures
parent24dfa74214bba9ac80e675e0cf7d13d72474f652 (diff)
downloadcmake-b3e86f4e976562913bbe322bd2856a75a1542b27.tar.gz
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.
Diffstat (limited to 'Tests/CompileFeatures')
-rw-r--r--Tests/CompileFeatures/CMakeLists.txt2
-rw-r--r--Tests/CompileFeatures/genex_test.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index ff5d7450f3..ae666c87f8 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=$<COMPILE_FEATURES:cxx_final,cxx_override>)
diff --git a/Tests/CompileFeatures/genex_test.cpp b/Tests/CompileFeatures/genex_test.cpp
index ca38883564..46b1942b05 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