From 89b69bf1addad6138b9aa51c2f67380c9e489f2f Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 9 Mar 2023 10:17:16 -0500 Subject: Add CMAKE_MAXIMUM_RECURSION_DEPTH environment variable Extend the recursion limit controls added by commit a6982cff0d (cmMakefile: Impose maximum recursion limit, 2018-12-14, v3.14.0-rc1~82^2) with an environment variable that is used if the CMake variable of the same name is not set. --- Help/envvar/CMAKE_MAXIMUM_RECURSION_DEPTH.rst | 10 +++++++ Help/manual/cmake-env-variables.7.rst | 1 + Help/variable/CMAKE_MAXIMUM_RECURSION_DEPTH.rst | 2 ++ Source/cmMakefile.cxx | 6 ++++ .../RunCMake/MaxRecursionDepth/RunCMakeTest.cmake | 22 ++++++++++++++ .../ctest_read_custom_files-env-result.txt | 1 + .../ctest_read_custom_files-env-stderr.txt | 34 ++++++++++++++++++++++ .../ctest_read_custom_files-invalid-env-result.txt | 1 + .../ctest_read_custom_files-invalid-env-stderr.txt | 5 ++++ .../MaxRecursionDepth/find_package-env-result.txt | 1 + .../find_package-env-script-result.txt | 1 + .../find_package-env-script-stderr.txt | 21 +++++++++++++ .../MaxRecursionDepth/find_package-env-stderr.txt | 21 +++++++++++++ .../find_package-invalid-env-result.txt | 1 + .../find_package-invalid-env-script-result.txt | 1 + .../find_package-invalid-env-script-stderr.txt | 5 ++++ .../find_package-invalid-env-stderr.txt | 5 ++++ .../MaxRecursionDepth/function-env-result.txt | 1 + .../function-env-script-result.txt | 1 + .../function-env-script-stderr.txt | 21 +++++++++++++ .../MaxRecursionDepth/function-env-stderr.txt | 21 +++++++++++++ .../function-invalid-env-result.txt | 1 + .../function-invalid-env-script-result.txt | 1 + .../function-invalid-env-script-stderr.txt | 5 ++++ .../function-invalid-env-stderr.txt | 5 ++++ .../MaxRecursionDepth/include-env-result.txt | 1 + .../include-env-script-result.txt | 1 + .../include-env-script-stderr.txt | 21 +++++++++++++ .../MaxRecursionDepth/include-env-stderr.txt | 21 +++++++++++++ .../include-invalid-env-result.txt | 1 + .../include-invalid-env-script-result.txt | 1 + .../include-invalid-env-script-stderr.txt | 5 ++++ .../include-invalid-env-stderr.txt | 5 ++++ .../MaxRecursionDepth/macro-env-result.txt | 1 + .../MaxRecursionDepth/macro-env-script-result.txt | 1 + .../MaxRecursionDepth/macro-env-script-stderr.txt | 21 +++++++++++++ .../MaxRecursionDepth/macro-env-stderr.txt | 21 +++++++++++++ .../MaxRecursionDepth/macro-invalid-env-result.txt | 1 + .../macro-invalid-env-script-result.txt | 1 + .../macro-invalid-env-script-stderr.txt | 5 ++++ .../MaxRecursionDepth/macro-invalid-env-stderr.txt | 5 ++++ .../variable_watch-env-result.txt | 1 + .../variable_watch-env-script-result.txt | 1 + .../variable_watch-env-script-stderr.txt | 22 ++++++++++++++ .../variable_watch-env-stderr.txt | 22 ++++++++++++++ .../variable_watch-invalid-env-result.txt | 1 + .../variable_watch-invalid-env-script-result.txt | 1 + .../variable_watch-invalid-env-script-stderr.txt | 6 ++++ .../variable_watch-invalid-env-stderr.txt | 6 ++++ 49 files changed, 366 insertions(+) create mode 100644 Help/envvar/CMAKE_MAXIMUM_RECURSION_DEPTH.rst create mode 100644 Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-env-result.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-env-stderr.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-invalid-env-result.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-invalid-env-stderr.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/find_package-env-result.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/find_package-env-script-result.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/find_package-env-script-stderr.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/find_package-env-stderr.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-result.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-script-result.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-script-stderr.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-stderr.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/function-env-result.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/function-env-script-result.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/function-env-script-stderr.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/function-env-stderr.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/function-invalid-env-result.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/function-invalid-env-script-result.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/function-invalid-env-script-stderr.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/function-invalid-env-stderr.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/include-env-result.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/include-env-script-result.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/include-env-script-stderr.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/include-env-stderr.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/include-invalid-env-result.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/include-invalid-env-script-result.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/include-invalid-env-script-stderr.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/include-invalid-env-stderr.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/macro-env-result.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/macro-env-script-result.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/macro-env-script-stderr.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/macro-env-stderr.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-result.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-script-result.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-script-stderr.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-stderr.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/variable_watch-env-result.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/variable_watch-env-script-result.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/variable_watch-env-script-stderr.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/variable_watch-env-stderr.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-result.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-script-result.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-script-stderr.txt create mode 100644 Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-stderr.txt diff --git a/Help/envvar/CMAKE_MAXIMUM_RECURSION_DEPTH.rst b/Help/envvar/CMAKE_MAXIMUM_RECURSION_DEPTH.rst new file mode 100644 index 0000000..2d65b60 --- /dev/null +++ b/Help/envvar/CMAKE_MAXIMUM_RECURSION_DEPTH.rst @@ -0,0 +1,10 @@ +CMAKE_MAXIMUM_RECURSION_DEPTH +----------------------------- + +.. versionadded:: 3.27 + +.. include:: ENV_VAR.txt + +Maximum recursion depth for CMake scripts. This environment variable is +used if the :variable:`CMAKE_MAXIMUM_RECURSION_DEPTH` variable is not set. +See that variable's documentation for details. diff --git a/Help/manual/cmake-env-variables.7.rst b/Help/manual/cmake-env-variables.7.rst index 4c29b80..1f0c911 100644 --- a/Help/manual/cmake-env-variables.7.rst +++ b/Help/manual/cmake-env-variables.7.rst @@ -20,6 +20,7 @@ Environment Variables that Change Behavior .. toctree:: :maxdepth: 1 + /envvar/CMAKE_MAXIMUM_RECURSION_DEPTH /envvar/CMAKE_PREFIX_PATH /envvar/SSL_CERT_DIR /envvar/SSL_CERT_FILE diff --git a/Help/variable/CMAKE_MAXIMUM_RECURSION_DEPTH.rst b/Help/variable/CMAKE_MAXIMUM_RECURSION_DEPTH.rst index 59c60d3..b611967 100644 --- a/Help/variable/CMAKE_MAXIMUM_RECURSION_DEPTH.rst +++ b/Help/variable/CMAKE_MAXIMUM_RECURSION_DEPTH.rst @@ -33,3 +33,5 @@ Calling any of the following commands increases the recursion depth: depth) * Reading or writing variables that are being watched by a :command:`variable_watch` + +See also the :envvar:`CMAKE_MAXIMUM_RECURSION_DEPTH` environment variable. diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 383a818..638da06 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2865,6 +2865,12 @@ size_t cmMakefile::GetRecursionDepthLimit() const if (cmStrToULong(depthStr.GetCStr(), &depthUL)) { depth = depthUL; } + } else if (cm::optional depthEnv = + cmSystemTools::GetEnvVar("CMAKE_MAXIMUM_RECURSION_DEPTH")) { + unsigned long depthUL; + if (cmStrToULong(*depthEnv, &depthUL)) { + depth = depthUL; + } } return depth; } diff --git a/Tests/RunCMake/MaxRecursionDepth/RunCMakeTest.cmake b/Tests/RunCMake/MaxRecursionDepth/RunCMakeTest.cmake index f379eba..fdf418f 100644 --- a/Tests/RunCMake/MaxRecursionDepth/RunCMakeTest.cmake +++ b/Tests/RunCMake/MaxRecursionDepth/RunCMakeTest.cmake @@ -1,20 +1,42 @@ include(RunCMake) include(RunCTest) +# Isolate this test from the caller's environment. +unset(ENV{CMAKE_MAXIMUM_RECURSION_DEPTH}) + function(run_cmake_recursive name) run_cmake_with_options(${name}-default "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name}) run_cmake_command(${name}-default-script ${CMAKE_COMMAND} "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name} -P "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt") + set(ENV{CMAKE_MAXIMUM_RECURSION_DEPTH} 5) # overridden, not used run_cmake_with_options(${name}-var "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name} -DCMAKE_MAXIMUM_RECURSION_DEPTH=10) run_cmake_with_options(${name}-invalid-var "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name} -DCMAKE_MAXIMUM_RECURSION_DEPTH=a) run_cmake_command(${name}-var-script ${CMAKE_COMMAND} "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name} -DCMAKE_MAXIMUM_RECURSION_DEPTH=10 -P "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt") run_cmake_command(${name}-invalid-var-script ${CMAKE_COMMAND} "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name} -DCMAKE_MAXIMUM_RECURSION_DEPTH=a -P "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt") + + set(ENV{CMAKE_MAXIMUM_RECURSION_DEPTH} 10) + run_cmake_with_options(${name}-env "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name}) + run_cmake_command(${name}-env-script ${CMAKE_COMMAND} "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name} -P "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt") + + set(ENV{CMAKE_MAXIMUM_RECURSION_DEPTH} a) + run_cmake_with_options(${name}-invalid-env "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name}) + run_cmake_command(${name}-invalid-env-script ${CMAKE_COMMAND} "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name} -P "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt") + + unset(ENV{CMAKE_MAXIMUM_RECURSION_DEPTH}) endfunction() function(run_ctest_recursive name) run_ctest(${name}-default "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name}) run_ctest(${name}-var "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name} -DCMAKE_MAXIMUM_RECURSION_DEPTH=10) run_ctest(${name}-invalid-var "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name} -DCMAKE_MAXIMUM_RECURSION_DEPTH=a) + + set(ENV{CMAKE_MAXIMUM_RECURSION_DEPTH} 10) + run_ctest(${name}-env "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name}) + + set(ENV{CMAKE_MAXIMUM_RECURSION_DEPTH} a) + run_ctest(${name}-invalid-env "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name}) + + unset(ENV{CMAKE_MAXIMUM_RECURSION_DEPTH}) endfunction() run_cmake_recursive(function) diff --git a/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-env-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-env-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-env-stderr.txt new file mode 100644 index 0000000..b664fa0 --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-env-stderr.txt @@ -0,0 +1,34 @@ +^2 +3 +4 +5 +6 +7 +8 +9 +10 +CMake Error at .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:1 \(message\): + Maximum recursion depth of 10 exceeded +Call Stack \(most recent call first\): + .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:3 \(ctest_read_custom_files\) + .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:3 \(ctest_read_custom_files\) + .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:3 \(ctest_read_custom_files\) + .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:3 \(ctest_read_custom_files\) + .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:3 \(ctest_read_custom_files\) + .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:3 \(ctest_read_custom_files\) + .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:3 \(ctest_read_custom_files\) + .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:3 \(ctest_read_custom_files\) + .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:3 \(ctest_read_custom_files\) + .*/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-env/test\.cmake:10 \(ctest_read_custom_files\) + + +Problem reading custom configuration: .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake +Problem reading custom configuration: .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake +Problem reading custom configuration: .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake +Problem reading custom configuration: .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake +Problem reading custom configuration: .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake +Problem reading custom configuration: .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake +Problem reading custom configuration: .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake +Problem reading custom configuration: .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake +Problem reading custom configuration: .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake +Problem reading custom configuration: .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake$ diff --git a/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-invalid-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-invalid-env-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-invalid-env-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-invalid-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-invalid-env-stderr.txt new file mode 100644 index 0000000..7dbbb3e --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-invalid-env-stderr.txt @@ -0,0 +1,5 @@ +[0-9]+ +CMake Error at .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:1 \(message\): + Maximum recursion depth of [0-9]+ exceeded +Call Stack \(most recent call first\): + .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:3 \(ctest_read_custom_files\) diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-env-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/find_package-env-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-env-script-result.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-env-script-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/find_package-env-script-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-env-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-env-script-stderr.txt new file mode 100644 index 0000000..5314551 --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/find_package-env-script-stderr.txt @@ -0,0 +1,21 @@ +^3 +4 +5 +6 +7 +8 +9 +10 +CMake Error at .*/FindRecursivePackage\.cmake:1 \(message\): + Maximum recursion depth of 10 exceeded +Call Stack \(most recent call first\): + .*/FindRecursivePackage\.cmake:3 \(find_package\) + .*/FindRecursivePackage\.cmake:3 \(find_package\) + .*/FindRecursivePackage\.cmake:3 \(find_package\) + .*/FindRecursivePackage\.cmake:3 \(find_package\) + .*/FindRecursivePackage\.cmake:3 \(find_package\) + .*/FindRecursivePackage\.cmake:3 \(find_package\) + .*/FindRecursivePackage\.cmake:3 \(find_package\) + .*/FindRecursivePackage\.cmake:3 \(find_package\) + .*/find_package\.cmake:2 \(find_package\) + .*/CMakeLists\.txt:5 \(include\)$ diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-env-stderr.txt new file mode 100644 index 0000000..b47a13a --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/find_package-env-stderr.txt @@ -0,0 +1,21 @@ +^3 +4 +5 +6 +7 +8 +9 +10 +CMake Error at FindRecursivePackage\.cmake:1 \(message\): + Maximum recursion depth of 10 exceeded +Call Stack \(most recent call first\): + FindRecursivePackage\.cmake:3 \(find_package\) + FindRecursivePackage\.cmake:3 \(find_package\) + FindRecursivePackage\.cmake:3 \(find_package\) + FindRecursivePackage\.cmake:3 \(find_package\) + FindRecursivePackage\.cmake:3 \(find_package\) + FindRecursivePackage\.cmake:3 \(find_package\) + FindRecursivePackage\.cmake:3 \(find_package\) + FindRecursivePackage\.cmake:3 \(find_package\) + find_package\.cmake:2 \(find_package\) + CMakeLists\.txt:5 \(include\)$ diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-script-result.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-script-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-script-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-script-stderr.txt new file mode 100644 index 0000000..b8557ab --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-script-stderr.txt @@ -0,0 +1,5 @@ +[0-9]+ +CMake Error at .*/FindRecursivePackage\.cmake:1 \(message\): + Maximum recursion depth of [0-9]+ exceeded +Call Stack \(most recent call first\): + .*/FindRecursivePackage\.cmake:3 \(find_package\) diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-stderr.txt new file mode 100644 index 0000000..5d31e29 --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-stderr.txt @@ -0,0 +1,5 @@ +[0-9]+ +CMake Error at FindRecursivePackage\.cmake:1 \(message\): + Maximum recursion depth of [0-9]+ exceeded +Call Stack \(most recent call first\): + FindRecursivePackage\.cmake:3 \(find_package\) diff --git a/Tests/RunCMake/MaxRecursionDepth/function-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/function-env-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/function-env-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/MaxRecursionDepth/function-env-script-result.txt b/Tests/RunCMake/MaxRecursionDepth/function-env-script-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/function-env-script-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/MaxRecursionDepth/function-env-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/function-env-script-stderr.txt new file mode 100644 index 0000000..61304b1 --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/function-env-script-stderr.txt @@ -0,0 +1,21 @@ +^3 +4 +5 +6 +7 +8 +9 +10 +CMake Error at .*/function\.cmake:2 \(message\): + Maximum recursion depth of 10 exceeded +Call Stack \(most recent call first\): + .*/function\.cmake:4 \(recursive\) + .*/function\.cmake:4 \(recursive\) + .*/function\.cmake:4 \(recursive\) + .*/function\.cmake:4 \(recursive\) + .*/function\.cmake:4 \(recursive\) + .*/function\.cmake:4 \(recursive\) + .*/function\.cmake:4 \(recursive\) + .*/function\.cmake:4 \(recursive\) + .*/function\.cmake:7 \(recursive\) + .*/CMakeLists\.txt:5 \(include\)$ diff --git a/Tests/RunCMake/MaxRecursionDepth/function-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/function-env-stderr.txt new file mode 100644 index 0000000..54e72af --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/function-env-stderr.txt @@ -0,0 +1,21 @@ +^3 +4 +5 +6 +7 +8 +9 +10 +CMake Error at function\.cmake:2 \(message\): + Maximum recursion depth of 10 exceeded +Call Stack \(most recent call first\): + function\.cmake:4 \(recursive\) + function\.cmake:4 \(recursive\) + function\.cmake:4 \(recursive\) + function\.cmake:4 \(recursive\) + function\.cmake:4 \(recursive\) + function\.cmake:4 \(recursive\) + function\.cmake:4 \(recursive\) + function\.cmake:4 \(recursive\) + function\.cmake:7 \(recursive\) + CMakeLists\.txt:5 \(include\)$ diff --git a/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-script-result.txt b/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-script-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-script-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-script-stderr.txt new file mode 100644 index 0000000..92de1fb --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-script-stderr.txt @@ -0,0 +1,5 @@ +[0-9]+ +CMake Error at .*/function\.cmake:2 \(message\): + Maximum recursion depth of [0-9]+ exceeded +Call Stack \(most recent call first\): + .*/function\.cmake:4 \(recursive\) diff --git a/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-stderr.txt new file mode 100644 index 0000000..5c25c4b --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-stderr.txt @@ -0,0 +1,5 @@ +[0-9]+ +CMake Error at function\.cmake:2 \(message\): + Maximum recursion depth of [0-9]+ exceeded +Call Stack \(most recent call first\): + function\.cmake:4 \(recursive\) diff --git a/Tests/RunCMake/MaxRecursionDepth/include-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/include-env-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/include-env-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/MaxRecursionDepth/include-env-script-result.txt b/Tests/RunCMake/MaxRecursionDepth/include-env-script-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/include-env-script-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/MaxRecursionDepth/include-env-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/include-env-script-stderr.txt new file mode 100644 index 0000000..f55f505 --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/include-env-script-stderr.txt @@ -0,0 +1,21 @@ +^3 +4 +5 +6 +7 +8 +9 +10 +CMake Error at .*/include_recursive\.cmake:1 \(message\): + Maximum recursion depth of 10 exceeded +Call Stack \(most recent call first\): + .*/include_recursive\.cmake:3 \(include\) + .*/include_recursive\.cmake:3 \(include\) + .*/include_recursive\.cmake:3 \(include\) + .*/include_recursive\.cmake:3 \(include\) + .*/include_recursive\.cmake:3 \(include\) + .*/include_recursive\.cmake:3 \(include\) + .*/include_recursive\.cmake:3 \(include\) + .*/include_recursive\.cmake:3 \(include\) + .*/include\.cmake:2 \(include\) + .*/CMakeLists\.txt:5 \(include\)$ diff --git a/Tests/RunCMake/MaxRecursionDepth/include-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/include-env-stderr.txt new file mode 100644 index 0000000..ff33985 --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/include-env-stderr.txt @@ -0,0 +1,21 @@ +^3 +4 +5 +6 +7 +8 +9 +10 +CMake Error at include_recursive\.cmake:1 \(message\): + Maximum recursion depth of 10 exceeded +Call Stack \(most recent call first\): + include_recursive\.cmake:3 \(include\) + include_recursive\.cmake:3 \(include\) + include_recursive\.cmake:3 \(include\) + include_recursive\.cmake:3 \(include\) + include_recursive\.cmake:3 \(include\) + include_recursive\.cmake:3 \(include\) + include_recursive\.cmake:3 \(include\) + include_recursive\.cmake:3 \(include\) + include\.cmake:2 \(include\) + CMakeLists\.txt:5 \(include\)$ diff --git a/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-script-result.txt b/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-script-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-script-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-script-stderr.txt new file mode 100644 index 0000000..0510e7c --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-script-stderr.txt @@ -0,0 +1,5 @@ +[0-9]+ +CMake Error at .*/include_recursive\.cmake:1 \(message\): + Maximum recursion depth of [0-9]+ exceeded +Call Stack \(most recent call first\): + .*/include_recursive\.cmake:3 \(include\) diff --git a/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-stderr.txt new file mode 100644 index 0000000..b1494a8 --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-stderr.txt @@ -0,0 +1,5 @@ +[0-9]+ +CMake Error at include_recursive\.cmake:1 \(message\): + Maximum recursion depth of [0-9]+ exceeded +Call Stack \(most recent call first\): + include_recursive\.cmake:3 \(include\) diff --git a/Tests/RunCMake/MaxRecursionDepth/macro-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/macro-env-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/macro-env-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/MaxRecursionDepth/macro-env-script-result.txt b/Tests/RunCMake/MaxRecursionDepth/macro-env-script-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/macro-env-script-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/MaxRecursionDepth/macro-env-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/macro-env-script-stderr.txt new file mode 100644 index 0000000..142e068 --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/macro-env-script-stderr.txt @@ -0,0 +1,21 @@ +^3 +4 +5 +6 +7 +8 +9 +10 +CMake Error at .*/macro\.cmake:2 \(message\): + Maximum recursion depth of 10 exceeded +Call Stack \(most recent call first\): + .*/macro\.cmake:4 \(recursive\) + .*/macro\.cmake:4 \(recursive\) + .*/macro\.cmake:4 \(recursive\) + .*/macro\.cmake:4 \(recursive\) + .*/macro\.cmake:4 \(recursive\) + .*/macro\.cmake:4 \(recursive\) + .*/macro\.cmake:4 \(recursive\) + .*/macro\.cmake:4 \(recursive\) + .*/macro\.cmake:7 \(recursive\) + .*/CMakeLists\.txt:5 \(include\)$ diff --git a/Tests/RunCMake/MaxRecursionDepth/macro-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/macro-env-stderr.txt new file mode 100644 index 0000000..71de553 --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/macro-env-stderr.txt @@ -0,0 +1,21 @@ +^3 +4 +5 +6 +7 +8 +9 +10 +CMake Error at macro\.cmake:2 \(message\): + Maximum recursion depth of 10 exceeded +Call Stack \(most recent call first\): + macro\.cmake:4 \(recursive\) + macro\.cmake:4 \(recursive\) + macro\.cmake:4 \(recursive\) + macro\.cmake:4 \(recursive\) + macro\.cmake:4 \(recursive\) + macro\.cmake:4 \(recursive\) + macro\.cmake:4 \(recursive\) + macro\.cmake:4 \(recursive\) + macro\.cmake:7 \(recursive\) + CMakeLists\.txt:5 \(include\)$ diff --git a/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-script-result.txt b/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-script-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-script-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-script-stderr.txt new file mode 100644 index 0000000..c67be57 --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-script-stderr.txt @@ -0,0 +1,5 @@ +[0-9]+ +CMake Error at .*/macro\.cmake:2 \(message\): + Maximum recursion depth of [0-9]+ exceeded +Call Stack \(most recent call first\): + .*/macro\.cmake:4 \(recursive\) diff --git a/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-stderr.txt new file mode 100644 index 0000000..0b27162 --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-stderr.txt @@ -0,0 +1,5 @@ +[0-9]+ +CMake Error at macro\.cmake:2 \(message\): + Maximum recursion depth of [0-9]+ exceeded +Call Stack \(most recent call first\): + macro\.cmake:4 \(recursive\) diff --git a/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-script-result.txt b/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-script-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-script-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-script-stderr.txt new file mode 100644 index 0000000..52fedd3 --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-script-stderr.txt @@ -0,0 +1,22 @@ +^4 +6 +8 +10 +CMake Error at .*/variable_watch\.cmake:[0-9]+ \(update_x\): + Maximum recursion depth of 10 exceeded +Call Stack \(most recent call first\): + .*/variable_watch\.cmake:5 \(set\) + .*/variable_watch\.cmake:[0-9]+ \(update_x\) + .*/variable_watch\.cmake:5 \(set\) + .*/variable_watch\.cmake:[0-9]+ \(update_x\) + .*/variable_watch\.cmake:5 \(set\) + .*/variable_watch\.cmake:[0-9]+ \(update_x\) + .*/variable_watch\.cmake:5 \(set\) + .*/variable_watch\.cmake:[0-9]+ \(update_x\) + .*/variable_watch\.cmake:9 \(set\) + .*/CMakeLists\.txt:5 \(include\) + + +CMake Error: Error in cmake code at +Unknown:0: +A command failed during the invocation of callback "update_x"\.$ diff --git a/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-stderr.txt new file mode 100644 index 0000000..1427f1d --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-stderr.txt @@ -0,0 +1,22 @@ +^4 +6 +8 +10 +CMake Error at variable_watch\.cmake:[0-9]+ \(update_x\): + Maximum recursion depth of 10 exceeded +Call Stack \(most recent call first\): + variable_watch\.cmake:5 \(set\) + variable_watch\.cmake:[0-9]+ \(update_x\) + variable_watch\.cmake:5 \(set\) + variable_watch\.cmake:[0-9]+ \(update_x\) + variable_watch\.cmake:5 \(set\) + variable_watch\.cmake:[0-9]+ \(update_x\) + variable_watch\.cmake:5 \(set\) + variable_watch\.cmake:[0-9]+ \(update_x\) + variable_watch\.cmake:9 \(set\) + CMakeLists\.txt:5 \(include\) + + +CMake Error: Error in cmake code at +Unknown:0: +A command failed during the invocation of callback "update_x"\.$ diff --git a/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-script-result.txt b/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-script-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-script-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-script-stderr.txt new file mode 100644 index 0000000..07deee2 --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-script-stderr.txt @@ -0,0 +1,6 @@ +[0-9]+ +CMake Error at .*/variable_watch\.cmake:[0-9]+ \(update_x\): + Maximum recursion depth of [0-9]+ exceeded +Call Stack \(most recent call first\): + .*/variable_watch\.cmake:5 \(set\) + .*/variable_watch\.cmake:[0-9]+ \(update_x\) diff --git a/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-stderr.txt new file mode 100644 index 0000000..b2395b3 --- /dev/null +++ b/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-stderr.txt @@ -0,0 +1,6 @@ +[0-9]+ +CMake Error at variable_watch\.cmake:[0-9]+ \(update_x\): + Maximum recursion depth of [0-9]+ exceeded +Call Stack \(most recent call first\): + variable_watch\.cmake:5 \(set\) + variable_watch\.cmake:[0-9]+ \(update_x\) -- cgit v0.12