| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
cb19a63499 cmConditionEvaluator: Reduce the scope of the CMP0064 evaluation
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7287
|
| |
| |
| |
| |
| | |
When evaluatig conditions, avoid testing CMP0064 unless it's really needed
(Cuz most of the time it doesn't)
|
|/
|
|
| |
At least those involving `static_cast`.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
As reported in the BUG #22524, mismatched parenthesis reported differently
for `while()` and `if()`.
The problem was in the double loop (over "handlers" and the arguments),
where the outer loop didn't check the result of the running handler.
|
|
|
|
|
|
| |
To handle safely the values used by CMake variables and properties,
introduce the class cmProp as a replacement from the simple pointer
to std::string instance.
|
|
|
|
| |
It's static data and never changed.
|
|
|
|
| |
They are gonna be checked by `cmIsOn()` anyway.
|
| |
|
| |
|
|
|
|
| |
Introduce `looksLikeSpecialVariable`. It makes `if()` blocks readable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `cmArgumentList` has been turned into a class (forward declared in
the header). It inherits from the `std::list` (yeah, but we don't intend
to store polymorphic classes in it). In addition to the standard methods,
now it's possible to move `HandlePredicate` (renamed to `ReduceOneArg`)
and `HandleBinaryOp` (renamed to `ReduceTwoArgs`) as its members.
Additionally, iterators managements (`IncrementArguments`) have been
refactored into two separate classes mimicking iterators. This also
allows having a uniform `for` loop and concentrates the logic of
iterators advancing in it instead of the loop's body. The arguments
processing algorithms operate with "windows" over a collection of
arguments. Hence there are two kinds of "iteration windows" -- allowing
to observe 2 or 3 elements per loop iteration. These iteration "windows"
also passed to reducers.
|
| |
|
|
|
|
|
|
| |
When trying to match one of compare operator key inside `if()` condition,
remember the index of matched operator. Later this index used to
select the operation to perform instead of strings compare again.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
A handler's loop of all levels gonna restart after calls to
`HandlePredcate` or `HandleBinaryOp`... And the first action in the
loop is to setup iterators. So, no need to move 'em inside the
functions. Also, no need to pass iterators by reference.
Also, reorder parameters of both functions so iterators
followed after a reference to the newArgs container.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
|
|
|
|
| |
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
|
|
|
|
| |
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
|
|
|
|
|
|
|
| |
The indicator that smth has been done is the `newArgs` size get
differ after an iteration.
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
|
|
|
|
| |
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
|
|
|
|
| |
Also, move OLD policy checking out of the loop to evaluate it once.
|
|
|
|
|
| |
Introduce an overload for `IncrementArguments()` w/ one iterator
and use it in the handler level 1.
|
|
|
|
| |
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Before predicates and binary ops reducers use series of `if ()` blocks
to match the keywords. However, if matched the currect `arg` get replaced
with evaluation result, so further `if (<match-another-keyword>)`
is just wasting time/resources.
This patch introduce a chain of `if` → `else if` → ..., so after
first match the loop restarts w/ the next argument.
|
|
|
|
| |
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
|
|
|
|
| |
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
|
|
|
|
| |
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
|
| |
|
|
|
|
| |
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
|
|
|
|
| |
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
|
|
|
|
| |
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
|
|
|
|
| |
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
|
|
|
|
| |
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
|
|
|
|
|
|
| |
... for some calls to `cmExpandedCommandArgument`.
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
|
|
|
|
| |
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
|
|
|
|
| |
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
CMake uses explicit 'this->' style. Using custom clang-tidy check we can
detect and fix places where 'this->' was missed.
|
|
|
|
|
|
| |
The execution context passed to the constructor always matches the top
of the backtrace, so the former can be removed in favor of using only
the latter.
|