diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-24 14:58:23 +0200 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-27 07:44:22 +0100 |
commit | 780bff5279c6c2d356e5c7726b656bd9c68532b8 (patch) | |
tree | 0a5ba9e89c83cf4364d48c088aba4e2eb24251c9 /Source/cmExtraCodeLiteGenerator.cxx | |
parent | 6bd7bd1e06fcf92d40c762f2713626d125cb8f87 (diff) | |
download | cmake-780bff5279c6c2d356e5c7726b656bd9c68532b8.tar.gz |
cmake: Store hardcoded lists of sources and headers
Don't duplicate this in each cmMakefile.
Diffstat (limited to 'Source/cmExtraCodeLiteGenerator.cxx')
-rw-r--r-- | Source/cmExtraCodeLiteGenerator.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx index f4a6537301..67aa157a17 100644 --- a/Source/cmExtraCodeLiteGenerator.cxx +++ b/Source/cmExtraCodeLiteGenerator.cxx @@ -149,6 +149,11 @@ void cmExtraCodeLiteGenerator // which may have an acompanying header, one for all other files std::string projectType; + std::vector<std::string> srcExts = + this->GlobalGenerator->GetCMakeInstance()->GetSourceExtensions(); + std::vector<std::string> headerExts = + this->GlobalGenerator->GetCMakeInstance()->GetHeaderExtensions(); + std::map<std::string, cmSourceFile*> cFiles; std::set<std::string> otherFiles; for (std::vector<cmLocalGenerator*>::const_iterator lg=lgs.begin(); @@ -207,9 +212,7 @@ void cmExtraCodeLiteGenerator { std::string srcext = (*si)->GetExtension(); for(std::vector<std::string>::const_iterator - ext = mf->GetSourceExtensions().begin(); - ext != mf->GetSourceExtensions().end(); - ++ext) + ext = srcExts.begin(); ext != srcExts.end(); ++ext) { if (srcext == *ext) { @@ -253,8 +256,8 @@ void cmExtraCodeLiteGenerator // check if there's a matching header around for(std::vector<std::string>::const_iterator - ext = mf->GetHeaderExtensions().begin(); - ext != mf->GetHeaderExtensions().end(); + ext = headerExts.begin(); + ext != headerExts.end(); ++ext) { std::string hname=headerBasename; |