| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
All event kinds have these fields, so centralize their implementation.
|
|
|
|
|
|
|
|
| |
Many `try_compile` and `try_run` calls occur inside check modules
between `message(CHECK_START)` and `message(CHECK_{PASS,FAIL})` pairs.
Add a field to configure log entries to report this context.
Issue: #23200
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Since commit aa9220d3a0 (try_compile: Add keyword-dispatched signature,
2022-09-02, v3.25.0-rc1~178^2) the `DoNotRunExecutable` code path may be
reached with no single source-file argument. Do not assume it exists.
Fixes: #24295
|
| |
| |
| |
| |
| |
| |
| | |
Since commit 048a02d5bb (ConfigureLog: Log try_compile and try_run
checks, 2022-11-23) we always capture the stdout/stderr for logging.
When cross-compiling, do not require `__TRYRUN_OUTPUT_STD{OUT,ERR}`
variables to be populated just for the logging.
|
| |
| |
| |
| |
| |
| |
| | |
Provide clients with a way to get a known set of configure log event
versions.
Issue: #23200
|
| |
| |
| |
| |
| |
| |
| |
| | |
In order to support multiple log versions without buffering the
entire log, move versioning to the level of individual events.
Multiple versions of an event may then be logged consecutively.
Issue: #23200
|
| |
| |
| |
| |
| |
| | |
Add configure log events for `try_compile` and `try_run` results.
Issue: #23200
|
| | |
|
|/
|
|
|
|
| |
Update the `TryCompileCode` signature to allow callers to distinguish
between administrative failures and a compilation failure. Return
results in a structure to which more information can be added later.
|
|
|
|
|
|
|
| |
Add NO_CACHE option to try_compile and try_run, which places the results
in regular, rather than cache, variables.
Issue: #22799
|
|
|
|
|
| |
Tweak try_compile and try_run to give a more informative error (rather
than "unknown error") when given an insufficient number of arguments.
|
| |
|
|
|
|
|
| |
This is specific to `try_compile` since `try_run` always needs an
executable. Move the logic out of the common code path.
|
|
|
|
| |
The return value is only used as a boolean, so use `bool`.
|
|
|
|
| |
Convert the command entry points to free functions.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes: #17634
|
| |
|
| |
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This replaces the code pattern
```
std::vector<std::string> args;
cmExpandList(valueStr, args, ...)
```
with
```
std::vector<std::string> args = cmExpandedList(valueStr, ...)
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is generated by a python script that uses regular expressions to
search for string concatenation patterns of the kind
```
std::string str = <ARG0>;
str += <ARG1>;
str += <ARG2>;
...
```
and replaces them with a single `cmStrCat` call
```
std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...);
```
If any `<ARGX>` is itself a concatenated string of the kind
```
a + b + c + ...;
```
then `<ARGX>` is split into multiple arguments for the `cmStrCat` call.
If there's a sequence of literals in the `<ARGX>`, then all literals in the
sequence are concatenated and merged into a single literal argument for
the `cmStrCat` call.
Single character strings are converted to single char arguments for
the `cmStrCat` call.
`std::to_string(...)` wrappings are removed from `cmStrCat` arguments,
because it supports numeric types as well as string types.
`arg.substr(x)` arguments to `cmStrCat` are replaced with
`cm::string_view(arg).substr(x)`
|
|
|
|
| |
While at it change some single character additions to be of type char.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes `cmMakefile::AddDefinition` to take a `cm::string_view` as value
argument instead of a `const char *`.
Benefits are:
- `std::string` can be passed to `cmMakefile::AddDefinition` directly without
the `c_str()` plus string length recomputation fallback.
- Lengths of literals passed to `cmMakefile::AddDefinition` can be computed at
compile time.
In various sources uses of `cmMakefile::AddDefinition` are adapted to avoid
`std::string::c_str` calls and the `std::string` is passed directly.
Uses of `cmMakefile::AddDefinition`, where a `nullptr` `const char*` might
be passed to `cmMakefile::AddDefinition` are extended with `nullptr` checks.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
|/ |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/ |
|
|\
| |
| |
| |
| |
| |
| |
| | |
3e867ed400 cmake: inlined files dir constant and removed it from cmake.h
Acked-by: Kitware Robot <kwrobot@kitware.com>
Rejected-by: vvs31415 <vstakhovsky@fastmail.com>
Merge-request: !2655
|
| | |
|
| | |
|
|/ |
|
|
|
|
| |
Reduce the number of files relying on `cmake.h`.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|