mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 07:08:38 -05:00
cmake_path: various updates
To follow discussions in #21385 and !5682: * Fix bug in cmCMakePath::IsSuffix() method * cmake_path(HASH) always normalized paths (NORMALIZE option removed)
This commit is contained in:
@@ -14,11 +14,6 @@ set (path1 "a///b/c/../d")
|
||||
cmake_path(HASH path1 hash1)
|
||||
set (path2 "a/b////d")
|
||||
cmake_path(HASH path2 hash2)
|
||||
if (hash1 STREQUAL hash2)
|
||||
list (APPEND errors "'hash values equal for '${path1}' and '${path2}'")
|
||||
endif()
|
||||
cmake_path(HASH path1 hash1 NORMALIZE)
|
||||
cmake_path(HASH path2 NORMALIZE hash2)
|
||||
if (NOT hash1 STREQUAL hash2)
|
||||
list (APPEND errors "'hash values not equal for '${path1}' and '${path2}'")
|
||||
endif()
|
||||
|
||||
@@ -18,5 +18,10 @@ if (NOT output)
|
||||
list (APPEND errors "'${path} is not prefix of 'a/b/d/e'")
|
||||
endif()
|
||||
|
||||
set(path "/a/b/..")
|
||||
cmake_path(IS_PREFIX path "/a/c/../b" NORMALIZE output)
|
||||
if (NOT output)
|
||||
list (APPEND errors "'${path} is not prefix of '/a/c/../b'")
|
||||
endif()
|
||||
|
||||
check_errors (IS_PREFIX ${errors})
|
||||
|
||||
Reference in New Issue
Block a user