| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| | |
d25a5a7ec9 clang-tidy: modernize-use-auto
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3783
|
| |
| |
| |
| |
| |
| | |
Set the MinTypeNameLength option to an impossibly high value in order
to limit the diagnostics to iterators. Leave new expressions and cast
expressions for later.
|
|/
|
|
|
|
|
| |
Setting the GENERATED property of outputs upfront is a precondition for delayed
custom command creation (generator expressions in outputs).
Issue: 12877
|
|
|
|
|
|
|
|
| |
Automate the conversion with
perl -i -0pe 's/typedef ([^;]*) ([^ ]+);/using $2 = $1;/g'
then manually fix a few places.
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
10507c6dc0 cmMakefile: Add configurations getter with empty configuration default
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3759
|
| | |
|
|/
|
|
| |
Rename mutating GetFullPath() overload to ResolveFullPath().
|
|\
| |
| |
| |
| |
| |
| | |
3b2b02825d Source sweep: Replace std::ostringstream when used with a single append
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3726
|
| |
| |
| |
| |
| |
| |
| | |
This replaces `std::ostringstream`, when it is written to only once.
If the single written argument was numeric, `std::to_string` is used instead.
Otherwise, the single written argument is used directly instead of the
`std::ostringstream::str()` invocation.
|
|/
|
|
|
|
|
|
|
|
|
|
| |
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)`
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
2dfc52675c cmAlgorithms: Add cmContains
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sebastian Holtermann <sebholt@web.de>
Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
Merge-request: !3700
|
| |
| |
| |
| | |
Also, use the new function where applicable.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
3c94069660 Add --trace-redirect parameter to redirect trace output to a file
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3645
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
da26b3be89 avoid adding multiple consecutive string literals to std::string
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3698
|
| | |/
| |/|
| | |
| | | |
While at it change some single character additions to be of type char.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| | |
This replaces invocations of
- `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn`
- `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND`
- `cmSystemTools::IsOn` with `cmIsOn`
- `cmSystemTools::IsOff` with `cmIsOff`
|
| | |
|
| | |
|
|\ \
| |/
|/|
| |
| |
| |
| |
| | |
959b97a27f Tests: testStringAlgorithms: Add cmTrimWhitespace, cmEscapeQuotes, cmTokenize
7fbcc16dcd cmStringAlgorithms: cmIsSpace, cmTrimWhitespace, cmEscapeQuotes, cmTokenize
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3647
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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`)
|
| | |
|
| | |
|
|/
|
|
|
| |
In cmCTestScriptHandler, port away from cmFunctionBlocker
and update the elapsed time with the new callback instead.
|
|
|
|
| |
Highlight the fact that we only ever operate on the top element.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
This simplifies the `cmMakefile::AddDefinition` method with bool value
overload to call the string based `cmMakefile::AddDefinition` method
with either an "ON" or "OFF" string.
Also the method is renamed to `cmMakefile::AddDefinitionBool`
|
| |
|
|
|
|
|
|
|
|
|
| |
Replace the members for the Makefile and the Error with a
cmExecutionStatus. Re-implement GetMakefile and SetError based on that.
Both functions should be called directly on the cmExecutionStatus that is
passed to InitialPass. This will help us make all Commands immutable and
remove the need for cloning.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
732dd344b9 cmCommand: remove FinalPass from interface
fbee46e262 cmVariableWatchCommand: Port away from FinalPass
360d415592 cmLoadCommandCommand: Port away from FinalPass
316e40baec cmInstallProgramsCommand: Port away from FinalPass
7bc88b9165 cmInstallFilesCommand: Port away from FinalPass
6a1a3763ee cmFLTKWrapUICommand: Port away from FinalPass
20169f0b8d cmExportLibraryDependenciesCommand: Port away from FinalPass
a74dad3bd3 cmMakefile: decouple FinalAction from cmCommand
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3562
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
|
| |
An old workaround for `std::allocator_traits<>::value_type` lints from
IWYU on `std::vector<>` usage breaks IWYU's handling of `<memory>`.
Convert the workaround to use the same approach we already use for a
workaround of `std::__decay_and_strip<>::::__type` lints. Then update
the `<memory>` inclusions to follow the now-correct IWYU lints.
|
|
|
|
|
|
|
| |
The OLD behaviors of all policies are deprecated, but only by
documentation. Add an explicit deprecation diagnostic for policies
introduced in CMake 3.8 and below to encourage projects to port away
from setting policies to OLD.
|
|\
| |
| |
| |
| |
| |
| |
| | |
006229278b Use cmAppend to append ranges to std::vector instances
999516478d cmAlgorithms: Add cmAppend function
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3366
|
| | |
|
|/
|
|
|
|
|
|
| |
The `cmTargetMap` type is only used in the context of `cmMakefile`.
Therefore it is the most appropriate place to declare it.
This moves the `cmTarget.h/cmTargets` type definition to
`cmMakefile::cmTargetMap`.
|
|
|
|
|
|
|
|
|
|
| |
Provide a way for custom commands and targets to set the pool variable
of the ninja build statement. Setting `JOB_POOL` is not compatible with
`USES_TERMINAL`, which implies the `console` pool.
The option is silently ignored with other generators.
Closes: #18483
|
|
|
|
| |
Fixes: 17714
|
|
|
|
|
| |
When adding cmTargets to a cmMakefile, use std::unordered_map::emplace instead
of std::unordered_map::insert.
|
|
|
|
|
|
|
|
| |
`AddRequiredTargetC(xx)` feature didn't take the default compiler
standard into account, which possibly resulted in the use of an older
standard when some features requested it.
Fixes: #18686
|
|\
| |
| |
| |
| |
| |
| | |
02587d80cf Add deprecation warnings for policies CMP0066 and below
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3003
|
| |
| |
| |
| |
| |
| |
| | |
The OLD behaviors of all policies are deprecated, but only by
documentation. Add an explicit deprecation diagnostic for policies
introduced in CMake 3.7 and below to encourage projects to port away
from setting policies to OLD.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | | |
|
| |/
|/| |
|