mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-14 13:30:29 -05:00
cmGeneratorTarget: Add GetAllConfigCompileLanguages method
Return all languages needed to compile sources in the target in any configuration.
This commit is contained in:
@@ -1670,6 +1670,19 @@ void cmGeneratorTarget::ComputeAllConfigSources() const
|
||||
}
|
||||
}
|
||||
|
||||
std::set<std::string> cmGeneratorTarget::GetAllConfigCompileLanguages() const
|
||||
{
|
||||
std::set<std::string> languages;
|
||||
std::vector<AllConfigSource> const& sources = this->GetAllConfigSources();
|
||||
for (AllConfigSource const& si : sources) {
|
||||
std::string const& lang = si.Source->GetOrDetermineLanguage();
|
||||
if (!lang.empty()) {
|
||||
languages.emplace(lang);
|
||||
}
|
||||
}
|
||||
return languages;
|
||||
}
|
||||
|
||||
std::string cmGeneratorTarget::GetCompilePDBName(
|
||||
const std::string& config) const
|
||||
{
|
||||
|
||||
@@ -132,6 +132,10 @@ public:
|
||||
per-source configurations assigned. */
|
||||
std::vector<AllConfigSource> const& GetAllConfigSources() const;
|
||||
|
||||
/** Get all languages used to compile sources in any configuration.
|
||||
This excludes the languages of objects from object libraries. */
|
||||
std::set<std::string> GetAllConfigCompileLanguages() const;
|
||||
|
||||
void GetObjectSources(std::vector<cmSourceFile const*>&,
|
||||
const std::string& config) const;
|
||||
const std::string& GetObjectName(cmSourceFile const* file);
|
||||
|
||||
Reference in New Issue
Block a user