summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-10-02 17:57:12 (GMT)
committerBrad King <brad.king@kitware.com>2019-10-17 18:03:54 (GMT)
commit324988a6b101f29d148badc32b44964aedae1163 (patch)
treeacb191ac778ebcd88bb8351d0f38f033ef188404 /Source/cmGeneratorTarget.cxx
parentfd2c9fac101ec6d341db5b30e9d1eba64fa23116 (diff)
downloadCMake-324988a6b101f29d148badc32b44964aedae1163.zip
CMake-324988a6b101f29d148badc32b44964aedae1163.tar.gz
CMake-324988a6b101f29d148badc32b44964aedae1163.tar.bz2
cmGeneratorTarget: Add GetAllConfigCompileLanguages method
Return all languages needed to compile sources in the target in any configuration.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 949d9d9..0cc70c7 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -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
{