summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx31
1 files changed, 8 insertions, 23 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 5d68d9d..c7b2715 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -424,12 +424,8 @@ void cmTarget::SetMakefile(cmMakefile* mf)
const std::set<std::string> parentSystemIncludes =
this->Makefile->GetSystemIncludeDirectories();
- for (std::set<std::string>::const_iterator it
- = parentSystemIncludes.begin();
- it != parentSystemIncludes.end(); ++it)
- {
- this->SystemIncludeDirectories.insert(*it);
- }
+ this->SystemIncludeDirectories.insert(parentSystemIncludes.begin(),
+ parentSystemIncludes.end());
const std::vector<cmValueWithOrigin> parentOptions =
this->Makefile->GetCompileOptionsEntries();
@@ -1397,22 +1393,14 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf,
void
cmTarget::AddSystemIncludeDirectories(const std::set<std::string> &incs)
{
- for(std::set<std::string>::const_iterator li = incs.begin();
- li != incs.end(); ++li)
- {
- this->SystemIncludeDirectories.insert(*li);
- }
+ this->SystemIncludeDirectories.insert(incs.begin(), incs.end());
}
//----------------------------------------------------------------------------
void
cmTarget::AddSystemIncludeDirectories(const std::vector<std::string> &incs)
{
- for(std::vector<std::string>::const_iterator li = incs.begin();
- li != incs.end(); ++li)
- {
- this->SystemIncludeDirectories.insert(*li);
- }
+ this->SystemIncludeDirectories.insert(incs.begin(), incs.end());
}
#if defined(_WIN32) && !defined(__CYGWIN__)
@@ -6070,8 +6058,8 @@ cmTargetInternals::ComputeLinkInterfaceLibraries(
// The link implementation is the default link interface.
cmTarget::LinkImplementationLibraries const* impl =
thisTarget->GetLinkImplementationLibrariesInternal(config, headTarget);
- std::copy(impl->Libraries.begin(), impl->Libraries.end(),
- std::back_inserter(iface.Libraries));
+ iface.Libraries.insert(iface.Libraries.end(),
+ impl->Libraries.begin(), impl->Libraries.end());
if(thisTarget->PolicyStatusCMP0022 == cmPolicies::WARN &&
!this->PolicyWarnedCMP0022 && !usage_requirements_only)
{
@@ -6449,11 +6437,8 @@ cmTargetInternals::ComputeLinkImplementationLanguages(
// Get languages used in our source files.
thisTarget->GetLanguages(languages, config);
// Copy the set of langauges to the link implementation.
- for(std::set<std::string>::iterator li = languages.begin();
- li != languages.end(); ++li)
- {
- impl.Languages.push_back(*li);
- }
+ impl.Languages.insert(impl.Languages.begin(),
+ languages.begin(), languages.end());
}
//----------------------------------------------------------------------------