summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/GeneratorExpression/CMakeLists.txt3
-rw-r--r--Tests/GeneratorExpression/check-part4.cmake11
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadSHELL_PATH-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadSHELL_PATH.cmake1
4 files changed, 24 insertions, 0 deletions
diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt
index ab6016b..df0c78d 100644
--- a/Tests/GeneratorExpression/CMakeLists.txt
+++ b/Tests/GeneratorExpression/CMakeLists.txt
@@ -256,8 +256,10 @@ add_custom_target(check-part3 ALL
if(WIN32)
set(test_shell_path c:/shell/path)
+ set(test_shell_path2 c:/shell/path d:/another/path)
else()
set(test_shell_path /shell/path)
+ set(test_shell_path2 /shell/path /another/path)
endif()
add_custom_target(check-part4 ALL
@@ -266,6 +268,7 @@ add_custom_target(check-part4 ALL
# CMake as command-line argument
-Dmsys1_prefix=${msys1_prefix}
-Dtest_shell_path=${msys1_prefix}$<SHELL_PATH:${test_shell_path}>
+ "-Dtest_shell_path2=$<SHELL_PATH:${test_shell_path2}>"
-Dif_1=$<IF:1,a,b>
-Dif_2=$<IF:0,a,b>
-Dif_3=$<IF:$<EQUAL:10,30>,a,b>
diff --git a/Tests/GeneratorExpression/check-part4.cmake b/Tests/GeneratorExpression/check-part4.cmake
index b6966de..a7e0944 100644
--- a/Tests/GeneratorExpression/check-part4.cmake
+++ b/Tests/GeneratorExpression/check-part4.cmake
@@ -15,6 +15,17 @@ if(WIN32)
else()
check(test_shell_path [[/shell/path]])
endif()
+if(WIN32)
+ if(CMAKE_GENERATOR STREQUAL "MSYS Makefiles" AND NOT msys1_prefix)
+ check(test_shell_path2 [[/c/shell/path:/d/another/path]])
+ elseif(CMAKE_GENERATOR STREQUAL "Unix Makefiles")
+ check(test_shell_path2 [[c:/shell/path;d:/another/path]])
+ else()
+ check(test_shell_path2 [[c:\shell\path;d:\another\path]])
+ endif()
+else()
+ check(test_shell_path2 [[/shell/path:/another/path]])
+endif()
check(if_1 "a")
check(if_2 "b")
diff --git a/Tests/RunCMake/GeneratorExpression/BadSHELL_PATH-stderr.txt b/Tests/RunCMake/GeneratorExpression/BadSHELL_PATH-stderr.txt
index 8d3c4cc..a08e7b2 100644
--- a/Tests/RunCMake/GeneratorExpression/BadSHELL_PATH-stderr.txt
+++ b/Tests/RunCMake/GeneratorExpression/BadSHELL_PATH-stderr.txt
@@ -15,3 +15,12 @@ CMake Error at BadSHELL_PATH.cmake:[0-9]+ \(add_custom_target\):
"Relative/Path" is not an absolute path.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
++
+CMake Error at BadSHELL_PATH.cmake:[0-9]+ \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<SHELL_PATH:;>
+
+ "" is not an absolute path.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/BadSHELL_PATH.cmake b/Tests/RunCMake/GeneratorExpression/BadSHELL_PATH.cmake
index 5eff7bc..0e7c342 100644
--- a/Tests/RunCMake/GeneratorExpression/BadSHELL_PATH.cmake
+++ b/Tests/RunCMake/GeneratorExpression/BadSHELL_PATH.cmake
@@ -1,4 +1,5 @@
add_custom_target(check ALL COMMAND check
$<SHELL_PATH:>
$<SHELL_PATH:Relative/Path>
+ "$<SHELL_PATH:;>"
VERBATIM)