summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/if
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-03-04 13:53:09 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-03-04 13:53:17 (GMT)
commitbb2477081d8524cf7ada5d09a54ed41273b43419 (patch)
treec733774db9a8e33f8e21ce7513c462c024218555 /Tests/RunCMake/if
parent424d04ed51003faea0df1fc3857a81b5a3be71f0 (diff)
parentda2361ffb35799319abca6f7c3138c916685fb2d (diff)
downloadCMake-bb2477081d8524cf7ada5d09a54ed41273b43419.zip
CMake-bb2477081d8524cf7ada5d09a54ed41273b43419.tar.gz
CMake-bb2477081d8524cf7ada5d09a54ed41273b43419.tar.bz2
Merge topic 'while-bug-compatibility'
da2361ffb3 while: Restore tolerance of condition error 47d197745a Tests: Simplify RunCMake.{if,while} unbalanced parenthesis cases Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7041
Diffstat (limited to 'Tests/RunCMake/if')
-rw-r--r--Tests/RunCMake/if/unbalanced-parenthesis-stderr.txt2
-rw-r--r--Tests/RunCMake/if/unbalanced-parenthesis.cmake11
2 files changed, 5 insertions, 8 deletions
diff --git a/Tests/RunCMake/if/unbalanced-parenthesis-stderr.txt b/Tests/RunCMake/if/unbalanced-parenthesis-stderr.txt
index 770ccb8..d2260a0 100644
--- a/Tests/RunCMake/if/unbalanced-parenthesis-stderr.txt
+++ b/Tests/RunCMake/if/unbalanced-parenthesis-stderr.txt
@@ -1,7 +1,7 @@
CMake Error at unbalanced-parenthesis\.cmake:[0-9]+ \(if\):
if given arguments:
- "NOT" "\(" "IN_LIST" "some_list"
+ "\("
mismatched parenthesis in condition
Call Stack \(most recent call first\):
diff --git a/Tests/RunCMake/if/unbalanced-parenthesis.cmake b/Tests/RunCMake/if/unbalanced-parenthesis.cmake
index c51c755..45932f6 100644
--- a/Tests/RunCMake/if/unbalanced-parenthesis.cmake
+++ b/Tests/RunCMake/if/unbalanced-parenthesis.cmake
@@ -1,8 +1,5 @@
-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")
+set(paren "(")
+if(${paren})
+ message(STATUS "Condition incorrectly true")
endif()
+message(STATUS "Code incorrectly accepted")