MCPcopy Create free account
hub / github.com/Kitware/CMake / GetRecursionDepthLimit

Method GetRecursionDepthLimit

Source/cmMakefile.cxx:2486–2503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2484}
2485
2486size_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
2505size_t cmMakefile::GetRecursionDepth() const
2506{

Callers 2

ExecuteCommandMethod · 0.95
FindPackageMethod · 0.80

Calls 3

GetDefinitionMethod · 0.95
cmStrToULongFunction · 0.85
GetCStrMethod · 0.80

Tested by

no test coverage detected