Commit Graph

5 Commits

Author SHA1 Message Date
Kitware Robot
0b96ae1f6a Revise C++ coding style using clang-format with "east const"
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`, now with "east const" enforcement.
Use `clang-format` version 18.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.

Issue: #26123
2025-01-23 13:09:50 -05:00
FeRD (Frank Dana)
b0be1bd9ca cmake_path: Fix 'GET "foo/.." STEM' result
`cmake_path(GET "foo/.." STEM out)` is supposed to set `out` to `".."`,
the entire `cmake_path(GET "foo/.." FILENAME)` result.

However, the `GetNarrowStem()` logic in `cmCMakePath` was lacking
the `.` and `..` special-casing logic present in other methods.
As a result, it would erroneously trim the second `.` off of a stem
of `..` and return only `.`.

This caused the result of `cmake_path(GET "foo/.." STEM)` to be `"."`.

Making the standard empty-or-.-or-.. checks and bailing out early
fixes the result of `cmCMakePaths{".."}.GetNarrowStem()`.

Fixes: #26235
2024-08-26 09:55:57 -04:00
Marc Chevrier
945b9b8132 cmCMakePath: workarounds for Sunpro/sparc compiler 2023-07-18 11:50:07 -04:00
Marc Chevrier
76f0bcdfb6 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)
2021-01-13 15:27:49 +01:00
Marc Chevrier
212e953d35 cmCMakePath: Class for path handling 2020-09-06 10:34:17 +02:00