mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
cmGeneratorTarget: Cache GetAllConfigCompileLanguages
This commit is contained in:
committed by
Brad King
parent
6ed75b1fe6
commit
62a4099fd2
@@ -533,6 +533,7 @@ cmValue cmGeneratorTarget::GetFileSuffixInternal(
|
||||
void cmGeneratorTarget::ClearSourcesCache()
|
||||
{
|
||||
this->AllConfigSources.clear();
|
||||
this->AllConfigCompileLanguages.clear();
|
||||
this->KindedSourcesMap.clear();
|
||||
this->SourcesAreContextDependent = Tribool::Indeterminate;
|
||||
this->Objects.clear();
|
||||
|
||||
@@ -1326,6 +1326,9 @@ private:
|
||||
mutable std::vector<AllConfigSource> AllConfigSources;
|
||||
void ComputeAllConfigSources() const;
|
||||
|
||||
mutable std::set<std::string> AllConfigCompileLanguages;
|
||||
void ComputeAllConfigCompileLanguages() const;
|
||||
|
||||
mutable std::unordered_map<std::string, bool> MaybeInterfacePropertyExists;
|
||||
bool MaybeHaveInterfaceProperty(std::string const& prop,
|
||||
cm::GenEx::Evaluation* eval,
|
||||
|
||||
@@ -511,7 +511,7 @@ cmGeneratorTarget::GetAllConfigSources(SourceKind kind) const
|
||||
return result;
|
||||
}
|
||||
|
||||
std::set<std::string> cmGeneratorTarget::GetAllConfigCompileLanguages() const
|
||||
void cmGeneratorTarget::ComputeAllConfigCompileLanguages() const
|
||||
{
|
||||
std::set<std::string> languages;
|
||||
std::vector<AllConfigSource> const& sources = this->GetAllConfigSources();
|
||||
@@ -521,5 +521,13 @@ std::set<std::string> cmGeneratorTarget::GetAllConfigCompileLanguages() const
|
||||
languages.emplace(lang);
|
||||
}
|
||||
}
|
||||
return languages;
|
||||
this->AllConfigCompileLanguages = languages;
|
||||
}
|
||||
|
||||
std::set<std::string> cmGeneratorTarget::GetAllConfigCompileLanguages() const
|
||||
{
|
||||
if (this->AllConfigCompileLanguages.empty()) {
|
||||
this->ComputeAllConfigCompileLanguages();
|
||||
}
|
||||
return this->AllConfigCompileLanguages;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user