diff options
author | Stephen Kelly <steveire@gmail.com> | 2016-09-07 21:14:30 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2016-09-19 19:36:13 (GMT) |
commit | 1825f876a7467a97b1cb3f6dd60f95c173d9e61b (patch) | |
tree | 0d70f9ac13c2886f0ec77e2156956b05c7067e3e /Source/cmDependsC.cxx | |
parent | 25c39ac28b42234d08c3906ce24ac739f6111506 (diff) | |
download | CMake-1825f876a7467a97b1cb3f6dd60f95c173d9e61b.zip CMake-1825f876a7467a97b1cb3f6dd60f95c173d9e61b.tar.gz CMake-1825f876a7467a97b1cb3f6dd60f95c173d9e61b.tar.bz2 |
Convert: Move access to BinaryDirectory out of loops
Diffstat (limited to 'Source/cmDependsC.cxx')
-rw-r--r-- | Source/cmDependsC.cxx | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx index 48a32f1..3296ffc 100644 --- a/Source/cmDependsC.cxx +++ b/Source/cmDependsC.cxx @@ -239,20 +239,18 @@ bool cmDependsC::WriteDependencies(const std::set<std::string>& sources, // written by the original local generator for this directory // convert the dependencies to paths relative to the home output // directory. We must do the same here. - std::string obj_i = this->LocalGenerator->ConvertToRelativePath( - this->LocalGenerator->GetBinaryDirectory(), obj); + std::string binDir = this->LocalGenerator->GetBinaryDirectory(); + std::string obj_i = this->LocalGenerator->ConvertToRelativePath(binDir, obj); std::string obj_m = cmSystemTools::ConvertToOutputPath(obj_i.c_str()); internalDepends << obj_i << std::endl; for (std::set<std::string>::const_iterator i = dependencies.begin(); i != dependencies.end(); ++i) { - makeDepends << obj_m << ": " - << cmSystemTools::ConvertToOutputPath( - this->LocalGenerator - ->ConvertToRelativePath( - this->LocalGenerator->GetBinaryDirectory(), *i) - .c_str()) - << std::endl; + makeDepends + << obj_m << ": " + << cmSystemTools::ConvertToOutputPath( + this->LocalGenerator->ConvertToRelativePath(binDir, *i).c_str()) + << std::endl; internalDepends << " " << *i << std::endl; } makeDepends << std::endl; |