ENH: Make dir content cache work during configure
Previously the cmGlobalGenerator::GetDirectoryContent method would work safely only during build system generation. These changes make it safe to use during each configure step by flushing it at the beginning.
This commit is contained in:
parent
924fae24cf
commit
4719984553
|
@ -731,6 +731,7 @@ void cmGlobalGenerator::Configure()
|
||||||
this->LocalGeneratorToTargetMap.clear();
|
this->LocalGeneratorToTargetMap.clear();
|
||||||
this->ProjectMap.clear();
|
this->ProjectMap.clear();
|
||||||
this->RuleHashes.clear();
|
this->RuleHashes.clear();
|
||||||
|
this->DirectoryContentMap.clear();
|
||||||
|
|
||||||
// start with this directory
|
// start with this directory
|
||||||
cmLocalGenerator *lg = this->CreateLocalGenerator();
|
cmLocalGenerator *lg = this->CreateLocalGenerator();
|
||||||
|
|
|
@ -213,12 +213,12 @@ public:
|
||||||
configuration. This is valid during generation only. */
|
configuration. This is valid during generation only. */
|
||||||
cmTargetManifest const& GetTargetManifest() { return this->TargetManifest; }
|
cmTargetManifest const& GetTargetManifest() { return this->TargetManifest; }
|
||||||
|
|
||||||
/** Get the content of a directory on disk including the target
|
/** Get the content of a directory. Directory listings are loaded
|
||||||
files to be generated. This may be called only during the
|
from disk at most once and cached. During the generation step
|
||||||
generation step. It is intended for use only by
|
the content will include the target files to be built even if
|
||||||
cmComputeLinkInformation. */
|
they do not yet exist. */
|
||||||
std::set<cmStdString> const& GetDirectoryContent(std::string const& dir,
|
std::set<cmStdString> const& GetDirectoryContent(std::string const& dir,
|
||||||
bool needDisk);
|
bool needDisk = true);
|
||||||
|
|
||||||
void AddTarget(cmTargets::value_type &v);
|
void AddTarget(cmTargets::value_type &v);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue