Ninja: Appease various compilers
This commit is contained in:
parent
bfe56f6802
commit
5d19e8aa6a
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -281,6 +281,7 @@ cmNinjaNormalTargetGenerator
|
|||
default:
|
||||
assert(0 && "Unexpected target type");
|
||||
}
|
||||
return std::vector<std::string>();
|
||||
}
|
||||
|
||||
void cmNinjaNormalTargetGenerator::WriteLinkStatement()
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue