Only output includes once after the start of 'generate-time' when debugging.
During configure-time, GetIncludeDirectories may be called too, for example if using the export() command. As the content can be different, it should be output each time then.
This commit is contained in:
parent
0d46e9a029
commit
d70204a86a
@ -980,6 +980,7 @@ void cmGlobalGenerator::Generate()
|
|||||||
// Generate project files
|
// Generate project files
|
||||||
for (i = 0; i < this->LocalGenerators.size(); ++i)
|
for (i = 0; i < this->LocalGenerators.size(); ++i)
|
||||||
{
|
{
|
||||||
|
this->LocalGenerators[i]->GetMakefile()->SetGeneratingBuildSystem();
|
||||||
this->SetCurrentLocalGenerator(this->LocalGenerators[i]);
|
this->SetCurrentLocalGenerator(this->LocalGenerators[i]);
|
||||||
this->LocalGenerators[i]->Generate();
|
this->LocalGenerators[i]->Generate();
|
||||||
this->LocalGenerators[i]->GenerateInstallRules();
|
this->LocalGenerators[i]->GenerateInstallRules();
|
||||||
|
@ -99,6 +99,7 @@ cmMakefile::cmMakefile(): Internal(new Internals)
|
|||||||
this->AddDefaultDefinitions();
|
this->AddDefaultDefinitions();
|
||||||
this->Initialize();
|
this->Initialize();
|
||||||
this->PreOrder = false;
|
this->PreOrder = false;
|
||||||
|
this->GeneratingBuildSystem = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmMakefile::cmMakefile(const cmMakefile& mf): Internal(new Internals)
|
cmMakefile::cmMakefile(const cmMakefile& mf): Internal(new Internals)
|
||||||
|
@ -870,6 +870,9 @@ public:
|
|||||||
return this->IncludeDirectoriesEntries;
|
return this->IncludeDirectoriesEntries;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsGeneratingBuildSystem(){ return this->GeneratingBuildSystem; }
|
||||||
|
void SetGeneratingBuildSystem(){ this->GeneratingBuildSystem = true; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// add link libraries and directories to the target
|
// add link libraries and directories to the target
|
||||||
void AddGlobalLinkInformation(const char* name, cmTarget& target);
|
void AddGlobalLinkInformation(const char* name, cmTarget& target);
|
||||||
@ -1019,6 +1022,9 @@ private:
|
|||||||
|
|
||||||
// Enforce rules about CMakeLists.txt files.
|
// Enforce rules about CMakeLists.txt files.
|
||||||
void EnforceDirectoryLevelRules();
|
void EnforceDirectoryLevelRules();
|
||||||
|
|
||||||
|
bool GeneratingBuildSystem;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
@ -151,6 +151,7 @@ cmTarget::cmTarget()
|
|||||||
this->IsApple = false;
|
this->IsApple = false;
|
||||||
this->IsImportedTarget = false;
|
this->IsImportedTarget = false;
|
||||||
this->BuildInterfaceIncludesAppended = false;
|
this->BuildInterfaceIncludesAppended = false;
|
||||||
|
this->DebugIncludesDone = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
@ -2739,11 +2740,17 @@ std::vector<std::string> cmTarget::GetIncludeDirectories(const char *config)
|
|||||||
cmSystemTools::ExpandListArgument(debugProp, debugProperties);
|
cmSystemTools::ExpandListArgument(debugProp, debugProperties);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool debugIncludes = std::find(debugProperties.begin(),
|
bool debugIncludes = !this->DebugIncludesDone
|
||||||
|
&& std::find(debugProperties.begin(),
|
||||||
debugProperties.end(),
|
debugProperties.end(),
|
||||||
"INCLUDE_DIRECTORIES")
|
"INCLUDE_DIRECTORIES")
|
||||||
!= debugProperties.end();
|
!= debugProperties.end();
|
||||||
|
|
||||||
|
if (this->Makefile->IsGeneratingBuildSystem())
|
||||||
|
{
|
||||||
|
this->DebugIncludesDone = true;
|
||||||
|
}
|
||||||
|
|
||||||
for (std::vector<cmTargetInternals::IncludeDirectoriesEntry*>::const_iterator
|
for (std::vector<cmTargetInternals::IncludeDirectoriesEntry*>::const_iterator
|
||||||
it = this->Internal->IncludeDirectoriesEntries.begin(),
|
it = this->Internal->IncludeDirectoriesEntries.begin(),
|
||||||
end = this->Internal->IncludeDirectoriesEntries.end();
|
end = this->Internal->IncludeDirectoriesEntries.end();
|
||||||
|
@ -610,6 +610,7 @@ private:
|
|||||||
bool DLLPlatform;
|
bool DLLPlatform;
|
||||||
bool IsApple;
|
bool IsApple;
|
||||||
bool IsImportedTarget;
|
bool IsImportedTarget;
|
||||||
|
bool DebugIncludesDone;
|
||||||
mutable std::map<cmStdString, std::set<std::string> >
|
mutable std::map<cmStdString, std::set<std::string> >
|
||||||
LinkDependentProperties;
|
LinkDependentProperties;
|
||||||
mutable std::set<std::string> LinkImplicitNullProperties;
|
mutable std::set<std::string> LinkImplicitNullProperties;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user