MCPcopy Create free account
hub / github.com/Kitware/CMake / GetLanguages

Method GetLanguages

Source/cmGeneratorTarget.cxx:5048–5070  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5046}
5047
5048void cmGeneratorTarget::GetLanguages(std::set<std::string>& languages,
5049 std::string const& config) const
5050{
5051 // Targets that do not compile anything have no languages.
5052 if (!this->CanCompileSources()) {
5053 return;
5054 }
5055
5056 std::vector<cmSourceFile*> sourceFiles;
5057 this->GetSourceFiles(sourceFiles, config);
5058 for (cmSourceFile* src : sourceFiles) {
5059 std::string const& lang = src->GetOrDetermineLanguage();
5060 if (!lang.empty()) {
5061 languages.insert(lang);
5062 }
5063 }
5064
5065 std::set<cmGeneratorTarget const*> objectLibraries =
5066 this->GetSourceObjectLibraries(config);
5067 for (cmGeneratorTarget const* objLib : objectLibraries) {
5068 objLib->GetLanguages(languages, config);
5069 }
5070}
5071
5072std::set<cmGeneratorTarget const*> cmGeneratorTarget::GetSourceObjectLibraries(
5073 std::string const& config) const

Callers 7

IsLanguageUsedMethod · 0.95
CreateBuildSettingsMethod · 0.45
AppendCleanCommandMethod · 0.45
ComputeClOptionsMethod · 0.45
ProcessLanguagesMethod · 0.45

Calls 5

CanCompileSourcesMethod · 0.95
GetSourceFilesMethod · 0.95
emptyMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected