diff options
author | Brad King <brad.king@kitware.com> | 2018-10-16 15:03:08 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-10-16 15:03:08 (GMT) |
commit | ab0edaabccc16bb568974051ee1e50b10993874a (patch) | |
tree | 03ab2cd390dc4c338db04878314337a77a6d6b96 /Tests | |
parent | eca87ee811a86a54a3e0bc27a29ea07ff9276ab7 (diff) | |
parent | 82a48226107e2ee0d073eaf521750c8354b67e41 (diff) | |
download | CMake-ab0edaabccc16bb568974051ee1e50b10993874a.zip CMake-ab0edaabccc16bb568974051ee1e50b10993874a.tar.gz CMake-ab0edaabccc16bb568974051ee1e50b10993874a.tar.bz2 |
Merge branch 'document-dollar-in-varnames' into release-3.13
Merge-request: !2479
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/Syntax/CMP0053-Dollar-NEW-stderr.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/CMP0053-Dollar-NEW.cmake | 6 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/CMP0053-Dollar-OLD-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/CMP0053-Dollar-OLD-stderr.txt | 24 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/CMP0053-Dollar-OLD.cmake | 6 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/RunCMakeTest.cmake | 2 |
6 files changed, 41 insertions, 0 deletions
diff --git a/Tests/RunCMake/Syntax/CMP0053-Dollar-NEW-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-Dollar-NEW-stderr.txt new file mode 100644 index 0000000..7f248ae --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-Dollar-NEW-stderr.txt @@ -0,0 +1,2 @@ +^-->value<-- +-->value<--$ diff --git a/Tests/RunCMake/Syntax/CMP0053-Dollar-NEW.cmake b/Tests/RunCMake/Syntax/CMP0053-Dollar-NEW.cmake new file mode 100644 index 0000000..b81fd56 --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-Dollar-NEW.cmake @@ -0,0 +1,6 @@ +cmake_policy(SET CMP0053 NEW) + +set($ value) +set(dollar $) +message("-->${${dollar}}<--") +message("-->${$}<--") diff --git a/Tests/RunCMake/Syntax/CMP0053-Dollar-OLD-result.txt b/Tests/RunCMake/Syntax/CMP0053-Dollar-OLD-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-Dollar-OLD-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/CMP0053-Dollar-OLD-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-Dollar-OLD-stderr.txt new file mode 100644 index 0000000..aecd4d3 --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-Dollar-OLD-stderr.txt @@ -0,0 +1,24 @@ +^CMake Deprecation Warning at CMP0053-Dollar-OLD.cmake:1 \(cmake_policy\): + The OLD behavior for policy CMP0053 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +-->value<-- +CMake Error at CMP0053-Dollar-OLD.cmake:6 \(message\): + Syntax error in cmake code at + + .*CMP0053-Dollar-OLD.cmake:6 + + when parsing string + + -->\${\$}<-- + + syntax error, unexpected \$, expecting } \(7\) +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/Syntax/CMP0053-Dollar-OLD.cmake b/Tests/RunCMake/Syntax/CMP0053-Dollar-OLD.cmake new file mode 100644 index 0000000..647f464 --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-Dollar-OLD.cmake @@ -0,0 +1,6 @@ +cmake_policy(SET CMP0053 OLD) + +set($ value) +set(dollar $) +message("-->${${dollar}}<--") +message("-->${$}<--") diff --git a/Tests/RunCMake/Syntax/RunCMakeTest.cmake b/Tests/RunCMake/Syntax/RunCMakeTest.cmake index a397620..8d74dc1 100644 --- a/Tests/RunCMake/Syntax/RunCMakeTest.cmake +++ b/Tests/RunCMake/Syntax/RunCMakeTest.cmake @@ -111,6 +111,8 @@ run_cmake(CMP0053-NameWithNewlineQuoted) run_cmake(CMP0053-NameWithCarriageReturnQuoted) run_cmake(CMP0053-NameWithEscapedSpacesQuoted) run_cmake(CMP0053-NameWithEscapedTabsQuoted) +run_cmake(CMP0053-Dollar-OLD) +run_cmake(CMP0053-Dollar-NEW) # Variable special types run_cmake(QueryCache) |