diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-01-20 19:35:25 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-01-20 19:35:25 (GMT) |
commit | 1690c45626fb2bbe8176b6944a5dfb040952b86f (patch) | |
tree | c896892f040fd9e5864f591e980a97dc629ac769 /Source | |
parent | 9878c9ea34ad1f36fd4af9a07be54a23e8591078 (diff) | |
download | CMake-1690c45626fb2bbe8176b6944a5dfb040952b86f.zip CMake-1690c45626fb2bbe8176b6944a5dfb040952b86f.tar.gz CMake-1690c45626fb2bbe8176b6944a5dfb040952b86f.tar.bz2 |
ENH: dont do relative paths when nothing is relative
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmSystemTools.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index c36529b..a94f223 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1158,6 +1158,10 @@ std::string cmSystemTools::RelativePath(const char* local, const char* remote) { sameCount++; } + if(sameCount == 0) + { + return std::string(remote); + } // put in sameCount number of ../ into the path unsigned int i; for(i = sameCount; i < fileSplit.size(); ++i) |