diff options
author | Brad King <brad.king@kitware.com> | 2023-03-13 15:32:03 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-03-13 15:32:03 (GMT) |
commit | 88bc8dfc14f02ee07654c906a0e6be5d5a33b017 (patch) | |
tree | 18c68fc8328878bdf6c207f1781afb5aa40a40d7 /Source/cmMakefile.cxx | |
parent | fcad8d0630036cde6e99ae600e101dbbd5646c96 (diff) | |
download | CMake-88bc8dfc14f02ee07654c906a0e6be5d5a33b017.zip CMake-88bc8dfc14f02ee07654c906a0e6be5d5a33b017.tar.gz CMake-88bc8dfc14f02ee07654c906a0e6be5d5a33b017.tar.bz2 |
cmMakefile: Store recursion depth limit as size_t
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index a014776..d0a8958 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -99,7 +99,6 @@ cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator, this->StateSnapshot = this->StateSnapshot.GetState()->CreatePolicyScopeSnapshot( this->StateSnapshot); - this->RecursionDepth = 0; // Enter a policy level for this directory. this->PushPolicy(); @@ -454,12 +453,12 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, static_cast<void>(stack_manager); // Check for maximum recursion depth. - int depth = CMake_DEFAULT_RECURSION_LIMIT; + size_t depth = CMake_DEFAULT_RECURSION_LIMIT; if (cmValue depthStr = this->GetDefinition("CMAKE_MAXIMUM_RECURSION_DEPTH")) { unsigned long depthUL; if (cmStrToULong(depthStr.GetCStr(), &depthUL)) { - depth = static_cast<int>(depthUL); + depth = depthUL; } } if (this->RecursionDepth > depth) { @@ -2864,12 +2863,12 @@ bool cmMakefile::IsProjectFile(const char* filename) const !cmSystemTools::IsSubDirectory(filename, "/CMakeFiles")); } -int cmMakefile::GetRecursionDepth() const +size_t cmMakefile::GetRecursionDepth() const { return this->RecursionDepth; } -void cmMakefile::SetRecursionDepth(int recursionDepth) +void cmMakefile::SetRecursionDepth(size_t recursionDepth) { this->RecursionDepth = recursionDepth; } |