- Feb 06, 2025
-
-
Nikita Nemkin authored
Collapse repeated slashes, but preserve exactly two leading slashes. POSIX reserves exactly two leading slashes for implementation-defined behavior. On Windows and Cygwin they mark UNC paths. Improve test coverage of ConvertToUnixSlashes. Issue: cmake/cmake#9182
-
- Jan 30, 2025
-
-
08b9f90d Use lower case style for CMake commands Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !323
-
- Jan 29, 2025
-
-
8142980e Process: Revert "Add function to get parent PID" a298a4aa Process: Suppress PID conversion warning Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !324
-
Brad King authored
-
- Jan 28, 2025
-
-
Peter Kokot authored
-
9727dfdb ProcessUNIX: Add function to get parent PID fda58f27 Process.h.in: Add missing undef for Process_KillPID Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !322
-
3489e4a2 Encoding: Reformulate to avoid unsigned int overflow Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !320
-
c8f5f4bf RegularExpression: Add an options parameter to find() d022423b RegularExpression: Add a method to query the number of capture groups 46fc21ef RegularExpression: Remove redundant overloads Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !321
-
- Jan 27, 2025
-
-
Martin Duffy authored
-
Martin Duffy authored
-
Nikita Nemkin authored
There are two options: * BOL_AT_OFFSET enables matching the "^" anchor at the search start position instead of the input start. This is the legacy CMake behavior. * NONEMPTY_AT_OFFSET rejects empty matches at the search start position. This is used to allow zero-length matches when searching for multiple match occurrences. Issue: cmake/cmake#26629
-
Nikita Nemkin authored
This can be used to check for invalid (too high) group references. Issue: cmake/cmake#26629
-
Nikita Nemkin authored
This also makes RegexMatchResult::start/end to reliably report npos for failed matches. Note that start/end of individual capture groups might still contain data even if the match has failed overall. Issue: cmake/cmake#26629
-
Playing with clang UBSan unsigned-integer-overflow I found just 2 warnings in KWSys. They are not undefined behaviour, but often unintentional. A reformulation to avoid the overflow was pretty straightforward. Also noticed and changed `&v[0]` idiom to `v.data()`.
-
0359bfbc RegularExpression: Fix match start/end values of unmatched groups 98452164 RegularExpression: Add an optional offset parameter to find() Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !317
-
- Jan 24, 2025
-
-
CMake assumes that Match::start(n) and end(n) return npos for unmatched groups. Make it so and prevent undefined behavior (pointer overflow). Issue: cmake/cmake#16899
-
Separating the search start position from the input start is necessary to correctly implement the "^" anchor when searching for multiple matches in the same string. Issue: cmake/cmake#16899
-
7dec9555 Revise C++ coding style using clang-format with "east const" ac2b3378 Empty commit at end of history preceding clang-format "east const" transition a234f2ff clang-format: Enforce "east const" qualifier placement 7a19509c Revise C++ coding style using clang-format-18 6da5c6ac Empty commit at end of history preceding clang-format-18 style transition a42b7759 clang-format.bash: update to clang-format-18 Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !319
-
4a126278 clang-format.bash: Preserve CRLF line endings on Windows Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !318
-
- Jan 23, 2025
-
-
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.
-
Brad King authored
This is an empty commit that precedes an automatic application of clang-format with "east const" to update the C++ style of our entire source tree. This may be helpful to rebase a topic branch that was originally based on a commit preceding the transition. One may first rebase the topic on this commit. Then use one of the following approaches. * Rewrite the topic, including this commit, using `git filter-branch` `--tree-filter` with `clang-format.bash` to update the style in every commit. Rebase the revised topic, excluding the rewrite of this commit, on the style transition commit. OR * Add a `.git/info/grafts` entry to change the parent of the first commit in the topic from this commit to the style transition commit. Rewrite the topic using `git filter-branch --tree-filter` with `clang-format.bash` to update the style in every commit. Then remove the graft, which was resolved by the filter. See `git help filter-branch` and `git help repository-layout` for details.
-
Brad King authored
-
Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. 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.
-
Brad King authored
This is an empty commit that precedes an automatic application of clang-format-18 to update the C++ style of our entire source tree. This may be helpful to rebase a topic branch that was originally based on a commit preceding the transition. One may first rebase the topic on this commit. Then use one of the following approaches. * Rewrite the topic, including this commit, using `git filter-branch` `--tree-filter` with `clang-format.bash` to update the style in every commit. Rebase the revised topic, excluding the rewrite of this commit, on the style transition commit. OR * Add a `.git/info/grafts` entry to change the parent of the first commit in the topic from this commit to the style transition commit. Rewrite the topic using `git filter-branch --tree-filter` with `clang-format.bash` to update the style in every commit. Then remove the graft, which was resolved by the filter. See `git help filter-branch` and `git help repository-layout` for details.
-
Brad King authored
The `.clang-format` configuration needs no changes to make the version 18 format close to what version 15 produced before.
-
Nikita Nemkin authored
Use the binary mode of GNU sed.
-
- Jan 22, 2025
-
-
e1aeb61e SystemInformation: Fix GetNumberOfLogicalCPU on s390x Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !316
-
- Jan 21, 2025
-
-
The format of `/proc/cpuinfo` is different on `s390x` than other architectures. Issue: cmake/cmake#26619
-
- Jan 16, 2025
-
-
2926bae9 SystemTools: Fix CloneFileContent copy-on-write on macOS / APFS Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !315
-
- Jan 15, 2025
-
-
`SystemTools::CloneFileContent()` attempts to clone a file using the underlying filesystem’s copy-on-write features. The call to macOS’s copyfile() was changed to not use COPYFILE_CLONE some time back due to it following symlinks - which was not desired. Unfortunately (and the manpage for copyfile() really doesn’t make this clear) this disables cloning all together. Go back to using `COPYFILE_CLONE`, but explicitly check for symlinks. Additionally, add the `COPYFILE_UNLINK` flag. This fixes a second bug in the existing implementation - existing files were not overwritten on macOS which is inconsistent with the Linux implementation which explicitly removes them, as well as calling `open()` with `O_CREAT`. In effect this meant that progressively, previously cloned files become de-cloned from their source as the built-in blockwise copy gets used instead. Rewrite the method comments which don't seem to have been updated since the macOS implementation was added. The function itself is not especially well named anymore. Verified cloning works using this tool: * https://github.com/dyorgio/apfs-clone-checker See also: * https://wadetregaskis.com/copy-on-write-on-apfs/
-
- Dec 12, 2024
-
-
62ad438e Glob: Use case-insensitive matching on CYGWIN Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !314
-
Brad King authored
CYGWIN is implemented on top of Windows, so the filesystem is not case sensitive.
-
- Nov 30, 2024
-
-
967b2120 Remove legacy unused IMMEDIATE CMake keyword Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !313
-
- Nov 28, 2024
-
-
Peter Kokot authored
This was once supported in CMake 2.x and in current 3.x versions is ignored.
-
- Nov 23, 2024
-
-
5995fd7d SystemInformation: Ignore stderr from OS query tools Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !312
-
- Nov 22, 2024
-
-
Brad King authored
On macOS, `sw_vers` may print to `stderr` based on environment variables like `MallocGuardEdges=1`. Do not capture that as part of the information it prints to `stdout`. Issue: cmake/cmake#26466
-
- Nov 06, 2024
-
-
30e9db2d SystemTools: Drop GetActualCaseForPathCached Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !311
-
- Nov 05, 2024
-
-
Brad King authored
It was added temporarily for CMake, which no longer needs it.
-
- Nov 04, 2024
-
-
47dce1a3 SystemTools: Remove path translation map 20b2c992 SystemTools: Remove unused global object Acked-by:
Kitware Robot <kwrobot@kitware.com> Reviewed-by:
Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !310
-