summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/while/unbalanced-parenthesis.cmake
Commit message (Collapse)AuthorAgeFilesLines
* while: diagnose errors during condition evaluationBrad King2022-03-041-7/+0
| | | | | | Add a policy to diagnose condition errors in a compatible way. Fixes: #23296
* while: Restore tolerance of condition errorAlex Turbov2022-03-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | Since commit 880ca66b51 (Fix: `while()` can silently ignore incorrect condition, 2021-08-09, v3.22.0-rc1~238^2~4) we correctly reject the code set(paren "(") while(${paren}) endwhile() However, rejecting it breaks compatibility with projects that used such code accidentally. In CMake 3.21 and below, any error in the condition was ignored because the `false` result exited the loop first. Restore tolerance of the error for now. A policy will be needed to make it an error later. Note that the same condition with `if` was always correctly rejected. Fixes: #22524 Issue: #23296 Co-authored-by: Brad King <brad.king@kitware.com>
* Tests: Simplify RunCMake.{if,while} unbalanced parenthesis casesBrad King2022-03-031-7/+5
|
* Fix: `while()` can silently ignore incorrect conditionAlex Turbov2021-08-091-1/+1
| | | | | When `conditionEvaluator.IsTrue(...)` returns `false` it just didn't print the error occured.
* Fix: Regression in the `cmConditionEvaluator::HandleLevel0`Alex Turbov2021-08-091-0/+8
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.