summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GeneratorExpression
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-01-30 16:49:47 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-01-31 16:27:06 (GMT)
commitdf4d2b28b24a3172daf1290070199633f7c46cf0 (patch)
tree855ffcc38839088c1571988199461e1959f99cb2 /Tests/RunCMake/GeneratorExpression
parent7ceeba992b4fb35ca05760b3170e68f41dfc1bb5 (diff)
downloadCMake-df4d2b28b24a3172daf1290070199633f7c46cf0.zip
CMake-df4d2b28b24a3172daf1290070199633f7c46cf0.tar.gz
CMake-df4d2b28b24a3172daf1290070199633f7c46cf0.tar.bz2
Make it an error for INSTALL_PREFIX to be evaluated.
An empty string is not likely going to produce expected results in any evaluation context. It is replaced by preprocessing currently.
Diffstat (limited to 'Tests/RunCMake/GeneratorExpression')
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadInstallPrefix-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadInstallPrefix-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadInstallPrefix.cmake3
-rw-r--r--Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake1
4 files changed, 14 insertions, 0 deletions
diff --git a/Tests/RunCMake/GeneratorExpression/BadInstallPrefix-result.txt b/Tests/RunCMake/GeneratorExpression/BadInstallPrefix-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/BadInstallPrefix-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/BadInstallPrefix-stderr.txt b/Tests/RunCMake/GeneratorExpression/BadInstallPrefix-stderr.txt
new file mode 100644
index 0000000..271eb6e
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/BadInstallPrefix-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at BadInstallPrefix.cmake:1 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<INSTALL_PREFIX>
+
+ INSTALL_PREFIX is a marker for install\(EXPORT\) only. It should never be
+ evaluated.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/BadInstallPrefix.cmake b/Tests/RunCMake/GeneratorExpression/BadInstallPrefix.cmake
new file mode 100644
index 0000000..fcfc3eb
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/BadInstallPrefix.cmake
@@ -0,0 +1,3 @@
+add_custom_target(check ALL COMMAND check
+ $<INSTALL_PREFIX>/include
+ VERBATIM)
diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
index 8a69675..62bf29b 100644
--- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
@@ -7,3 +7,4 @@ run_cmake(BadNOT)
run_cmake(BadStrEqual)
run_cmake(BadZero)
run_cmake(BadTargetName)
+run_cmake(BadInstallPrefix)