| 2484 | } |
| 2485 | |
| 2486 | size_t cmMakefile::GetRecursionDepthLimit() const |
| 2487 | { |
| 2488 | size_t depth = CMake_DEFAULT_RECURSION_LIMIT; |
| 2489 | if (cmValue depthStr = |
| 2490 | this->GetDefinition("CMAKE_MAXIMUM_RECURSION_DEPTH")) { |
| 2491 | unsigned long depthUL; |
| 2492 | if (cmStrToULong(depthStr.GetCStr(), &depthUL)) { |
| 2493 | depth = depthUL; |
| 2494 | } |
| 2495 | } else if (cm::optional<std::string> depthEnv = |
| 2496 | cmSystemTools::GetEnvVar("CMAKE_MAXIMUM_RECURSION_DEPTH")) { |
| 2497 | unsigned long depthUL; |
| 2498 | if (cmStrToULong(*depthEnv, &depthUL)) { |
| 2499 | depth = depthUL; |
| 2500 | } |
| 2501 | } |
| 2502 | return depth; |
| 2503 | } |
| 2504 | |
| 2505 | size_t cmMakefile::GetRecursionDepth() const |
| 2506 | { |
no test coverage detected