| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
On Windows, a file may be inaccessible for a short time after it is
created. This occurs for various reasons, including indexing, antivirus
tools, and NTFS's asynchronous semantics. Add an `INPUT_MAY_BE_RECENT`
option to tell CMake that the input file may have been recently created
so that we can retry a few times to read it.
|
| |
|
|
|
|
| |
Offer variants that let the caller handle error messages.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a cross-platform wrapper over mkdtemp. This will allow us to create
guaranteed-unique directories. On POSIX platforms, this is simply a
wrapper over mkdtemp. On Windows, we take a brute-force approach using
C++11's random facilities and relying on attempts to create an existing
directory resulting in an error. (This approach is very possibly how
mkdtemp is implemented internally, and should be suitable for any
platform if needed, although at present it only uses a partial set of
substitution characters since Windows likely implies a case-insensitive
file system.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When `cmake -E env` is given the `--modify` flag, try to parse the
following argument as an `ENVIRONMENT_MODIFICATION` operation and apply
it to the environment.
This generalizes `--unset=`:
1. When implementing `ENVIRONMENT_MODIFICATION` features for other CMake
commands, the `MYVAR=OP:VALUE` strings do not need to be translated
to OP-specific flags.
2. This provides a natural and consistent extension point to introduce
new operations without introducing very many flags.
3. Users need to learn only one syntax to access the same functionality.
There is one difference between the behavior here as compared to CTest's
interpretation of the `ENVIRONMENT_MODIFICATION` test property.
The `MYVAR=reset:` command when run in `cmake -E env` will reset `MYVAR`
to whatever its value was when `cmake -E env` launched, rather than try
to checkpoint after plain `MYVAR=VALUE` options. This makes `MYVAR=VALUE`
and `--modify MYVAR=set:VALUE` semantically equivalent.
|
|
|
|
|
|
|
|
| |
Going through the same internal API for both `ENVIRONMENT` and
`ENVIRONMENT_MODIFICATION` properties will make it easier to implement
checkpointing for `MYVAR=reset:` more efficiently if the need ever
presents itself. It also makes the two-stage nature of the environment
mutation clearer in the code itself.
|
|
|
|
| |
Prepare to re-use this logic when enhancing `cmake -E env`.
|
|
|
|
| |
Factor the implementation out of `cmGlobalGenerator`.
|
|
|
|
|
|
|
|
| |
Rename the booleans 's_ErrorOccured' and 's_FatalErrorOccured' to
's_ErrorOccurred' and 's_FatalErrorOccurred', respectively.
Rename the getters and setters to 'Get[Fatal]ErrorOccurred' and
'Set[Fatal]ErrorOccurred', and fix all uses across the codebase.
|
|
|
|
| |
Fixes: #23282
|
|
|
|
|
|
|
|
| |
Similar to GNU tar add a --touch option to the tar extract command to
skip extracting the timestamps from the files in the archive
effectively touching them as if they were just created.
Issue: #22746
|
|
|
|
| |
Convert runtime error messages into compile-time errors.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This returns a relative path if it does not start in `../`.
|
| |
|
| |
|
|
|
|
|
|
| |
KWSys as of 2021-04-14 changed the return type of `SystemTools`
operations from `bool` to `Status`. Update our call sites.
This may improve error reporting accuracy in a few places.
|
|
|
|
| |
And use it for CMAKE_HOST_SYSTEM_NAME and CMAKE_SYSTEM_NAME.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
And switch the ordering of "Help" and "About".
|
|
|
|
| |
Fixes: #21125
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
#pragma once is a widely supported compiler pragma, even though it is
not part of the C++ standard. Many of the issues keeping #pragma once
from being standardized (distributed filesystems, build farms, hard
links, etc.) do not apply to CMake - it is easy to build CMake on a
single machine. CMake also does not install any header files which can
be consumed by other projects (though cmCPluginAPI.h has been
deliberately omitted from this conversion in case anyone is still using
it.) Finally, #pragma once has been required to build CMake since at
least August 2017 (7f29bbe6 enabled server mode unconditionally, which
had been using #pragma once since September 2016 (b13d3e0d)). The fact
that we now require C++11 filters out old compilers, and it is unlikely
that there is a compiler which supports C++11 but does not support
#pragma once.
|
|
|
|
| |
Inspired-by: Ron W Moore <webbtrail@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In commit dd8365b3f1 (Merge branch 'upstream-KWSys' into update-kwsys,
2020-04-06, v3.18.0-rc1~397^2) we imported KWSys commit `019afb6ea`
(SystemTools: Drop GetCurrentWorkingDirectory 'collapse' argument,
2020-04-03). That caused `GetCurrentWorkingDirectory` to no longer send
paths through the KWSys translation map and broke CMake's detection of
the absolute path to a build directory containing a symbolic link.
Add our own `cmSystemTools::GetCurrentWorkingDirectory` wrapper around
the KWSys method in order to restore that mapping.
Test-case-by: Ben Boeckel <ben.boeckel@kitware.com>
Issue: #16228
Fixes: #20900
|
|
|
|
|
| |
Run the `clang-format.bash` script to update our C and C++ code to a new
include order `.clang-format`. Use `clang-format` version 6.0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provide a standardized way to handle the C++ "standard" headers
customized to be used with current CMake C++ standard constraints.
Offer under directory `cm` headers which can be used as direct
replacements of the standard ones. For example:
#include <cm/string_view>
can be used safely for CMake development in place of the `<string_view>`
standard header.
Fixes: #19491
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The removes the following methods from cmSystemTools:
- `IsInternallyOn`
- `IsNOTFOUND`
- `IsOn`
- `IsOff`
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
2f6495e24e cmSystemTools: Remove ExpandListArgument methods
f4f3c68926 Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgument
ff42dec891 cmStringAlgorithms: Add cmExpandList functions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3682
|
| | |
|
| | |
|
|\ \
| |/
|/|
| |
| |
| |
| | |
935fbe0b04 cmStringAlgorithms: Add cmStrToLong and cmStrToULong
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3681
|
| |
| |
| |
| |
| |
| |
| |
| | |
This adds the following functions to cmStringAlgorithms:
- `cmStrToLong`: moved from `cmSystemTools::StringToLong`
- `cmStrToULong`: moved from `cmSystemTools::StringToULong`
Overloads of the given functions for `std::string` are added as well.
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
This adds the following functions to `cmStringAlgorithms`:
- `cmIsSpace`
- `cmTrimWhitespace` (moved from `cmSystemTools::TrimWhitespace`)
- `cmEscapeQuotes` (moved from `cmSystemTools::EscapeQuotes`)
- `cmTokenize` (moved from `cmSystemTools::tokenize` and adapted to
accept `cm::string_view`)
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
bd2793b6e9 Help: Add documentation for INSTALL_REMOVE_ENVIROMENT_RPATH
f08dcbffec Property: Add INSTALL_REMOVE_ENVIROMENT_RPATH property
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3544
|
| | |
|
|/ |
|