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/cmSourceFileLocation.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/cmSourceFileLocation.cxx')
-rw-r--r-- | Source/cmSourceFileLocation.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/cmSourceFileLocation.cxx b/Source/cmSourceFileLocation.cxx index b8d5c020b2..00d5d6afe2 100644 --- a/Source/cmSourceFileLocation.cxx +++ b/Source/cmSourceFileLocation.cxx @@ -121,8 +121,10 @@ void cmSourceFileLocation::UpdateExtension(const std::string& name) // The global generator checks extensions of enabled languages. cmGlobalGenerator* gg = this->Makefile->GetGlobalGenerator(); cmMakefile const* mf = this->Makefile; - const std::vector<std::string>& srcExts = mf->GetSourceExtensions(); - const std::vector<std::string>& hdrExts = mf->GetHeaderExtensions(); + const std::vector<std::string>& srcExts = + mf->GetCMakeInstance()->GetSourceExtensions(); + const std::vector<std::string>& hdrExts = + mf->GetCMakeInstance()->GetHeaderExtensions(); if(!gg->GetLanguageFromExtension(ext.c_str()).empty() || std::find(srcExts.begin(), srcExts.end(), ext) != srcExts.end() || std::find(hdrExts.begin(), hdrExts.end(), ext) != hdrExts.end()) @@ -193,12 +195,14 @@ cmSourceFileLocation // disk. One of these must match if loc refers to this source file. std::string const& ext = this->Name.substr(loc.Name.size()+1); cmMakefile const* mf = this->Makefile; - const std::vector<std::string>& srcExts = mf->GetSourceExtensions(); + const std::vector<std::string>& srcExts = + mf->GetCMakeInstance()->GetSourceExtensions(); if(std::find(srcExts.begin(), srcExts.end(), ext) != srcExts.end()) { return true; } - const std::vector<std::string>& hdrExts = mf->GetHeaderExtensions(); + std::vector<std::string> hdrExts = + mf->GetCMakeInstance()->GetHeaderExtensions(); if(std::find(hdrExts.begin(), hdrExts.end(), ext) != hdrExts.end()) { return true; |