summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/if/unbalanced-parenthesis.cmake
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2021-08-09 17:35:56 (GMT)
committerAlex Turbov <i.zaufi@gmail.com>2021-08-09 18:05:09 (GMT)
commit61b33c3f4eae3ce81df36c79ec69630cd9fcefdc (patch)
tree8ad558d0d6ac37c02e0c83f3a28b65a37c48aa1b /Tests/RunCMake/if/unbalanced-parenthesis.cmake
parent7e3250da2fa0155a8c83b3aadef0407a701f2953 (diff)
downloadCMake-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/if/unbalanced-parenthesis.cmake')
-rw-r--r--Tests/RunCMake/if/unbalanced-parenthesis.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/if/unbalanced-parenthesis.cmake b/Tests/RunCMake/if/unbalanced-parenthesis.cmake
new file mode 100644
index 0000000..c51c755
--- /dev/null
+++ b/Tests/RunCMake/if/unbalanced-parenthesis.cmake
@@ -0,0 +1,8 @@
+set(var_with_paren "(")
+set(some_list "")
+
+if(NOT ${var_with_paren} IN_LIST some_list)
+ message(STATUS "Never prints")
+else()
+ message(STATUS "Never prints")
+endif()