Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Source: Fix clang -Wimplicit-fallthrough warnings | Sean McBride | 2021-09-28 | 1 | -0/+1 |
| | |||||
* | Source: Fix clang -Wextra-semi warnings | Sean McBride | 2021-09-28 | 1 | -1/+1 |
| | |||||
* | Rename cmProp in cmValue | Marc Chevrier | 2021-09-21 | 1 | -19/+19 |
| | |||||
* | cmSystemTools::VersionCompare: use std::string for arguments | Marc Chevrier | 2021-09-17 | 1 | -4/+3 |
| | |||||
* | Fix: Regression in the `cmConditionEvaluator::HandleLevel0` | Alex Turbov | 2021-08-09 | 1 | -1/+7 |
| | | | | | | | | 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. | ||||
* | cmProp: refactoring: transform alias in class | Marc Chevrier | 2021-08-08 | 1 | -4/+4 |
| | | | | | | 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. | ||||
* | Refactor: Move version compare op table out of the function | Alex Turbov | 2021-08-03 | 1 | -7/+7 |
| | | | | It's static data and never changed. | ||||
* | Refactor: Remove redundant checks for `0` and `1` literals | Alex Turbov | 2021-08-03 | 1 | -9/+1 |
| | | | | They are gonna be checked by `cmIsOn()` anyway. | ||||
* | Refactor: Copy exactly required count of args and avoid `pop_back()` | Alex Turbov | 2021-08-03 | 1 | -6/+7 |
| | |||||
* | Style: Better names of local vars for `IN_LIST` handler | Alex Turbov | 2021-08-03 | 1 | -4/+6 |
| | |||||
* | Refactor: Extract the logic of testing for special variable to func | Alex Turbov | 2021-08-03 | 1 | -14/+27 |
| | | | | Introduce `looksLikeSpecialVariable`. It makes `if()` blocks readable. | ||||
* | Refactor: Introduce `cmArgumentList` container class | Alex Turbov | 2021-08-03 | 1 | -141/+197 |
| | | | | | | | | | | | | | | | | | 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. | ||||
* | Refactor: Reduce one more condition checking on handling math compare | Alex Turbov | 2021-08-03 | 1 | -12/+13 |
| | |||||
* | Refactor: Avoid `if` → `else if` → … for compare operators | Alex Turbov | 2021-08-03 | 1 | -62/+95 |
| | | | | | | 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. | ||||
* | Refactor: Set `const` to `cmConditionEvaluator::IsKeyword` parameters | Alex Turbov | 2021-08-03 | 1 | -2/+3 |
| | |||||
* | Refactor: No need to move iterators after match | Alex Turbov | 2021-08-03 | 1 | -40/+28 |
| | | | | | | | | | | 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. | ||||
* | Refactor: Replace `std::to_string` w/ more specialized `bool2string` | Alex Turbov | 2021-08-03 | 1 | -5/+9 |
| | |||||
* | Refactor: Reorder `MATCHES` handler from top below to the fail-fast | Alex Turbov | 2021-08-03 | 1 | -18/+18 |
| | |||||
* | Refactor: Reduce variables scope in `HandleLevel2` | Alex Turbov | 2021-08-03 | 1 | -14/+12 |
| | |||||
* | Refactor: Simplify boolean to string result assignments | Alex Turbov | 2021-08-03 | 1 | -5/+4 |
| | |||||
* | Refactor: Replace `if` block w/ boolean expression | Alex Turbov | 2021-08-03 | 1 | -6/+2 |
| | | | | Signed-off-by: Alex Turbov <i.zaufi@gmail.com> | ||||
* | Refactor: Avoid redundant `operator<<` on printing messages | Alex Turbov | 2021-08-03 | 1 | -9/+15 |
| | | | | Signed-off-by: Alex Turbov <i.zaufi@gmail.com> | ||||
* | Refactor: Opt-out do+while loops and reduce nesting level in handlers | Alex Turbov | 2021-08-03 | 1 | -309/+287 |
| | | | | Signed-off-by: Alex Turbov <i.zaufi@gmail.com> | ||||
* | Refactor: Remove `reducible` flag from `handleLevelN()` functions | Alex Turbov | 2021-08-03 | 1 | -45/+45 |
| | | | | | | | 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> | ||||
* | Refactor: Make `cmConditionEvaluator::IsTrue` a bit more compact | Alex Turbov | 2021-08-03 | 1 | -19/+13 |
| | | | | Signed-off-by: Alex Turbov <i.zaufi@gmail.com> | ||||
* | Refactor: Generalize policy checking in `HandleLevel1` | Alex Turbov | 2021-07-26 | 1 | -18/+25 |
| | | | | Also, move OLD policy checking out of the loop to evaluate it once. | ||||
* | Refactor: When handle predicates, there is no need to check 2nd arg | Alex Turbov | 2021-07-26 | 1 | -30/+34 |
| | | | | | Introduce an overload for `IncrementArguments()` w/ one iterator and use it in the handler level 1. | ||||
* | Refactor: Initialize args vector from iterators instead of copy | Alex Turbov | 2021-07-26 | 1 | -4/+2 |
| | | | | Signed-off-by: Alex Turbov <i.zaufi@gmail.com> | ||||
* | Refactor: Speedup predicates and binary operation | Alex Turbov | 2021-07-26 | 1 | -49/+60 |
| | | | | | | | | | | 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. | ||||
* | Style: Add empty lines to increase readability | Alex Turbov | 2021-07-26 | 1 | -0/+20 |
| | | | | Signed-off-by: Alex Turbov <i.zaufi@gmail.com> | ||||
* | Refactor: Deduplicate code for `AND` and `OR` handling in `if()` command | Alex Turbov | 2021-07-26 | 1 | -16/+9 |
| | | | | Signed-off-by: Alex Turbov <i.zaufi@gmail.com> | ||||
* | Refactor: Rewrite parenthesis scanner to avoid `if`s | Alex Turbov | 2021-07-26 | 1 | -12/+5 |
| | | | | Signed-off-by: Alex Turbov <i.zaufi@gmail.com> | ||||
* | Refactor: Make `HandleBinaryOp` and `HandlePredicate` free functions | Alex Turbov | 2021-07-26 | 1 | -60/+52 |
| | |||||
* | Refactor: More `auto` and constness | Alex Turbov | 2021-07-26 | 1 | -33/+27 |
| | | | | Signed-off-by: Alex Turbov <i.zaufi@gmail.com> | ||||
* | Refactor: Make `IncrementArguments()` the free function | Alex Turbov | 2021-07-26 | 1 | -21/+22 |
| | | | | Signed-off-by: Alex Turbov <i.zaufi@gmail.com> | ||||
* | Refactor: Turn the innter `while` loop in `HandleLevelN()` into `for` | Alex Turbov | 2021-07-26 | 1 | -30/+10 |
| | | | | Signed-off-by: Alex Turbov <i.zaufi@gmail.com> | ||||
* | Refactor: Turn `reducible` flag into boolean | Alex Turbov | 2021-07-26 | 1 | -16/+16 |
| | | | | Signed-off-by: Alex Turbov <i.zaufi@gmail.com> | ||||
* | Refactor: Use `cm::string_view` for static const literals | Alex Turbov | 2021-07-26 | 1 | -46/+47 |
| | | | | Signed-off-by: Alex Turbov <i.zaufi@gmail.com> | ||||
* | Refactor: Opt-out `if` stataments to select 1st param | Alex Turbov | 2021-07-26 | 1 | -18/+10 |
| | | | | | | ... for some calls to `cmExpandedCommandArgument`. Signed-off-by: Alex Turbov <i.zaufi@gmail.com> | ||||
* | Refactor: Add constness | Alex Turbov | 2021-07-26 | 1 | -10/+10 |
| | | | | Signed-off-by: Alex Turbov <i.zaufi@gmail.com> | ||||
* | Refactor: Use anonymous namespace instead of `static` keyword for consts | Alex Turbov | 2021-07-26 | 1 | -32/+34 |
| | | | | Signed-off-by: Alex Turbov <i.zaufi@gmail.com> | ||||
* | Update CMake code using KWSys to account for Status return values | Brad King | 2021-04-14 | 1 | -2/+2 |
| | | | | | | 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. | ||||
* | Code style: add missed explicit 'this->' | Oleksandr Koval | 2021-01-05 | 1 | -8/+8 |
| | | | | | CMake uses explicit 'this->' style. Using custom clang-tidy check we can detect and fix places where 'this->' was missed. | ||||
* | cmConditionEvaluator: Remove extra copy of execution context | Brad King | 2020-09-28 | 1 | -6/+2 |
| | | | | | | 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. | ||||
* | cmConditionEvaluator: More use of cmProp | vvs31415 | 2020-09-08 | 1 | -35/+37 |
| | |||||
* | cmConditionEvaluator: Avoid comparing pointers | vvs31415 | 2020-09-04 | 1 | -3/+4 |
| | |||||
* | cmMakefile::GetDefinition: return cmProp | Vitaly Stakhovsky | 2020-09-02 | 1 | -3/+4 |
| | |||||
* | Refactoring: add cm::contains to <cmext/algorithm> | Marc Chevrier | 2020-04-17 | 1 | -2/+1 |
| | |||||
* | replace "substr(0, xx) ==" with cmHasPrefix() | Rolf Eike Beer | 2020-03-23 | 1 | -2/+2 |
| | |||||
* | Refactoring: use append functions from cmext/algorithm | Marc Chevrier | 2019-12-17 | 1 | -1/+3 |
| |