summaryrefslogtreecommitdiffstats
path: root/Tests/CompileOptions
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2019-05-07 20:21:17 (GMT)
committerBrad King <brad.king@kitware.com>2019-05-14 18:54:15 (GMT)
commite214abdaab4f8097095a601067b4071194ad01a5 (patch)
treefbc5642c2d890cb5e0d185bc34326963feef52c3 /Tests/CompileOptions
parentf84ed796a220c6a4879f08e9003fe5489d8d104d (diff)
downloadCMake-e214abdaab4f8097095a601067b4071194ad01a5.zip
CMake-e214abdaab4f8097095a601067b4071194ad01a5.tar.gz
CMake-e214abdaab4f8097095a601067b4071194ad01a5.tar.bz2
Genex: Add COMPILE_LANG_AND_ID generator expression
Diffstat (limited to 'Tests/CompileOptions')
-rw-r--r--Tests/CompileOptions/CMakeLists.txt1
-rw-r--r--Tests/CompileOptions/main.cpp3
2 files changed, 4 insertions, 0 deletions
diff --git a/Tests/CompileOptions/CMakeLists.txt b/Tests/CompileOptions/CMakeLists.txt
index 15a993c..18896bf 100644
--- a/Tests/CompileOptions/CMakeLists.txt
+++ b/Tests/CompileOptions/CMakeLists.txt
@@ -25,6 +25,7 @@ set_property(TARGET CompileOptions PROPERTY COMPILE_OPTIONS
"-DTEST_DEFINE"
"-DNEEDS_ESCAPE=\"E$CAPE\""
"$<$<CXX_COMPILER_ID:GNU>:-DTEST_DEFINE_GNU>"
+ "$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-DTEST_DEFINE_CXX_AND_GNU>"
"SHELL:" # produces no options
${c_tests}
${cxx_tests}
diff --git a/Tests/CompileOptions/main.cpp b/Tests/CompileOptions/main.cpp
index d94a169..ebc1017 100644
--- a/Tests/CompileOptions/main.cpp
+++ b/Tests/CompileOptions/main.cpp
@@ -10,6 +10,9 @@
# ifndef TEST_DEFINE_GNU
# error Expected definition TEST_DEFINE_GNU
# endif
+# ifndef TEST_DEFINE_CXX_AND_GNU
+# error Expected definition TEST_DEFINE_CXX_AND_GNU
+# endif
#endif
#ifndef NO_DEF_TESTS