| 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
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| |
|
|
|
|
|
| |
In various places `///!` was used to start a comment line. This is not valid
Doygen syntax. This patch replaces `///!` comment starts with `//!`.
|
|\
| |
| |
| |
| |
| |
| | |
ea9a2c1759 cmake: tar: Parse 'cmake -E tar' arguments
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3081
|
| | |
|
|/
|
|
|
|
|
| |
All call sites have been converted to `CollapseFullPath`, so the
now-unused `CollapseCombinedPath` can be removed.
Fixes: #19050
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
82edd98300 cmSystemTools: MessageCallback and Message() accept std::string argument
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2929
|
| | |
|
|/ |
|
|
|
|
|
| |
The `const char*` used formerly was converted to a `std::string`
internally anyway.
|
|\
| |
| |
| |
| |
| |
| |
| | |
1180fc8780 OutputCallback: Accept std::string argument
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: vvs31415 <vstakhovsky@fastmail.com>
Merge-request: !2891
|
| | |
|
|\ \
| |/
|/|
| |
| |
| |
| |
| | |
b05b778a2d clang-tidy: Use `= delete`
Acked-by: Kitware Robot <kwrobot@kitware.com>
Rejected-by: vvs31415 <vstakhovsky@fastmail.com>
Merge-request: !2848
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
|
| |
| |
| |
| |
| | |
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
|
| |
|
|
|
|
|
|
|
| |
Factor a URL encoding implementation out of CTest.
Add an option to not escape slashes.
Suggested-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The allows `-E create_symlink` to work on Windows. It utilizes
`uv_fs_symlink`. I am still unsure exactly which Windows platforms will
work without requiring Administrator privileges or needing a user/group
with the "Create Symbolic Links" User Rights. It does work with my
Windows 10 Pro with Developer Mode turned on. In the test suite check
that the symlink either worked or failed with a permissions error.
Use recent changes in cmSystemTools::FileExists to check that a symlink
is broken.
|
| |
|
|
|
|
| |
Found via `codespell` and `grep`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The use of `uv_fs_realpath` introduced by commit v3.11.0-rc1~445^2~1
(cmSystemTools: Implement GetRealPath on Windows, 2017-10-02) causes
`subst` drives to be expanded on Windows, breaking existing use cases.
Revert its use until an alternative implementation can be chosen.
Preserve the behavior introduced by commit v3.11.0-rc1~445^2
(cmTimestamp: For symlinks switch to timestamp of resolved path,
2017-10-02) by retaining use of `uv_fs_realpath` in a function of
a different name.
Fixes: #18033
Issue: #17206
|
|
|
|
|
|
|
|
|
|
| |
* Change some functions to take `std::string` instead of
`const char*` in the following classes: `cmMakeFile`, `cmake`,
`cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator`
and a few others.
* Greatly reduce using of `const char*` overloads for
`cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`.
* Remove many redundant `c_str()` conversions throughout the code.
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
e6a80ccf Make use of std::chrono throughout every component
ff62b005 CTest: add safe conversion from cmDuration to integer types
695951bc CTest: introduce cmDuration
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1592
|
| |
| |
| |
| |
| |
| |
| |
| | |
This commit continues the changes made in CTest to support std::chrono
by
applying it throughout every component where a duration was used.
No functional change intended.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since libuv commit v1.14.1~7 (win: add uv__once_init() calls,
2017-08-30) the libuv initialization of the file translate mode may take
place even if we do not use a uv loop. This change was included in our
libuv update commit f4a26c748b (libuv 2018-01-19). Therefore use of
libuv even through `cmSystemTools::GetRealPath` in any executable may
trigger its file translate mode setting.
Factor out the logic added to `cmake.exe` by commit v3.9.0-rc4~10^2
(cmake: Fix default file translate mode when using libuv, 2017-06-13)
and re-use to initialize all executables.
Issue: #16962
|
|\
| |
| |
| |
| |
| |
| |
| | |
81868e6b CUDA: Add cu as default source file extension
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !1629
|
| | |
|