summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraCodeLiteGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmExtraCodeLiteGenerator.cxx')
-rw-r--r--Source/cmExtraCodeLiteGenerator.cxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx
index 5a02d54..383942b 100644
--- a/Source/cmExtraCodeLiteGenerator.cxx
+++ b/Source/cmExtraCodeLiteGenerator.cxx
@@ -198,8 +198,7 @@ std::string cmExtraCodeLiteGenerator::CollectSourceFiles(
std::map<std::string, cmSourceFile*>& cFiles,
std::set<std::string>& otherFiles)
{
- const std::vector<std::string>& srcExts =
- this->GlobalGenerator->GetCMakeInstance()->GetSourceExtensions();
+ auto cm = this->GlobalGenerator->GetCMakeInstance();
std::string projectType;
switch (gt->GetType()) {
@@ -233,12 +232,7 @@ std::string cmExtraCodeLiteGenerator::CollectSourceFiles(
std::string lang = s->GetLanguage();
if (lang == "C" || lang == "CXX") {
std::string const& srcext = s->GetExtension();
- for (std::string const& ext : srcExts) {
- if (srcext == ext) {
- isCFile = true;
- break;
- }
- }
+ isCFile = cm->IsSourceExtension(srcext);
}
// then put it accordingly into one of the two containers