mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-29 18:51:05 -05:00
cmMakefile: Store recursion depth limit as size_t
This commit is contained in:
@@ -110,8 +110,6 @@ cmGlobalGenerator::cmGlobalGenerator(cmake* cm)
|
|||||||
this->ConfigureDoneCMP0026AndCMP0024 = false;
|
this->ConfigureDoneCMP0026AndCMP0024 = false;
|
||||||
this->FirstTimeProgress = 0.0f;
|
this->FirstTimeProgress = 0.0f;
|
||||||
|
|
||||||
this->RecursionDepth = 0;
|
|
||||||
|
|
||||||
cm->GetState()->SetIsGeneratorMultiConfig(false);
|
cm->GetState()->SetIsGeneratorMultiConfig(false);
|
||||||
cm->GetState()->SetMinGWMake(false);
|
cm->GetState()->SetMinGWMake(false);
|
||||||
cm->GetState()->SetMSYSShell(false);
|
cm->GetState()->SetMSYSShell(false);
|
||||||
|
|||||||
@@ -586,7 +586,7 @@ public:
|
|||||||
|
|
||||||
std::string MakeSilentFlag;
|
std::string MakeSilentFlag;
|
||||||
|
|
||||||
int RecursionDepth;
|
size_t RecursionDepth = 0;
|
||||||
|
|
||||||
virtual void GetQtAutoGenConfigs(std::vector<std::string>& configs) const
|
virtual void GetQtAutoGenConfigs(std::vector<std::string>& configs) const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -99,7 +99,6 @@ cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator,
|
|||||||
this->StateSnapshot =
|
this->StateSnapshot =
|
||||||
this->StateSnapshot.GetState()->CreatePolicyScopeSnapshot(
|
this->StateSnapshot.GetState()->CreatePolicyScopeSnapshot(
|
||||||
this->StateSnapshot);
|
this->StateSnapshot);
|
||||||
this->RecursionDepth = 0;
|
|
||||||
|
|
||||||
// Enter a policy level for this directory.
|
// Enter a policy level for this directory.
|
||||||
this->PushPolicy();
|
this->PushPolicy();
|
||||||
@@ -454,12 +453,12 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff,
|
|||||||
static_cast<void>(stack_manager);
|
static_cast<void>(stack_manager);
|
||||||
|
|
||||||
// Check for maximum recursion depth.
|
// Check for maximum recursion depth.
|
||||||
int depth = CMake_DEFAULT_RECURSION_LIMIT;
|
size_t depth = CMake_DEFAULT_RECURSION_LIMIT;
|
||||||
if (cmValue depthStr =
|
if (cmValue depthStr =
|
||||||
this->GetDefinition("CMAKE_MAXIMUM_RECURSION_DEPTH")) {
|
this->GetDefinition("CMAKE_MAXIMUM_RECURSION_DEPTH")) {
|
||||||
unsigned long depthUL;
|
unsigned long depthUL;
|
||||||
if (cmStrToULong(depthStr.GetCStr(), &depthUL)) {
|
if (cmStrToULong(depthStr.GetCStr(), &depthUL)) {
|
||||||
depth = static_cast<int>(depthUL);
|
depth = depthUL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this->RecursionDepth > depth) {
|
if (this->RecursionDepth > depth) {
|
||||||
@@ -2864,12 +2863,12 @@ bool cmMakefile::IsProjectFile(const char* filename) const
|
|||||||
!cmSystemTools::IsSubDirectory(filename, "/CMakeFiles"));
|
!cmSystemTools::IsSubDirectory(filename, "/CMakeFiles"));
|
||||||
}
|
}
|
||||||
|
|
||||||
int cmMakefile::GetRecursionDepth() const
|
size_t cmMakefile::GetRecursionDepth() const
|
||||||
{
|
{
|
||||||
return this->RecursionDepth;
|
return this->RecursionDepth;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmMakefile::SetRecursionDepth(int recursionDepth)
|
void cmMakefile::SetRecursionDepth(size_t recursionDepth)
|
||||||
{
|
{
|
||||||
this->RecursionDepth = recursionDepth;
|
this->RecursionDepth = recursionDepth;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -1023,8 +1023,8 @@ public:
|
|||||||
const char* sourceFilename) const;
|
const char* sourceFilename) const;
|
||||||
bool IsProjectFile(const char* filename) const;
|
bool IsProjectFile(const char* filename) const;
|
||||||
|
|
||||||
int GetRecursionDepth() const;
|
size_t GetRecursionDepth() const;
|
||||||
void SetRecursionDepth(int recursionDepth);
|
void SetRecursionDepth(size_t recursionDepth);
|
||||||
|
|
||||||
std::string NewDeferId() const;
|
std::string NewDeferId() const;
|
||||||
bool DeferCall(std::string id, std::string fileName, cmListFileFunction lff);
|
bool DeferCall(std::string id, std::string fileName, cmListFileFunction lff);
|
||||||
@@ -1090,7 +1090,7 @@ protected:
|
|||||||
private:
|
private:
|
||||||
cmStateSnapshot StateSnapshot;
|
cmStateSnapshot StateSnapshot;
|
||||||
cmListFileBacktrace Backtrace;
|
cmListFileBacktrace Backtrace;
|
||||||
int RecursionDepth;
|
size_t RecursionDepth = 0;
|
||||||
|
|
||||||
struct DeferCommand
|
struct DeferCommand
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user