diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2021-01-13 14:27:49 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2021-01-13 14:27:49 (GMT) |
commit | 76f0bcdfb6e04f1f6089ea693d69b642bbf26e82 (patch) | |
tree | 08ee286265df549fac25cee13c2c590135ecfd8c /Source/cmCMakePath.cxx | |
parent | 3ad1ee81445d4ce4388bcde7222a676725aebcd6 (diff) | |
download | CMake-76f0bcdfb6e04f1f6089ea693d69b642bbf26e82.zip CMake-76f0bcdfb6e04f1f6089ea693d69b642bbf26e82.tar.gz CMake-76f0bcdfb6e04f1f6089ea693d69b642bbf26e82.tar.bz2 |
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)
Diffstat (limited to 'Source/cmCMakePath.cxx')
-rw-r--r-- | Source/cmCMakePath.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmCMakePath.cxx b/Source/cmCMakePath.cxx index b8215df..73321c6 100644 --- a/Source/cmCMakePath.cxx +++ b/Source/cmCMakePath.cxx @@ -88,7 +88,8 @@ bool cmCMakePath::IsPrefix(const cmCMakePath& path) const ++prefix_it; ++path_it; } - return prefix_it == prefix_end; + return (prefix_it == prefix_end) || + (prefix_it->empty() && path_it != path_end); } std::string cmCMakePath::FormatPath(std::string path, format fmt) |