diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2021-08-09 17:35:56 (GMT) |
---|---|---|
committer | Alex Turbov <i.zaufi@gmail.com> | 2021-08-09 18:05:09 (GMT) |
commit | 61b33c3f4eae3ce81df36c79ec69630cd9fcefdc (patch) | |
tree | 8ad558d0d6ac37c02e0c83f3a28b65a37c48aa1b /Tests/RunCMake/while | |
parent | 7e3250da2fa0155a8c83b3aadef0407a701f2953 (diff) | |
download | CMake-61b33c3f4eae3ce81df36c79ec69630cd9fcefdc.zip CMake-61b33c3f4eae3ce81df36c79ec69630cd9fcefdc.tar.gz CMake-61b33c3f4eae3ce81df36c79ec69630cd9fcefdc.tar.bz2 |
Fix: Regression in the `cmConditionEvaluator::HandleLevel0`
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.
Diffstat (limited to 'Tests/RunCMake/while')
-rw-r--r-- | Tests/RunCMake/while/RunCMakeTest.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/while/unbalanced-parenthesis.cmake | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Tests/RunCMake/while/RunCMakeTest.cmake b/Tests/RunCMake/while/RunCMakeTest.cmake index 7da80ac..bb9b991 100644 --- a/Tests/RunCMake/while/RunCMakeTest.cmake +++ b/Tests/RunCMake/while/RunCMakeTest.cmake @@ -5,3 +5,5 @@ run_cmake(EndMissing) run_cmake(EndMismatch) run_cmake(EndAlone) run_cmake(EndAloneArgs) + +run_cmake(unbalanced-parenthesis) diff --git a/Tests/RunCMake/while/unbalanced-parenthesis.cmake b/Tests/RunCMake/while/unbalanced-parenthesis.cmake new file mode 100644 index 0000000..4b6a5cd --- /dev/null +++ b/Tests/RunCMake/while/unbalanced-parenthesis.cmake @@ -0,0 +1,8 @@ +set(var_with_paren "(") +set(some_list "") + +while(NOT ${var_with_paren} IN_LIST some_list) + message(STATUS "Never prints") +endwhile() + +message(STATUS "It prints but in fact `while()` have to fail") |