summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-03-13 15:07:55 (GMT)
committerBrad King <brad.king@kitware.com>2023-03-13 15:48:19 (GMT)
commit60ef076bacca9a265ab4ab68032933c464e84a66 (patch)
tree402214fe98f06615b8f2f1dc21299649da5bd9ec /Tests
parent89b69bf1addad6138b9aa51c2f67380c9e489f2f (diff)
downloadCMake-60ef076bacca9a265ab4ab68032933c464e84a66.zip
CMake-60ef076bacca9a265ab4ab68032933c464e84a66.tar.gz
CMake-60ef076bacca9a265ab4ab68032933c464e84a66.tar.bz2
find_package: Enforce maximum nesting depth below maximum recursion depth
The stack usage for nested `find_package` calls is much larger than for other kinds of recursion, so enforce a lower limit to avoid stack overflow.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/find_package-default-script-stderr.txt8
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/find_package-default-stderr.txt6
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-script-stderr.txt8
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-stderr.txt6
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/find_package-invalid-var-script-stderr.txt8
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/find_package-invalid-var-stderr.txt6
6 files changed, 24 insertions, 18 deletions
diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-default-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-default-script-stderr.txt
index b8557ab..4e965e8 100644
--- a/Tests/RunCMake/MaxRecursionDepth/find_package-default-script-stderr.txt
+++ b/Tests/RunCMake/MaxRecursionDepth/find_package-default-script-stderr.txt
@@ -1,5 +1,7 @@
[0-9]+
-CMake Error at .*/FindRecursivePackage\.cmake:1 \(message\):
- Maximum recursion depth of [0-9]+ exceeded
+CMake Error at [^
+]*/Tests/RunCMake/MaxRecursionDepth/FindRecursivePackage.cmake:[0-9]+ \(find_package\):
+ find_package maximum nesting depth of [0-9]+ exceeded.
Call Stack \(most recent call first\):
- .*/FindRecursivePackage\.cmake:3 \(find_package\)
+ [^
+]*/Tests/RunCMake/MaxRecursionDepth/FindRecursivePackage.cmake:[0-9]+ \(find_package\)
diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-default-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-default-stderr.txt
index 5d31e29..0119953 100644
--- a/Tests/RunCMake/MaxRecursionDepth/find_package-default-stderr.txt
+++ b/Tests/RunCMake/MaxRecursionDepth/find_package-default-stderr.txt
@@ -1,5 +1,5 @@
[0-9]+
-CMake Error at FindRecursivePackage\.cmake:1 \(message\):
- Maximum recursion depth of [0-9]+ exceeded
+CMake Error at FindRecursivePackage.cmake:[0-9]+ \(find_package\):
+ find_package maximum nesting depth of [0-9]+ exceeded.
Call Stack \(most recent call first\):
- FindRecursivePackage\.cmake:3 \(find_package\)
+ FindRecursivePackage.cmake:[0-9]+ \(find_package\)
diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-script-stderr.txt
index b8557ab..4e965e8 100644
--- a/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-script-stderr.txt
+++ b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-script-stderr.txt
@@ -1,5 +1,7 @@
[0-9]+
-CMake Error at .*/FindRecursivePackage\.cmake:1 \(message\):
- Maximum recursion depth of [0-9]+ exceeded
+CMake Error at [^
+]*/Tests/RunCMake/MaxRecursionDepth/FindRecursivePackage.cmake:[0-9]+ \(find_package\):
+ find_package maximum nesting depth of [0-9]+ exceeded.
Call Stack \(most recent call first\):
- .*/FindRecursivePackage\.cmake:3 \(find_package\)
+ [^
+]*/Tests/RunCMake/MaxRecursionDepth/FindRecursivePackage.cmake:[0-9]+ \(find_package\)
diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-stderr.txt
index 5d31e29..0119953 100644
--- a/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-stderr.txt
+++ b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-stderr.txt
@@ -1,5 +1,5 @@
[0-9]+
-CMake Error at FindRecursivePackage\.cmake:1 \(message\):
- Maximum recursion depth of [0-9]+ exceeded
+CMake Error at FindRecursivePackage.cmake:[0-9]+ \(find_package\):
+ find_package maximum nesting depth of [0-9]+ exceeded.
Call Stack \(most recent call first\):
- FindRecursivePackage\.cmake:3 \(find_package\)
+ FindRecursivePackage.cmake:[0-9]+ \(find_package\)
diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-var-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-var-script-stderr.txt
index b8557ab..4e965e8 100644
--- a/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-var-script-stderr.txt
+++ b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-var-script-stderr.txt
@@ -1,5 +1,7 @@
[0-9]+
-CMake Error at .*/FindRecursivePackage\.cmake:1 \(message\):
- Maximum recursion depth of [0-9]+ exceeded
+CMake Error at [^
+]*/Tests/RunCMake/MaxRecursionDepth/FindRecursivePackage.cmake:[0-9]+ \(find_package\):
+ find_package maximum nesting depth of [0-9]+ exceeded.
Call Stack \(most recent call first\):
- .*/FindRecursivePackage\.cmake:3 \(find_package\)
+ [^
+]*/Tests/RunCMake/MaxRecursionDepth/FindRecursivePackage.cmake:[0-9]+ \(find_package\)
diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-var-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-var-stderr.txt
index 5d31e29..0119953 100644
--- a/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-var-stderr.txt
+++ b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-var-stderr.txt
@@ -1,5 +1,5 @@
[0-9]+
-CMake Error at FindRecursivePackage\.cmake:1 \(message\):
- Maximum recursion depth of [0-9]+ exceeded
+CMake Error at FindRecursivePackage.cmake:[0-9]+ \(find_package\):
+ find_package maximum nesting depth of [0-9]+ exceeded.
Call Stack \(most recent call first\):
- FindRecursivePackage\.cmake:3 \(find_package\)
+ FindRecursivePackage.cmake:[0-9]+ \(find_package\)