summaryrefslogtreecommitdiff
path: root/Tests/TryCompile/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-10-27 12:25:41 -0400
committerBrad King <brad.king@kitware.com>2020-10-27 12:25:41 -0400
commit80e693152c59e56b09103151465a6ae9b9710224 (patch)
treeab7b0a5ff1f44487a8852cb4717d7b2b1de2997b /Tests/TryCompile/CMakeLists.txt
parent4c0ef57e8ca0f55783d4ad3e1545246fa188590b (diff)
parent8d6a0b9364581fbb95746c93cac4ec3c213f534b (diff)
downloadcmake-80e693152c59e56b09103151465a6ae9b9710224.tar.gz
Merge branch 'release-3.19' into FindRuby-restore-VENDORLIB_DIR
Diffstat (limited to 'Tests/TryCompile/CMakeLists.txt')
-rw-r--r--Tests/TryCompile/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/Tests/TryCompile/CMakeLists.txt b/Tests/TryCompile/CMakeLists.txt
index df921d814e..0c6b9382cc 100644
--- a/Tests/TryCompile/CMakeLists.txt
+++ b/Tests/TryCompile/CMakeLists.txt
@@ -283,11 +283,15 @@ TEST_ASSERT(C_RUN_SHOULD_WORK "CHECK_C_SOURCE_RUNS() failed")
CHECK_CXX_SOURCE_COMPILES("I don't build" CXX_BUILD_SHOULD_FAIL)
CHECK_CXX_SOURCE_COMPILES("int main() {return 0;}" CXX_BUILD_SHOULD_WORK)
+CHECK_CXX_SOURCE_COMPILES("void l(char const (&x)[2]){}; int main() { l(\"\\\\n\"); return 0;}"
+ CXX_BUILD_SHOULD_WORK_COMPLEX)
+
CHECK_CXX_SOURCE_RUNS("int main() {return 2;}" CXX_RUN_SHOULD_FAIL)
CHECK_CXX_SOURCE_RUNS("int main() {return 0;}" CXX_RUN_SHOULD_WORK)
TEST_FAIL(CXX_BUILD_SHOULD_FAIL "CHECK_CXX_SOURCE_COMPILES() succeeded, but should have failed")
TEST_ASSERT(CXX_BUILD_SHOULD_WORK "CHECK_CXX_SOURCE_COMPILES() failed")
+TEST_ASSERT(CXX_BUILD_SHOULD_WORK_COMPLEX "CHECK_CXX_SOURCE_COMPILES() failed")
TEST_FAIL(CXX_RUN_SHOULD_FAIL "CHECK_CXX_SOURCE_RUNS() succeeded, but should have failed")
TEST_ASSERT(CXX_RUN_SHOULD_WORK "CHECK_CXX_SOURCE_RUNS() failed")