Convert: Move access to BinaryDirectory out of loops
This commit is contained in:
parent
e7c8956746
commit
4d69ac7697
|
@ -429,16 +429,14 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
|
||||||
modFile += "/";
|
modFile += "/";
|
||||||
modFile += *i;
|
modFile += *i;
|
||||||
modFile = this->LocalGenerator->ConvertToOutputFormat(
|
modFile = this->LocalGenerator->ConvertToOutputFormat(
|
||||||
this->LocalGenerator->ConvertToRelativePath(
|
this->LocalGenerator->ConvertToRelativePath(binDir, modFile),
|
||||||
this->LocalGenerator->GetBinaryDirectory(), modFile),
|
|
||||||
cmOutputConverter::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
std::string stampFile = stamp_dir;
|
std::string stampFile = stamp_dir;
|
||||||
stampFile += "/";
|
stampFile += "/";
|
||||||
stampFile += m;
|
stampFile += m;
|
||||||
stampFile += ".mod.stamp";
|
stampFile += ".mod.stamp";
|
||||||
stampFile = this->LocalGenerator->ConvertToOutputFormat(
|
stampFile = this->LocalGenerator->ConvertToOutputFormat(
|
||||||
this->LocalGenerator->ConvertToRelativePath(
|
this->LocalGenerator->ConvertToRelativePath(binDir, stampFile),
|
||||||
this->LocalGenerator->GetBinaryDirectory(), stampFile),
|
|
||||||
cmOutputConverter::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
makeDepends << "\t$(CMAKE_COMMAND) -E cmake_copy_f90_mod " << modFile
|
makeDepends << "\t$(CMAKE_COMMAND) -E cmake_copy_f90_mod " << modFile
|
||||||
<< " " << stampFile;
|
<< " " << stampFile;
|
||||||
|
|
|
@ -900,13 +900,13 @@ bool cmMakefileTargetGenerator::WriteMakeRule(
|
||||||
|
|
||||||
// For multiple outputs, make the extra ones depend on the first one.
|
// For multiple outputs, make the extra ones depend on the first one.
|
||||||
std::vector<std::string> const output_depends(1, outputs[0]);
|
std::vector<std::string> const output_depends(1, outputs[0]);
|
||||||
|
std::string binDir = this->LocalGenerator->GetBinaryDirectory();
|
||||||
for (std::vector<std::string>::const_iterator o = outputs.begin() + 1;
|
for (std::vector<std::string>::const_iterator o = outputs.begin() + 1;
|
||||||
o != outputs.end(); ++o) {
|
o != outputs.end(); ++o) {
|
||||||
// Touch the extra output so "make" knows that it was updated,
|
// Touch the extra output so "make" knows that it was updated,
|
||||||
// but only if the output was acually created.
|
// but only if the output was acually created.
|
||||||
std::string const out = this->LocalGenerator->ConvertToOutputFormat(
|
std::string const out = this->LocalGenerator->ConvertToOutputFormat(
|
||||||
this->LocalGenerator->ConvertToRelativePath(
|
this->LocalGenerator->ConvertToRelativePath(binDir, *o),
|
||||||
this->LocalGenerator->GetBinaryDirectory(), *o),
|
|
||||||
cmOutputConverter::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
std::vector<std::string> output_commands;
|
std::vector<std::string> output_commands;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue