diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-24 12:58:23 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-27 06:44:22 (GMT) |
commit | 780bff5279c6c2d356e5c7726b656bd9c68532b8 (patch) | |
tree | 0a5ba9e89c83cf4364d48c088aba4e2eb24251c9 /Source/cmExtraCodeBlocksGenerator.cxx | |
parent | 6bd7bd1e06fcf92d40c762f2713626d125cb8f87 (diff) | |
download | CMake-780bff5279c6c2d356e5c7726b656bd9c68532b8.zip CMake-780bff5279c6c2d356e5c7726b656bd9c68532b8.tar.gz CMake-780bff5279c6c2d356e5c7726b656bd9c68532b8.tar.bz2 |
cmake: Store hardcoded lists of sources and headers
Don't duplicate this in each cmMakefile.
Diffstat (limited to 'Source/cmExtraCodeBlocksGenerator.cxx')
-rw-r--r-- | Source/cmExtraCodeBlocksGenerator.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index 597c9d8..9348ef2 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -383,6 +383,9 @@ void cmExtraCodeBlocksGenerator all_files_map_t allFiles; std::vector<std::string> cFiles; + std::vector<std::string> srcExts = + this->GlobalGenerator->GetCMakeInstance()->GetSourceExtensions(); + for (std::vector<cmLocalGenerator*>::const_iterator lg=lgs.begin(); lg!=lgs.end(); lg++) { @@ -420,9 +423,7 @@ void cmExtraCodeBlocksGenerator { 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) { @@ -449,6 +450,9 @@ void cmExtraCodeBlocksGenerator } } + std::vector<std::string> headerExts = + this->GlobalGenerator->GetCMakeInstance()->GetHeaderExtensions(); + // The following loop tries to add header files matching to implementation // files to the project. It does that by iterating over all // C/C++ source files, @@ -468,8 +472,8 @@ void cmExtraCodeBlocksGenerator // 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; |