diff options
author | Brad King <brad.king@kitware.com> | 2020-03-11 13:26:34 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-03-11 13:27:24 (GMT) |
commit | c7c6e103d1209f7e29cb2909cf342be75478f304 (patch) | |
tree | 922113908b7f545775c8786bef179c8260cc2c91 /Source/cmGhsMultiTargetGenerator.cxx | |
parent | 38072787d53dbd7fbf2d8f85f99a81604de37dcf (diff) | |
parent | cbbca9ee2aba6fa08a3931c69fde92b7b9b273c0 (diff) | |
download | CMake-c7c6e103d1209f7e29cb2909cf342be75478f304.zip CMake-c7c6e103d1209f7e29cb2909cf342be75478f304.tar.gz CMake-c7c6e103d1209f7e29cb2909cf342be75478f304.tar.bz2 |
Merge topic 'loops-improve'
cbbca9ee2a Convert more loops to range-based for-loops
9296cd0551 GHS: Name range-based for-loop variable types explicitly
db17de2438 GHS: Use cm::erase in place of loop
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4446
Diffstat (limited to 'Source/cmGhsMultiTargetGenerator.cxx')
-rw-r--r-- | Source/cmGhsMultiTargetGenerator.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 388e893..6470ea1 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -231,7 +231,7 @@ void cmGhsMultiTargetGenerator::WriteCompilerFlags(std::ostream& fout, if (!flagsByLangI->second.empty()) { std::vector<std::string> ghsCompFlags = cmSystemTools::ParseArguments(flagsByLangI->second); - for (auto& f : ghsCompFlags) { + for (const std::string& f : ghsCompFlags) { fout << " " << f << std::endl; } } @@ -286,14 +286,14 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLine(std::ostream& fout, // write out link options std::vector<std::string> lopts = cmSystemTools::ParseArguments(linkFlags); - for (auto& l : lopts) { + for (const std::string& l : lopts) { fout << " " << l << std::endl; } // write out link search paths // must be quoted for paths that contain spaces std::vector<std::string> lpath = cmSystemTools::ParseArguments(linkPath); - for (auto& l : lpath) { + for (const std::string& l : lpath) { fout << " -L\"" << l << "\"" << std::endl; } @@ -303,7 +303,7 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLine(std::ostream& fout, std::vector<std::string> llibs = cmSystemTools::ParseArguments(linkLibraries); - for (auto& l : llibs) { + for (const std::string& l : llibs) { if (l.compare(0, 2, "-l") == 0) { fout << " \"" << l << "\"" << std::endl; } else { @@ -459,7 +459,7 @@ void cmGhsMultiTargetGenerator::WriteSourceProperty( const char* prop = sf->GetProperty(propName); if (prop) { std::vector<std::string> list = cmExpandedList(prop); - for (auto& p : list) { + for (const std::string& p : list) { fout << " " << propFlag << p << std::endl; } } @@ -479,7 +479,7 @@ void cmGhsMultiTargetGenerator::WriteSources(std::ostream& fout_proj) /* for each source file assign it to its group */ std::map<std::string, std::vector<cmSourceFile*>> groupFiles; std::set<std::string> groupNames; - for (auto& sf : sources) { + for (cmSourceFile* sf : sources) { cmSourceGroup* sourceGroup = this->Makefile->FindSourceGroup(sf->ResolveFullPath(), sourceGroups); std::string gn = sourceGroup->GetFullName(); @@ -726,7 +726,7 @@ bool cmGhsMultiTargetGenerator::DetermineIfIntegrityApp() } std::vector<cmSourceFile*> sources; this->GeneratorTarget->GetSourceFiles(sources, this->ConfigName); - for (auto& sf : sources) { + for (const cmSourceFile* sf : sources) { if ("int" == sf->GetExtension()) { return true; } |