mirror of
https://github.com/Kitware/CMake.git
synced 2026-11-06 13:27:09 +00:00
cmGeneratorTarget: Cache GetAllConfigCompileLanguages
This commit is contained in:
1 parent
6ed75b1fe6
commit
62a4099fd2
3 files changed
+14
-2
No files matched your search
@@ -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