summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/Syntax/ImproperNesting.cmake
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-10-20 14:47:38 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2020-10-22 15:40:48 (GMT)
commit12f6e37eb79ad66c30269a3f19dfc28a9cb834e2 (patch)
tree056b3662153bfdae6859fd5030582ced45880eb0 /Tests/RunCMake/Syntax/ImproperNesting.cmake
parent67383725bd40a92db85738f8d0c120e2c9bb2100 (diff)
downloadCMake-12f6e37eb79ad66c30269a3f19dfc28a9cb834e2.zip
CMake-12f6e37eb79ad66c30269a3f19dfc28a9cb834e2.tar.gz
CMake-12f6e37eb79ad66c30269a3f19dfc28a9cb834e2.tar.bz2
cmListFileCache: Enforce proper nesting of flow control statements
Fixes: #19153
Diffstat (limited to 'Tests/RunCMake/Syntax/ImproperNesting.cmake')
-rw-r--r--Tests/RunCMake/Syntax/ImproperNesting.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/Syntax/ImproperNesting.cmake b/Tests/RunCMake/Syntax/ImproperNesting.cmake
new file mode 100644
index 0000000..47ff9f9
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ImproperNesting.cmake
@@ -0,0 +1,7 @@
+message(FATAL_ERROR "This should not happen")
+
+foreach(i 1 2)
+ if(1)
+endforeach()
+endif()
+endif()