[Cmake-commits] CMake branch, next, updated. v3.0.1-5235-gbf43cd8
Brad King
brad.king at kitware.com
Mon Sep 8 15:31:14 EDT 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via bf43cd8ad9988e1a2c43e7bcd348ee68b9f2a5f8 (commit)
via 3ab35e8368f2a05930a11ba338e36a3ce99775d8 (commit)
from b31e4a2262ea41a88c7bb3bbc7e8aa683f90e33c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf43cd8ad9988e1a2c43e7bcd348ee68b9f2a5f8
commit bf43cd8ad9988e1a2c43e7bcd348ee68b9f2a5f8
Merge: b31e4a2 3ab35e8
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 8 15:31:13 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Sep 8 15:31:13 2014 -0400
Merge topic 'update-kwsys' into next
3ab35e83 KWSys: Revert 'SystemTools: Improve RelativePath() to handle ./ ../ and //'
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3ab35e8368f2a05930a11ba338e36a3ce99775d8
commit 3ab35e8368f2a05930a11ba338e36a3ce99775d8
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 8 15:30:22 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Sep 8 15:30:22 2014 -0400
KWSys: Revert 'SystemTools: Improve RelativePath() to handle ./ ../ and //'
Temporarily revert this part of the KWSys update to resolve the
ExternalData test failure.
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index 87fdfbe..e34bb43 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -3425,12 +3425,9 @@ kwsys_stl::string SystemTools::RelativePath(const kwsys_stl::string& local, cons
return "";
}
- kwsys_stl::string l = SystemTools::CollapseFullPath(local);
- kwsys_stl::string r = SystemTools::CollapseFullPath(remote);
-
// split up both paths into arrays of strings using / as a separator
- kwsys_stl::vector<kwsys::String> localSplit = SystemTools::SplitString(l, '/', true);
- kwsys_stl::vector<kwsys::String> remoteSplit = SystemTools::SplitString(r, '/', true);
+ kwsys_stl::vector<kwsys::String> localSplit = SystemTools::SplitString(local, '/', true);
+ kwsys_stl::vector<kwsys::String> remoteSplit = SystemTools::SplitString(remote, '/', true);
kwsys_stl::vector<kwsys::String> commonPath; // store shared parts of path in this array
kwsys_stl::vector<kwsys::String> finalPath; // store the final relative path here
// count up how many matching directory names there are from the start
diff --git a/Source/kwsys/testSystemTools.cxx b/Source/kwsys/testSystemTools.cxx
index a7cfa0d..04ab4fc 100644
--- a/Source/kwsys/testSystemTools.cxx
+++ b/Source/kwsys/testSystemTools.cxx
@@ -562,33 +562,6 @@ static bool CheckEnvironmentOperations()
return res;
}
-
-static bool CheckRelativePath(
- const kwsys_stl::string& local,
- const kwsys_stl::string& remote,
- const kwsys_stl::string& expected)
-{
- kwsys_stl::string result = kwsys::SystemTools::RelativePath(local, remote);
- if(expected != result)
- {
- kwsys_ios::cerr << "RelativePath(" << local << ", " << remote
- << ") yielded " << result << " instead of " << expected << kwsys_ios::endl;
- return false;
- }
- return true;
-}
-
-static bool CheckRelativePaths()
-{
- bool res = true;
- res &= CheckRelativePath("/usr/share", "/bin/bash", "../../bin/bash");
- res &= CheckRelativePath("/usr/./share/", "/bin/bash", "../../bin/bash");
- res &= CheckRelativePath("/usr//share/", "/bin/bash", "../../bin/bash");
- res &= CheckRelativePath("/usr/share/../bin/", "/bin/bash", "../../bin/bash");
- res &= CheckRelativePath("/usr/share", "/usr/share//bin", "bin");
- return res;
-}
-
//----------------------------------------------------------------------------
int testSystemTools(int, char*[])
{
@@ -620,7 +593,5 @@ int testSystemTools(int, char*[])
res &= CheckEnvironmentOperations();
- res &= CheckRelativePaths();
-
return res ? 0 : 1;
}
-----------------------------------------------------------------------
Summary of changes:
Source/kwsys/SystemTools.cxx | 7 ++-----
Source/kwsys/testSystemTools.cxx | 29 -----------------------------
2 files changed, 2 insertions(+), 34 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list