summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/Syntax/AtWithVariable.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-02-24 15:40:09 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-02-24 15:40:09 (GMT)
commitfb5b48bb2741424e184cfa1c5e8026372714df96 (patch)
treef73b47ab1e28ada0bef928ac0771f85ff29bc968 /Tests/RunCMake/Syntax/AtWithVariable.cmake
parent624b0fa923ef669649300e923931730d0bd03ba7 (diff)
parenta9bdef2dda7985762e2eae7e6ae323606d917b4e (diff)
downloadCMake-fb5b48bb2741424e184cfa1c5e8026372714df96.zip
CMake-fb5b48bb2741424e184cfa1c5e8026372714df96.tar.gz
CMake-fb5b48bb2741424e184cfa1c5e8026372714df96.tar.bz2
Merge topic 'variable-expansion-tests'
a9bdef2d tests: Add variable expansion tests
Diffstat (limited to 'Tests/RunCMake/Syntax/AtWithVariable.cmake')
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariable.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/Syntax/AtWithVariable.cmake b/Tests/RunCMake/Syntax/AtWithVariable.cmake
new file mode 100644
index 0000000..2bbf61d
--- /dev/null
+++ b/Tests/RunCMake/Syntax/AtWithVariable.cmake
@@ -0,0 +1,9 @@
+set(right "wrong")
+set(var "\${right}")
+# Expanded here.
+set(ref "@var@")
+
+# 'right' is dereferenced because 'var' was dereferenced when
+# assigning to 'ref' above.
+string(CONFIGURE "${ref}" output)
+message("-->${output}<--")