summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/cmake_path
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2021-01-26 14:03:01 (GMT)
committerCraig Scott <craig.scott@crascit.com>2021-01-28 00:06:31 (GMT)
commit76cea3dfe2b968885f8a956504bcee9d46a58303 (patch)
tree92cb6042a04146668cb64743bdae51d1133c0f86 /Tests/RunCMake/cmake_path
parent9b96fbc358aba8110ba09d3ad2262223ec0f0167 (diff)
downloadCMake-76cea3dfe2b968885f8a956504bcee9d46a58303.zip
CMake-76cea3dfe2b968885f8a956504bcee9d46a58303.tar.gz
CMake-76cea3dfe2b968885f8a956504bcee9d46a58303.tar.bz2
cmake_path: rename 'GET ... RELATIVE_PATH' to 'GET ... RELATIVE_PART'
For consistency, subcommand 'HAS_RELATIVE_PATH' is also renamed to 'HAS_RELATIVE_PART'. Fixes: #21385
Diffstat (limited to 'Tests/RunCMake/cmake_path')
-rw-r--r--Tests/RunCMake/cmake_path/GET-RELATIVE_PART-invalid-output-result.txt (renamed from Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-wrong-path-result.txt)0
-rw-r--r--Tests/RunCMake/cmake_path/GET-RELATIVE_PART-missing-output-result.txt (renamed from Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-unexpected-arg-result.txt)0
-rw-r--r--Tests/RunCMake/cmake_path/GET-RELATIVE_PART-unexpected-arg-result.txt (renamed from Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-missing-output-result.txt)0
-rw-r--r--Tests/RunCMake/cmake_path/GET-RELATIVE_PART-wrong-path-result.txt (renamed from Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-invalid-output-result.txt)0
-rw-r--r--Tests/RunCMake/cmake_path/GET.cmake12
-rw-r--r--Tests/RunCMake/cmake_path/HAS_ITEM.cmake20
-rw-r--r--Tests/RunCMake/cmake_path/HAS_RELATIVE_PART-invalid-output-result.txt (renamed from Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-wrong-path-result.txt)0
-rw-r--r--Tests/RunCMake/cmake_path/HAS_RELATIVE_PART-missing-output-result.txt (renamed from Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-unexpected-arg-result.txt)0
-rw-r--r--Tests/RunCMake/cmake_path/HAS_RELATIVE_PART-unexpected-arg-result.txt (renamed from Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-missing-output-result.txt)0
-rw-r--r--Tests/RunCMake/cmake_path/HAS_RELATIVE_PART-wrong-path-result.txt (renamed from Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-invalid-output-result.txt)0
-rw-r--r--Tests/RunCMake/cmake_path/RunCMakeTest.cmake16
11 files changed, 24 insertions, 24 deletions
diff --git a/Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-wrong-path-result.txt b/Tests/RunCMake/cmake_path/GET-RELATIVE_PART-invalid-output-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-wrong-path-result.txt
+++ b/Tests/RunCMake/cmake_path/GET-RELATIVE_PART-invalid-output-result.txt
diff --git a/Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/GET-RELATIVE_PART-missing-output-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-unexpected-arg-result.txt
+++ b/Tests/RunCMake/cmake_path/GET-RELATIVE_PART-missing-output-result.txt
diff --git a/Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-missing-output-result.txt b/Tests/RunCMake/cmake_path/GET-RELATIVE_PART-unexpected-arg-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-missing-output-result.txt
+++ b/Tests/RunCMake/cmake_path/GET-RELATIVE_PART-unexpected-arg-result.txt
diff --git a/Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-invalid-output-result.txt b/Tests/RunCMake/cmake_path/GET-RELATIVE_PART-wrong-path-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-invalid-output-result.txt
+++ b/Tests/RunCMake/cmake_path/GET-RELATIVE_PART-wrong-path-result.txt
diff --git a/Tests/RunCMake/cmake_path/GET.cmake b/Tests/RunCMake/cmake_path/GET.cmake
index e68e654..463bc47 100644
--- a/Tests/RunCMake/cmake_path/GET.cmake
+++ b/Tests/RunCMake/cmake_path/GET.cmake
@@ -61,9 +61,9 @@ if (NOT output STREQUAL "cc.ext1")
list (APPEND errors "STEM LAST_ONLY returns bad data: ${output}")
endif()
-cmake_path(GET path RELATIVE_PATH output)
+cmake_path(GET path RELATIVE_PART output)
if (NOT output STREQUAL "aa/bb/cc.ext1.ext2")
- list (APPEND errors "RELATIVE_PATH returns bad data: ${output}")
+ list (APPEND errors "RELATIVE_PART returns bad data: ${output}")
endif()
cmake_path(GET path PARENT_PATH output)
@@ -112,9 +112,9 @@ if (NOT output STREQUAL "")
list (APPEND errors "STEM returns bad data: ${output}")
endif()
-cmake_path(GET path RELATIVE_PATH output)
+cmake_path(GET path RELATIVE_PART output)
if (NOT output STREQUAL path)
- list (APPEND errors "RELATIVE_PATH returns bad data: ${output}")
+ list (APPEND errors "RELATIVE_PART returns bad data: ${output}")
endif()
cmake_path(GET path PARENT_PATH output)
@@ -173,9 +173,9 @@ if (NOT output STREQUAL "")
list (APPEND errors "STEM returns bad data: ${output}")
endif()
-cmake_path(GET path RELATIVE_PATH output)
+cmake_path(GET path RELATIVE_PART output)
if (NOT output STREQUAL "")
- list (APPEND errors "RELATIVE_PATH returns bad data: ${output}")
+ list (APPEND errors "RELATIVE_PART returns bad data: ${output}")
endif()
cmake_path(GET path PARENT_PATH output)
diff --git a/Tests/RunCMake/cmake_path/HAS_ITEM.cmake b/Tests/RunCMake/cmake_path/HAS_ITEM.cmake
index eb73bd5..e76776c 100644
--- a/Tests/RunCMake/cmake_path/HAS_ITEM.cmake
+++ b/Tests/RunCMake/cmake_path/HAS_ITEM.cmake
@@ -96,14 +96,14 @@ if (output)
endif()
set (path "/a/b")
-cmake_path(HAS_RELATIVE_PATH path output)
+cmake_path(HAS_RELATIVE_PART path output)
if (NOT output)
- list (APPEND errors "RELATIVE_PATH: ${path} does not have relative path")
+ list (APPEND errors "RELATIVE_PART: ${path} does not have relative part")
endif()
set (path "/")
-cmake_path(HAS_RELATIVE_PATH path output)
+cmake_path(HAS_RELATIVE_PART path output)
if (output)
- list (APPEND errors "RELATIVE_PATH: ${path} has relative path")
+ list (APPEND errors "RELATIVE_PART: ${path} has relative part")
endif()
set (path "/a/b")
@@ -180,21 +180,21 @@ if (WIN32)
endif()
set (path "c:/a/b")
- cmake_path(HAS_RELATIVE_PATH path output)
+ cmake_path(HAS_RELATIVE_PART path output)
if (NOT output)
- list (APPEND errors "RELATIVE_PATH: ${path} does not have relative path")
+ list (APPEND errors "RELATIVE_PART: ${path} does not have relative part")
endif()
set (path "c:a/b")
- cmake_path(HAS_RELATIVE_PATH path output)
+ cmake_path(HAS_RELATIVE_PART path output)
if (NOT output)
- list (APPEND errors "RELATIVE_PATH: ${path} does not have relative path")
+ list (APPEND errors "RELATIVE_PART: ${path} does not have relative part")
endif()
set (path "//host/b")
- cmake_path(HAS_RELATIVE_PATH path output)
+ cmake_path(HAS_RELATIVE_PART path output)
if (NOT output)
- list (APPEND errors "RELATIVE_PATH: ${path} does not have relative path")
+ list (APPEND errors "RELATIVE_PART: ${path} does not have relative part")
endif()
set (path "c:/a/b")
diff --git a/Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-wrong-path-result.txt b/Tests/RunCMake/cmake_path/HAS_RELATIVE_PART-invalid-output-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-wrong-path-result.txt
+++ b/Tests/RunCMake/cmake_path/HAS_RELATIVE_PART-invalid-output-result.txt
diff --git a/Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/HAS_RELATIVE_PART-missing-output-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-unexpected-arg-result.txt
+++ b/Tests/RunCMake/cmake_path/HAS_RELATIVE_PART-missing-output-result.txt
diff --git a/Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-missing-output-result.txt b/Tests/RunCMake/cmake_path/HAS_RELATIVE_PART-unexpected-arg-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-missing-output-result.txt
+++ b/Tests/RunCMake/cmake_path/HAS_RELATIVE_PART-unexpected-arg-result.txt
diff --git a/Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-invalid-output-result.txt b/Tests/RunCMake/cmake_path/HAS_RELATIVE_PART-wrong-path-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-invalid-output-result.txt
+++ b/Tests/RunCMake/cmake_path/HAS_RELATIVE_PART-wrong-path-result.txt
diff --git a/Tests/RunCMake/cmake_path/RunCMakeTest.cmake b/Tests/RunCMake/cmake_path/RunCMakeTest.cmake
index 4edfb1a..991f46b 100644
--- a/Tests/RunCMake/cmake_path/RunCMakeTest.cmake
+++ b/Tests/RunCMake/cmake_path/RunCMakeTest.cmake
@@ -7,7 +7,7 @@ set (RunCMake-stderr-file "wrong-path-stderr.txt")
### GET sub-command
foreach (subcommand IN ITEMS ROOT_NAME ROOT_DIRECTORY ROOT_PATH FILENAME EXTENSION
- STEM RELATIVE_PATH PARENT_PATH)
+ STEM RELATIVE_PART PARENT_PATH)
run_cmake_command (GET-${subcommand}-wrong-path "${CMAKE_COMMAND}" "-DCMAKE_PATH_ARGUMENTS=GET wrong_path ${subcommand} output" -P "${RunCMake_SOURCE_DIR}/call-cmake_path.cmake")
endforeach()
@@ -20,7 +20,7 @@ endforeach()
foreach (command IN ITEMS NATIVE_PATH
HAS_ROOT_NAME HAS_ROOT_DIRECTORY HAS_ROOT_PATH
HAS_FILENAME HAS_EXTENSION HAS_STEM
- HAS_RELATIVE_PATH HAS_PARENT_PATH
+ HAS_RELATIVE_PART HAS_PARENT_PATH
IS_ABSOLUTE IS_RELATIVE IS_PREFIX HASH)
if (command STREQUAL "IS_PREFIX")
set (extra_args path2)
@@ -36,7 +36,7 @@ set (RunCMake-stderr-file "missing-output-stderr.txt")
### GET sub-command
foreach (subcommand IN ITEMS ROOT_NAME ROOT_DIRECTORY ROOT_PATH FILENAME EXTENSION
- STEM RELATIVE_PATH PARENT_PATH)
+ STEM RELATIVE_PART PARENT_PATH)
run_cmake_command (GET-${subcommand}-missing-output "${CMAKE_COMMAND}" "-DCMAKE_PATH_ARGUMENTS=GET path ${subcommand}" -P "${RunCMake_SOURCE_DIR}/call-cmake_path.cmake")
endforeach()
@@ -53,7 +53,7 @@ endforeach()
foreach (command IN ITEMS SET NATIVE_PATH
HAS_ROOT_NAME HAS_ROOT_DIRECTORY HAS_ROOT_PATH
HAS_FILENAME HAS_EXTENSION HAS_STEM
- HAS_RELATIVE_PATH HAS_PARENT_PATH
+ HAS_RELATIVE_PART HAS_PARENT_PATH
IS_ABSOLUTE IS_RELATIVE IS_PREFIX HASH)
if (command STREQUAL "IS_PREFIX")
set (extra_args path2)
@@ -79,7 +79,7 @@ set (RunCMake-stderr-file "invalid-output-var-stderr.txt")
### GET sub-command
foreach (subcommand IN ITEMS ROOT_NAME ROOT_DIRECTORY ROOT_PATH FILENAME EXTENSION
- STEM RELATIVE_PATH PARENT_PATH)
+ STEM RELATIVE_PART PARENT_PATH)
run_cmake_command (GET-${subcommand}-invalid-output "${CMAKE_COMMAND}" "-DCMAKE_PATH_ARGUMENTS=GET path ${subcommand}" -DCHECK_INVALID_OUTPUT=ON -P "${RunCMake_SOURCE_DIR}/call-cmake_path.cmake")
endforeach()
@@ -96,7 +96,7 @@ endforeach()
foreach (command IN ITEMS NATIVE_PATH
HAS_ROOT_NAME HAS_ROOT_DIRECTORY HAS_ROOT_PATH
HAS_FILENAME HAS_EXTENSION HAS_STEM
- HAS_RELATIVE_PATH HAS_PARENT_PATH
+ HAS_RELATIVE_PART HAS_PARENT_PATH
IS_ABSOLUTE IS_RELATIVE IS_PREFIX HASH)
if (command STREQUAL "IS_PREFIX")
set (extra_args path2)
@@ -118,7 +118,7 @@ set (RunCMake-stderr-file "unexpected-arg-stderr.txt")
### GET sub-command
foreach (subcommand IN ITEMS ROOT_NAME ROOT_DIRECTORY ROOT_PATH FILENAME EXTENSION
- STEM RELATIVE_PATH PARENT_PATH)
+ STEM RELATIVE_PART PARENT_PATH)
if (subcommand STREQUAL "EXTENSION" OR subcommand STREQUAL "STEM")
set (extra_args LAST_ONLY)
else()
@@ -146,7 +146,7 @@ endforeach()
foreach (command IN ITEMS SET NATIVE_PATH
HAS_ROOT_NAME HAS_ROOT_DIRECTORY HAS_ROOT_PATH
HAS_FILENAME HAS_EXTENSION HAS_STEM
- HAS_RELATIVE_PATH HAS_PARENT_PATH
+ HAS_RELATIVE_PART HAS_PARENT_PATH
IS_ABSOLUTE IS_RELATIVE IS_PREFIX
HASH)
if (command STREQUAL "IS_PREFIX")