summaryrefslogtreecommitdiffstats
path: root/Source
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
parentbfe56f6802fc7db7f8e824aab8881be6cf23ccef (diff)
downloadCMake-5d19e8aa6aac75fb08897aece8aa5545360aeeb2.zip
CMake-5d19e8aa6aac75fb08897aece8aa5545360aeeb2.tar.gz
CMake-5d19e8aa6aac75fb08897aece8aa5545360aeeb2.tar.bz2
Ninja: Appease various compilers
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx11
-rw-r--r--Source/cmGlobalNinjaGenerator.h2
-rw-r--r--Source/cmLocalNinjaGenerator.h4
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx1
-rw-r--r--Source/cmNinjaUtilityTargetGenerator.cxx4
5 files changed, 12 insertions, 10 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);
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 171d14b..6f3c6b2 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -255,7 +255,7 @@ private:
void AddDependencyToAll(cmTarget* target);
- void WriteAssumedSourceDependencies(std::ostream& os);
+ void WriteAssumedSourceDependencies();
void AppendTargetOutputs(cmTarget* target, cmNinjaDeps& outputs);
void AppendTargetDepends(cmTarget* target, cmNinjaDeps& outputs);
diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h
index fee9cd0..8ef4d28 100644
--- a/Source/cmLocalNinjaGenerator.h
+++ b/Source/cmLocalNinjaGenerator.h
@@ -97,8 +97,8 @@ private:
struct map_to_ninja_path {
cmLocalNinjaGenerator *LocalGenerator;
- map_to_ninja_path(cmLocalNinjaGenerator *LocalGenerator)
- : LocalGenerator(LocalGenerator) {}
+ map_to_ninja_path(cmLocalNinjaGenerator *LocalGen)
+ : LocalGenerator(LocalGen) {}
std::string operator()(const std::string &path) {
return LocalGenerator->ConvertToNinjaPath(path.c_str());
}
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index d7f8ad7..4dd6a9b 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -281,6 +281,7 @@ cmNinjaNormalTargetGenerator
default:
assert(0 && "Unexpected target type");
}
+ return std::vector<std::string>();
}
void cmNinjaNormalTargetGenerator::WriteLinkStatement()
diff --git a/Source/cmNinjaUtilityTargetGenerator.cxx b/Source/cmNinjaUtilityTargetGenerator.cxx
index bfe6f07..bf8194d 100644
--- a/Source/cmNinjaUtilityTargetGenerator.cxx
+++ b/Source/cmNinjaUtilityTargetGenerator.cxx
@@ -39,8 +39,8 @@ void cmNinjaUtilityTargetGenerator::Generate()
this->GetLocalGenerator()->AddCustomCommandTarget(cc, this->GetTarget());
// Depend on all custom command outputs.
- const std::vector<std::string>& outputs = cc->GetOutputs();
- std::transform(outputs.begin(), outputs.end(),
+ const std::vector<std::string>& ccOutputs = cc->GetOutputs();
+ std::transform(ccOutputs.begin(), ccOutputs.end(),
std::back_inserter(deps), MapToNinjaPath());
}
}