summaryrefslogtreecommitdiffstats
path: root/Source/cmDependsC.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-07-22 16:50:37 (GMT)
committerBrad King <brad.king@kitware.com>2014-07-22 19:24:57 (GMT)
commit85cea8a7af77cd482f4d3c7ec15f68bc5adeb0ba (patch)
tree4495141e654dda4b21f542ddb3a3703f86710102 /Source/cmDependsC.cxx
parente7ee892b391992e0e8198917b8ef5cce76da2fd1 (diff)
downloadCMake-85cea8a7af77cd482f4d3c7ec15f68bc5adeb0ba.zip
CMake-85cea8a7af77cd482f4d3c7ec15f68bc5adeb0ba.tar.gz
CMake-85cea8a7af77cd482f4d3c7ec15f68bc5adeb0ba.tar.bz2
cmDepends: Refactor object file path conversion
Delay conversion of the path to object files (on the left-hand side of dependencies) until just before they are written. Also do not convert the format of paths written to the 'depend.internal' file. This is consistent with the way the right-hand side of dependencies are already handled.
Diffstat (limited to 'Source/cmDependsC.cxx')
-rw-r--r--Source/cmDependsC.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx
index dd239c4..a1fc268 100644
--- a/Source/cmDependsC.cxx
+++ b/Source/cmDependsC.cxx
@@ -269,11 +269,17 @@ 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.
- internalDepends << obj << std::endl;
+ std::string obj_i =
+ this->LocalGenerator->Convert(obj, cmLocalGenerator::HOME_OUTPUT);
+ std::string obj_m =
+ this->LocalGenerator->ConvertToOutputFormat(obj_i,
+ cmLocalGenerator::MAKERULE);
+ internalDepends << obj_i << std::endl;
+
for(std::set<std::string>::const_iterator i=dependencies.begin();
i != dependencies.end(); ++i)
{
- makeDepends << obj << ": " <<
+ makeDepends << obj_m << ": " <<
this->LocalGenerator->Convert(*i,
cmLocalGenerator::HOME_OUTPUT,
cmLocalGenerator::MAKERULE)