summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/Syntax/AtWithVariable.cmake
diff options
context:
space:
mode:
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}<--")