summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GenEx-PATH/RELATIVE_PATH.cmake.in
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2023-02-14 14:48:31 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2023-02-21 18:34:43 (GMT)
commite395310a215503a0cc21771fc73a35bc0afa59c0 (patch)
tree5fbddce8e48b5480fc989ca506a07173ded95f10 /Tests/RunCMake/GenEx-PATH/RELATIVE_PATH.cmake.in
parentd3ea15e80152511946c719404466dfa199532005 (diff)
downloadCMake-e395310a215503a0cc21771fc73a35bc0afa59c0.zip
CMake-e395310a215503a0cc21771fc73a35bc0afa59c0.tar.gz
CMake-e395310a215503a0cc21771fc73a35bc0afa59c0.tar.bz2
PATH-genex: handle lists for path decomposition and transformations
Fixes: #24371
Diffstat (limited to 'Tests/RunCMake/GenEx-PATH/RELATIVE_PATH.cmake.in')
-rw-r--r--Tests/RunCMake/GenEx-PATH/RELATIVE_PATH.cmake.in14
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/RunCMake/GenEx-PATH/RELATIVE_PATH.cmake.in b/Tests/RunCMake/GenEx-PATH/RELATIVE_PATH.cmake.in
index 11d73ad..7670f4f 100644
--- a/Tests/RunCMake/GenEx-PATH/RELATIVE_PATH.cmake.in
+++ b/Tests/RunCMake/GenEx-PATH/RELATIVE_PATH.cmake.in
@@ -61,4 +61,18 @@ if (WIN32)
endif()
+######################################
+## tests with list of paths
+######################################
+unset (reference)
+foreach(item IN ITEMS "/a//d" "/a/b/e")
+ cmake_path(RELATIVE_PATH item BASE_DIRECTORY "/a/b/c")
+ list(APPEND reference "${item}")
+endforeach()
+set(output "$<PATH:RELATIVE_PATH,/a//d;/a/b/e,/a/b/c>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "'${output}' instead of '${reference}'")
+endif()
+
+
check_errors("PATH:RELATIVE_PATH" ${errors})