diff options
author | Tushar Maheshwari <tushar27192@gmail.com> | 2019-08-27 16:05:42 (GMT) |
---|---|---|
committer | Tushar Maheshwari <tushar27192@gmail.com> | 2019-08-27 16:05:42 (GMT) |
commit | 8cb3cffa42e11c2508ed8db703f2f9a1a73fbbb9 (patch) | |
tree | 88c3d054322f1e36ac67958e7da8c88897baaa82 /Source/cmGeneratorTarget.cxx | |
parent | 65fe80794d41ab6f0b1e608d7535b7530a2ff51d (diff) | |
download | CMake-8cb3cffa42e11c2508ed8db703f2f9a1a73fbbb9.zip CMake-8cb3cffa42e11c2508ed8db703f2f9a1a73fbbb9.tar.gz CMake-8cb3cffa42e11c2508ed8db703f2f9a1a73fbbb9.tar.bz2 |
cmSourceFile: Rename non-const GetLanguage
GetOrDetermineLanguage:
- Read the property if available
- Determine the Language using the file extension
Fix all usage of the non-const member in the repository.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 3048c5f..1d64f1c 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1593,7 +1593,7 @@ void cmGeneratorTarget::ComputeKindedSources(KindedSources& files, kind = SourceKindHeader; } else if (sf->GetPropertyAsBool("EXTERNAL_OBJECT")) { kind = SourceKindExternalObject; - } else if (!sf->GetLanguage().empty()) { + } else if (!sf->GetOrDetermineLanguage().empty()) { kind = SourceKindObjectSource; } else if (ext == "def") { kind = SourceKindModuleDefinition; @@ -6055,7 +6055,7 @@ void cmGeneratorTarget::GetLanguages(std::set<std::string>& languages, std::vector<cmSourceFile*> sourceFiles; this->GetSourceFiles(sourceFiles, config); for (cmSourceFile* src : sourceFiles) { - const std::string& lang = src->GetLanguage(); + const std::string& lang = src->GetOrDetermineLanguage(); if (!lang.empty()) { languages.insert(lang); } |