diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2018-08-07 12:43:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-08-07 17:13:27 (GMT) |
commit | 4d384d290e2c873ad1f8d749e54b1b097df727dd (patch) | |
tree | 4bbbb047919fdc60923d5f4131139a67dab199b5 /Tests/RunCMake/Syntax | |
parent | 90df5f673029ae5a9ca1e88fec9ed3aa67ad36d1 (diff) | |
download | CMake-4d384d290e2c873ad1f8d749e54b1b097df727dd.zip CMake-4d384d290e2c873ad1f8d749e54b1b097df727dd.tar.gz CMake-4d384d290e2c873ad1f8d749e54b1b097df727dd.tar.bz2 |
Help: Document the $CACHE{} syntax
Also add a test case for the behavior.
Diffstat (limited to 'Tests/RunCMake/Syntax')
-rw-r--r-- | Tests/RunCMake/Syntax/QueryCache-stderr.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/QueryCache.cmake | 6 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/RunCMakeTest.cmake | 3 |
3 files changed, 11 insertions, 0 deletions
diff --git a/Tests/RunCMake/Syntax/QueryCache-stderr.txt b/Tests/RunCMake/Syntax/QueryCache-stderr.txt new file mode 100644 index 0000000..db6b2b7 --- /dev/null +++ b/Tests/RunCMake/Syntax/QueryCache-stderr.txt @@ -0,0 +1,2 @@ +-->cache value<-- +-->local value<-- diff --git a/Tests/RunCMake/Syntax/QueryCache.cmake b/Tests/RunCMake/Syntax/QueryCache.cmake new file mode 100644 index 0000000..20c648e --- /dev/null +++ b/Tests/RunCMake/Syntax/QueryCache.cmake @@ -0,0 +1,6 @@ + +set(query_var "cache value" CACHE STRING "") +set(query_var "local value") + +message("-->$CACHE{query_var}<--") +message("-->${query_var}<--") diff --git a/Tests/RunCMake/Syntax/RunCMakeTest.cmake b/Tests/RunCMake/Syntax/RunCMakeTest.cmake index b8f5fd0..a397620 100644 --- a/Tests/RunCMake/Syntax/RunCMakeTest.cmake +++ b/Tests/RunCMake/Syntax/RunCMakeTest.cmake @@ -112,6 +112,9 @@ run_cmake(CMP0053-NameWithCarriageReturnQuoted) run_cmake(CMP0053-NameWithEscapedSpacesQuoted) run_cmake(CMP0053-NameWithEscapedTabsQuoted) +# Variable special types +run_cmake(QueryCache) + # Function and macro tests. run_cmake(FunctionUnmatched) run_cmake(FunctionUnmatchedForeach) |