summaryrefslogtreecommitdiff
path: root/Tests/EnforceConfig.cmake.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-03-09 11:06:58 -0500
committerBrad King <brad.king@kitware.com>2023-03-13 11:49:56 -0400
commit9504cef8c4d505f4f9fa66cbd485a2ac8b24ab72 (patch)
tree42c582cf5ecfac82823f65e501ad80d1684f4167 /Tests/EnforceConfig.cmake.in
parent60ef076bacca9a265ab4ab68032933c464e84a66 (diff)
downloadcmake-9504cef8c4d505f4f9fa66cbd485a2ac8b24ab72.tar.gz
Tests: Allow RunCMake.MaxRecursionDepth to test public-facing default limit
Previously we compiled in a smaller default limit during nightly testing and CI builds, so we were not testing the same default limit that end-users will see. Instead, set the limit during testing using an environment variable so that we can unset it when testing the default limit in `RunCMake.MaxRecursionDepth`.
Diffstat (limited to 'Tests/EnforceConfig.cmake.in')
-rw-r--r--Tests/EnforceConfig.cmake.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/Tests/EnforceConfig.cmake.in b/Tests/EnforceConfig.cmake.in
index 61be40b6a6..a652efcd0a 100644
--- a/Tests/EnforceConfig.cmake.in
+++ b/Tests/EnforceConfig.cmake.in
@@ -35,5 +35,8 @@ unset(ENV{CMAKE_GENERATOR_PLATFORM})
unset(ENV{CMAKE_GENERATOR_TOOLSET})
unset(ENV{CMAKE_EXPORT_COMPILE_COMMANDS})
+# Verify that our module implementations do not recurse too much.
+set(ENV{CMAKE_MAXIMUM_RECURSION_DEPTH} 100)
+
@TEST_HOME_ENV_CODE@
@TEST_WARN_VS_CODE@