summaryrefslogtreecommitdiff
path: root/Source/cmTargetLinkLibrariesCommand.cxx
diff options
context:
space:
mode:
authorPavel Solodovnikov <hellyeahdominate@gmail.com>2017-09-11 13:40:26 +0300
committerPavel Solodovnikov <hellyeahdominate@gmail.com>2017-09-12 16:22:47 +0300
commit7d5095796ab616cf9b709036387bb95ab9984141 (patch)
treec010e922adad95ef86ab4a3ac2a3abd63e9f33ef /Source/cmTargetLinkLibrariesCommand.cxx
parent00975e926199eea21763470e2ab876246e36669a (diff)
downloadcmake-7d5095796ab616cf9b709036387bb95ab9984141.tar.gz
Meta: modernize old-fashioned loops to range-based `for`.
Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
Diffstat (limited to 'Source/cmTargetLinkLibrariesCommand.cxx')
-rw-r--r--Source/cmTargetLinkLibrariesCommand.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx
index d146640031..dda0464de2 100644
--- a/Source/cmTargetLinkLibrariesCommand.cxx
+++ b/Source/cmTargetLinkLibrariesCommand.cxx
@@ -429,10 +429,9 @@ bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib,
// Include this library in the link interface for the target.
if (llt == DEBUG_LibraryType || llt == GENERAL_LibraryType) {
// Put in the DEBUG configuration interfaces.
- for (std::vector<std::string>::const_iterator i = debugConfigs.begin();
- i != debugConfigs.end(); ++i) {
+ for (std::string const& dc : debugConfigs) {
prop = "LINK_INTERFACE_LIBRARIES_";
- prop += *i;
+ prop += dc;
this->Target->AppendProperty(prop, lib.c_str());
}
}
@@ -442,10 +441,9 @@ bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib,
// Make sure the DEBUG configuration interfaces exist so that the
// general one will not be used as a fall-back.
- for (std::vector<std::string>::const_iterator i = debugConfigs.begin();
- i != debugConfigs.end(); ++i) {
+ for (std::string const& dc : debugConfigs) {
prop = "LINK_INTERFACE_LIBRARIES_";
- prop += *i;
+ prop += dc;
if (!this->Target->GetProperty(prop)) {
this->Target->SetProperty(prop, "");
}