summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2012-02-05 01:48:08 (GMT)
committerPeter Collingbourne <peter@pcc.me.uk>2012-02-05 01:48:08 (GMT)
commit5d19e8aa6aac75fb08897aece8aa5545360aeeb2 (patch)
treee0b146f3ba228be4542b663c69facc6b266609fa /Source/cmGlobalNinjaGenerator.cxx
parentbfe56f6802fc7db7f8e824aab8881be6cf23ccef (diff)
downloadCMake-5d19e8aa6aac75fb08897aece8aa5545360aeeb2.zip
CMake-5d19e8aa6aac75fb08897aece8aa5545360aeeb2.tar.gz
CMake-5d19e8aa6aac75fb08897aece8aa5545360aeeb2.tar.bz2
Ninja: Appease various compilers
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 8b633bf..7ff33ba 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -367,7 +367,7 @@ void cmGlobalNinjaGenerator::Generate()
this->cmGlobalGenerator::Generate();
- this->WriteAssumedSourceDependencies(*this->BuildFileStream);
+ this->WriteAssumedSourceDependencies();
this->WriteTargetAliases(*this->BuildFileStream);
this->WriteBuiltinTargets(*this->BuildFileStream);
@@ -591,15 +591,16 @@ void cmGlobalNinjaGenerator::AddDependencyToAll(cmTarget* target)
this->AppendTargetOutputs(target, this->AllDependencies);
}
-void cmGlobalNinjaGenerator::WriteAssumedSourceDependencies(std::ostream& os)
+void cmGlobalNinjaGenerator::WriteAssumedSourceDependencies()
{
for (std::map<std::string, std::set<std::string> >::iterator
i = this->AssumedSourceDependencies.begin();
i != this->AssumedSourceDependencies.end(); ++i) {
+ cmNinjaDeps deps;
+ std::copy(i->second.begin(), i->second.end(), std::back_inserter(deps));
WriteCustomCommandBuild(/*command=*/"", /*description=*/"",
"Assume dependencies for generated source file.",
- cmNinjaDeps(1, i->first),
- cmNinjaDeps(i->second.begin(), i->second.end()));
+ cmNinjaDeps(1, i->first), deps);
}
}
@@ -653,7 +654,7 @@ cmGlobalNinjaGenerator
// Global targets only depend on other utilities, which may not appear in
// the TargetDepends set (e.g. "all").
std::set<cmStdString> const& utils = target->GetUtilities();
- outputs.insert(outputs.end(), utils.begin(), utils.end());
+ std::copy(utils.begin(), utils.end(), std::back_inserter(outputs));
} else {
cmTargetDependSet const& targetDeps =
this->GetTargetDirectDepends(*target);