| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| |
| |
| |
| |
| | |
57cedb18c0 cmSystemTools: std::string parameters for tar functions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3392
|
| | |
|
|\ \
| |/
|/|
| |
| |
| |
| | |
53cb1f2d04 cmake: Teach cmake -E tar command, Zstandard compression
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3357
|
| |
| |
| |
| | |
Fixes #18657
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
c8e217e0a7 cmake: tar: Allow selective extracting and listing of archives
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3342
|
| | | |
|
|/ / |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
e884b1b693 cmSystemTools::Error(): remove const char* overload
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3360
|
| |/ |
|
|/
|
|
|
| |
This removes the C style cmSystemToolsFileTime interface in cmSystemTools.
It was replaced by the RAII based cmFileTimes class.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes
-------
In `cmSystemTools` this
- renames the method `ExpandList` to `ExpandLists` and makes it iterator based
and adds the methods
- `std::vector<std::string> ExpandedLists(InputIt first, InputIt last)`
- `std::vector<std::string> ExpandedListArgument(const std::string& arg,
bool emptyArgs)`
Both return the `std::vector<std::string>` instead of taking a return vector
reference like `cmSystemTools::ExpandLists` and
`cmSystemTools::ExpandListArgument`.
Motivation
----------
Since C++17 return value optimization is mandatory, so returning a
`std:vector<std::string>` from a function should be (at least) as fast as
passing a return vector reference to the function.
The new methods can replace `cmSystemTools::ExpandLists` and
`cmSystemTools::ExpandListArgument` in many cases, which leads to
shorter and simpler syntax.
E.g. the commonly used pattern
```
if (const char* value = X->GetProperty("A_KEY_STRING")) {
std::vector<std::string> valuesList;
cmSystemTools::ExpandListArgument(value, valuesList);
for (std::string const& i : valuesList) {
doSomething(i);
}
}
```
becomes
```
if (const char* value = X->GetProperty("A_KEY_STRING")) {
for (std::string const& i :
cmSystemTools::ExpandedListArgument(value)) {
doSomething(i);
}
}
```
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On non-Windows platforms libuv assumes that file descriptors 0-2 are
always used for standard pipes and never for anything else. Otherwise,
libuv may re-use one of these descriptors and then fail an assertion
when closing it. Similarly, On Windows platforms our ConsoleBuf
implementation assumes that the standard handles are always open.
If CMake is run with any standard pipes closed, open them with
`/dev/null` or `NUL` to satisfy these assumptions.
Fixes: #19219
|
| |
|
|
|
|
| |
Fixes: #19161
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
b52d9d6960 cmSystemTools: Drop unused CollapseCombinedPath method
a13a5c948e Replace use of CollapseCombinedPath with CollapseFullPath
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sebastian Holtermann <sebholt@xwmw.org>
Merge-request: !3117
|
| |
| |
| |
| |
| |
| |
| | |
All call sites have been converted to `CollapseFullPath`, so the
now-unused `CollapseCombinedPath` can be removed.
Fixes: #19050
|
|/
|
|
|
|
|
|
|
|
|
| |
Rationale:
Currently during creation of archive by 'tar',
if error appears, it interrupt archive creation.
As a result only part of files are archived
This behaviour is not consistent with 'copy_directory', native 'tar'
and other command behaviour.
With this Merge Request this behaviour is fixed.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
b8031308f3 cmRange: Add unit tests
a8d51ef8b7 cmRange: Add functions filter and transform
da4773e8b8 cmRange: Add functions all_of, any_of, none_of
17a367e77f cmRange: Stylistic cleanup
9eb0e73f46 cmRange: Move to dedicated header file
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Artur Ryt <artur.ryt@gmail.com>
Merge-request: !2972
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
9dd255548d cmSystemTools::Error: consolidate parameters into single std::string
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2995
|
| |/ |
|
|/ |
|
|\
| |
| |
| |
| |
| |
| | |
ae5e97a005 Delete some default constructors and assignment operators
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2968
|
| |
| |
| |
| |
| |
| | |
They are unused, but if someone used them they would lead to
problems since they would copy the internal raw pointers
and the destructor would cause double delete
|
|/ |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
01b2d6ab74 Modernize: Use ranged for-loops when possible
15bdbec017 cmAlgorithms: Make cmRange advance/retreat safe for rvalues
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
Merge-request: !2901
|
| |
| |
| |
| |
| |
| |
| | |
Replaced most manual `const_iterator`-based loops and some
reverse-iterator loops with range loops.
Fixes: #18858
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
82edd98300 cmSystemTools: MessageCallback and Message() accept std::string argument
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2929
|
| | | |
|
|\ \ \
| |_|/
|/| |
| | |
| | |
| | |
| | | |
65baaa0e37 cmSystemTools::RunSingleCommand: Accept std::string argument
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2927
|
| |/ |
|
|/
|
|
| |
Changed for sequenced containers: vector, list, string and array
|
|
|
|
|
| |
The `const char*` used formerly was converted to a `std::string`
internally anyway.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
8c92db829b MessageCallback: Remove unused bool& argument
bcee24aecc Use `std::function` for callbacks
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: vvs31415 <vstakhovsky@fastmail.com>
Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
Merge-request: !2872
|
| | |
|
| | |
|
|/
|
|
|
| |
Cleaned up `c_str()`s.
`cmSystemTools::CopyFileIfDifferent()` removed as redundant.
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
9e5c13738b cmSystemTools::RenameFile: Accepts std::string args
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2842
|
| | |
|
|/ |
|
|\
| |
| |
| |
| |
| |
| | |
3132ea801c cmSystemTools: Stdout(),Stderr() accept std::string argument
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2829
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
ef61997b1b clang-tidy: Use emplace
2e5307a2a4 CTestSVN: Accept std::string in SVNInfo constructor
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2811
|
| |/ |
|
| |
| |
| |
| |
| | |
If provided, report errors to a std::string.
This allows "silent" fallback to another flow, like COPY_ON_ERROR.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
This brings the functionality of `cmake -E create_symlink` and more to scripts.
The default behavior is to create hard links.
The `SYMBOLIC` argument can be used to create symlinks instead.
The `COPY_ON_ERROR` argument enables a fallback to copying the file in case the link fails.
The `RESULT <var>` retrieves the error message generated by the system.
It is set to "0" on success.
Fixes: #16926
|