diff options
author | Brad King <brad.king@kitware.com> | 2014-06-16 14:09:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-06-23 13:17:06 (GMT) |
commit | 47ab3ca64105cdfcc7b57ffe037aa93d8226b945 (patch) | |
tree | 6dd1053630a7c7da2b706cb9f53e696dd07e176b /Source | |
parent | 9f3ed029ce830f0395e102258758a4b3680e5d0f (diff) | |
download | CMake-47ab3ca64105cdfcc7b57ffe037aa93d8226b945.zip CMake-47ab3ca64105cdfcc7b57ffe037aa93d8226b945.tar.gz CMake-47ab3ca64105cdfcc7b57ffe037aa93d8226b945.tar.bz2 |
cmTarget: Constify GetLinkImplementationClosure results
Populate a vector of "cmTarget const*" instead of "cmTarget*".
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmTarget.cxx | 20 | ||||
-rw-r--r-- | Source/cmTarget.h | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 96f28af..4ef481a 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -177,7 +177,7 @@ public: CachedLinkInterfaceSourcesEntries; mutable std::map<std::string, std::vector<TargetPropertyEntry*> > CachedLinkInterfaceCompileFeaturesEntries; - mutable std::map<std::string, std::vector<cmTarget*> > + mutable std::map<std::string, std::vector<cmTarget const*> > CachedLinkImplementationClosure; mutable std::map<std::string, bool> CacheLinkInterfaceIncludeDirectoriesDone; @@ -5219,7 +5219,7 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt, assert((impliedByUse ^ explicitlySet) || (!impliedByUse && !explicitlySet)); - std::vector<cmTarget*> const& deps = + std::vector<cmTarget const*> const& deps = tgt->GetLinkImplementationClosure(config); if(deps.empty()) @@ -5245,7 +5245,7 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt, report += "\" property not set.\n"; } - for(std::vector<cmTarget*>::const_iterator li = + for(std::vector<cmTarget const*>::const_iterator li = deps.begin(); li != deps.end(); ++li) { @@ -5435,7 +5435,7 @@ bool isLinkDependentProperty(cmTarget const* tgt, const std::string &p, const std::string& interfaceProperty, const std::string& config) { - std::vector<cmTarget*> const& deps = + std::vector<cmTarget const*> const& deps = tgt->GetLinkImplementationClosure(config); if(deps.empty()) @@ -5443,8 +5443,7 @@ bool isLinkDependentProperty(cmTarget const* tgt, const std::string &p, return false; } - for(std::vector<cmTarget*>::const_iterator li = - deps.begin(); + for(std::vector<cmTarget const*>::const_iterator li = deps.begin(); li != deps.end(); ++li) { const char *prop = (*li)->GetProperty(interfaceProperty); @@ -6151,7 +6150,8 @@ cmTarget::GetImportLinkInterface(const std::string& config, void processILibs(const std::string& config, cmTarget const* headTarget, std::string const& name, - std::vector<cmTarget*>& tgts, std::set<cmTarget*>& emitted) + std::vector<cmTarget const*>& tgts, + std::set<cmTarget const*>& emitted) { cmTarget* tgt = headTarget->GetMakefile() ->FindTargetToUse(name); @@ -6172,15 +6172,15 @@ void processILibs(const std::string& config, } //---------------------------------------------------------------------------- -std::vector<cmTarget*> const& +std::vector<cmTarget const*> const& cmTarget::GetLinkImplementationClosure(const std::string& config) const { - std::vector<cmTarget*>& tgts = + std::vector<cmTarget const*>& tgts = this->Internal->CachedLinkImplementationClosure[config]; if(!this->Internal->CacheLinkImplementationClosureDone[config]) { this->Internal->CacheLinkImplementationClosureDone[config] = true; - std::set<cmTarget*> emitted; + std::set<cmTarget const*> emitted; cmTarget::LinkImplementation const* impl = this->GetLinkImplementationLibraries(config); diff --git a/Source/cmTarget.h b/Source/cmTarget.h index fae1bbb..cb68559 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -273,7 +273,7 @@ public: void GetTransitivePropertyTargets(const std::string& config, cmTarget const* headTarget, std::vector<cmTarget const*> &libs) const; - std::vector<cmTarget*> const& + std::vector<cmTarget const*> const& GetLinkImplementationClosure(const std::string& config) const; /** The link implementation specifies the direct library |