diff options
author | Brad King <brad.king@kitware.com> | 2014-07-22 16:50:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-07-22 19:24:57 (GMT) |
commit | 85cea8a7af77cd482f4d3c7ec15f68bc5adeb0ba (patch) | |
tree | 4495141e654dda4b21f542ddb3a3703f86710102 /Source/cmDependsC.cxx | |
parent | e7ee892b391992e0e8198917b8ef5cce76da2fd1 (diff) | |
download | CMake-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.cxx | 10 |
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) |