diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-01-06 21:18:38 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-01-06 21:18:38 (GMT) |
commit | d1efed14154a708f3b72bdff8f8dbe4a4927bc6e (patch) | |
tree | 13fcfd510f0a908b3cc8a30798deace42ef018a8 /Source/cmLocalGenerator.cxx | |
parent | c83f3b3c4cbb828e19760901cbf542e4fced64c5 (diff) | |
download | CMake-d1efed14154a708f3b72bdff8f8dbe4a4927bc6e.zip CMake-d1efed14154a708f3b72bdff8f8dbe4a4927bc6e.tar.gz CMake-d1efed14154a708f3b72bdff8f8dbe4a4927bc6e.tar.bz2 |
ENH: fix for hp make and relative paths never have targets with a ./ at the start of the name
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index e3454ba..9630421 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -192,5 +192,16 @@ std::string cmLocalGenerator::ConvertToRelativeOutputPath(const char* p) } } ret = cmSystemTools::ConvertToOutputPath(ret.c_str()); + if(ret.size() > 2 && + (ret[0] == '.') && + ( (ret[1] == '/') || ret[1] == '\\')) + { + std::string upath = ret; + cmSystemTools::ConvertToUnixSlashes(upath); + if(upath.find(2, '/') == upath.npos) + { + ret = ret.substr(2, ret.size()-2); + } + } return ret; } |