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, master has been updated
       via  457bcbd4f9e4972ed55aebf642770b79fa5e8a58 (commit)
       via  62c5fc80b1a82d677b66134e00cec44ab2e6a466 (commit)
       via  52ed76e46e6c295c4e6bfafd86f5b16f67606581 (commit)
       via  d280327713a8bfd96223bc653316d987f5b9218b (commit)
       via  df1693bdfc7bc0afa26b2f8673006186a822c735 (commit)
       via  20676cbaca92d1b3ad486518e34e99aef75ebe11 (commit)
       via  8285aa9e4e2df09b35f4faa930da6577979d4d2a (commit)
       via  be46f9fb6e9fc0b33198ccf5396e0188e56940e4 (commit)
       via  854feacc60c5d1dcf53652a764841e1d9d602ac3 (commit)
      from  a53697acc76c8fa452cf083ca9f02b3f1cfd7711 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=457bcbd4f9e4972ed55aebf642770b79fa5e8a58
commit 457bcbd4f9e4972ed55aebf642770b79fa5e8a58
Merge: 62c5fc8 df1693b
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Fri Feb 2 12:23:04 2018 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Fri Feb 2 07:24:07 2018 -0500

    Merge topic 'simplify-ccg-converter'
    
    df1693bd cmCustomCommandGenerator: Simplify cmOutputConverter access
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !1738


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=62c5fc80b1a82d677b66134e00cec44ab2e6a466
commit 62c5fc80b1a82d677b66134e00cec44ab2e6a466
Merge: 52ed76e 8285aa9
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Fri Feb 2 12:23:15 2018 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Fri Feb 2 07:23:38 2018 -0500

    Merge topic 'test-cuda-missing-check'
    
    8285aa9e Tests: Add missing error check in CudaOnly.GPUDebugFlag
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Acked-by: Robert Maynard <robert.mayn...@kitware.com>
    Merge-request: !1739


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=52ed76e46e6c295c4e6bfafd86f5b16f67606581
commit 52ed76e46e6c295c4e6bfafd86f5b16f67606581
Merge: d280327 20676cb
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Fri Feb 2 12:22:54 2018 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Fri Feb 2 07:23:08 2018 -0500

    Merge topic 'ninja-unused-device-link'
    
    20676cba Ninja: Remove unused device link line code
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !1737


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d280327713a8bfd96223bc653316d987f5b9218b
commit d280327713a8bfd96223bc653316d987f5b9218b
Merge: a53697a be46f9f
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Fri Feb 2 12:22:30 2018 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Fri Feb 2 07:22:40 2018 -0500

    Merge topic 'update-kwsys'
    
    be46f9fb Merge branch 'upstream-KWSys' into update-kwsys
    854feacc KWSys 2018-02-01 (04fcc449)
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !1736


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=df1693bdfc7bc0afa26b2f8673006186a822c735
commit df1693bdfc7bc0afa26b2f8673006186a822c735
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Feb 1 11:13:24 2018 -0500
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Thu Feb 1 14:58:25 2018 -0500

    cmCustomCommandGenerator: Simplify cmOutputConverter access
    
    In commit v3.4.0-rc1~480^2~3 (cmCustomCommandGenerator: Port to
    cmOutputConverter, 2015-06-04), cmCustomCommandGenerator's access to the
    local generator was removed so it needed to construct its own
    cmOutputConverter instance.  Access to the local generator was then
    restored by commit v3.4.0-rc1~285^2~21 (cmCustomCommandGenerator:
    Require cmLocalGenerator in API, 2015-07-25), so now we can use its
    cmOutputConverter base class methods directly.

diff --git a/Source/cmCustomCommandGenerator.cxx 
b/Source/cmCustomCommandGenerator.cxx
index 0f5119e..136cf39 100644
--- a/Source/cmCustomCommandGenerator.cxx
+++ b/Source/cmCustomCommandGenerator.cxx
@@ -8,7 +8,6 @@
 #include "cmGeneratorTarget.h"
 #include "cmLocalGenerator.h"
 #include "cmMakefile.h"
-#include "cmOutputConverter.h"
 #include "cmStateTypes.h"
 #include "cmSystemTools.h"
 
@@ -167,8 +166,7 @@ void cmCustomCommandGenerator::AppendArguments(unsigned int 
c,
     if (this->OldStyle) {
       cmd += escapeForShellOldStyle(arg);
     } else {
-      cmOutputConverter converter(this->LG->GetStateSnapshot());
-      cmd += converter.EscapeForShell(arg, this->MakeVars);
+      cmd += this->LG->EscapeForShell(arg, this->MakeVars);
     }
   }
 }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=20676cbaca92d1b3ad486518e34e99aef75ebe11
commit 20676cbaca92d1b3ad486518e34e99aef75ebe11
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Feb 1 14:26:25 2018 -0500
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Thu Feb 1 14:36:09 2018 -0500

    Ninja: Remove unused device link line code
    
    Remove the `PRE_LINK` and `POST_BUILD` variables.  They are not
    referenced by `WriteDeviceLinkRule`.
    
    Remove the `byproducts` local variable from `WriteDeviceLinkStatement`
    and all the code populating it.  We never used the result.

diff --git a/Source/cmNinjaNormalTargetGenerator.cxx 
b/Source/cmNinjaNormalTargetGenerator.cxx
index eb595ba..ddbc772 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -685,16 +685,11 @@ void 
cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement()
     }
   }
 
-  cmNinjaDeps byproducts;
-
   if (!this->TargetNameImport.empty()) {
     const std::string impLibPath = localGen.ConvertToOutputFormat(
       targetOutputImplib, cmOutputConverter::SHELL);
     vars["TARGET_IMPLIB"] = impLibPath;
     EnsureParentDirectoryExists(impLibPath);
-    if (genTarget.HasImportLibrary()) {
-      byproducts.push_back(targetOutputImplib);
-    }
   }
 
   const std::string objPath = GetGeneratorTarget()->GetSupportDirectory();
@@ -712,29 +707,6 @@ void 
cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement()
     std::replace(link_path.begin(), link_path.end(), '\\', '/');
   }
 
-  const std::vector<cmCustomCommand>* cmdLists[3] = {
-    &genTarget.GetPreBuildCommands(), &genTarget.GetPreLinkCommands(),
-    &genTarget.GetPostBuildCommands()
-  };
-
-  std::vector<std::string> preLinkCmdLines, postBuildCmdLines;
-  vars["PRE_LINK"] = localGen.BuildCommandLine(preLinkCmdLines);
-  vars["POST_BUILD"] = localGen.BuildCommandLine(postBuildCmdLines);
-
-  std::vector<std::string>* cmdLineLists[3] = { &preLinkCmdLines,
-                                                &preLinkCmdLines,
-                                                &postBuildCmdLines };
-
-  for (unsigned i = 0; i != 3; ++i) {
-    for (cmCustomCommand const& cc : *cmdLists[i]) {
-      cmCustomCommandGenerator ccg(cc, cfgName, this->GetLocalGenerator());
-      localGen.AppendCustomCommandLines(ccg, *cmdLineLists[i]);
-      std::vector<std::string> const& ccByproducts = ccg.GetByproducts();
-      std::transform(ccByproducts.begin(), ccByproducts.end(),
-                     std::back_inserter(byproducts), MapToNinjaPath());
-    }
-  }
-
   cmGlobalNinjaGenerator& globalGen = *this->GetGlobalGenerator();
 
   // Device linking currently doesn't support response files so

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8285aa9e4e2df09b35f4faa930da6577979d4d2a
commit 8285aa9e4e2df09b35f4faa930da6577979d4d2a
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Feb 1 09:07:50 2018 -0500
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Thu Feb 1 09:07:50 2018 -0500

    Tests: Add missing error check in CudaOnly.GPUDebugFlag
    
    If `cudaMallocManaged` fails then later use of `has_debug` is not valid.

diff --git a/Tests/CudaOnly/GPUDebugFlag/main.cu 
b/Tests/CudaOnly/GPUDebugFlag/main.cu
index 8b97a3f..1f3fc12 100644
--- a/Tests/CudaOnly/GPUDebugFlag/main.cu
+++ b/Tests/CudaOnly/GPUDebugFlag/main.cu
@@ -49,6 +49,11 @@ int main(int argc, char** argv)
 {
   bool* has_debug;
   cudaError_t err = cudaMallocManaged(&has_debug, sizeof(bool));
+  if (err != cudaSuccess) {
+    std::cerr << "cudaMallocManaged failed:\n"
+              << "  " << cudaGetErrorString(err) << std::endl;
+    return 1;
+  }
 
   debug_kernel<<<1, 1>>>(has_debug);
   err = cudaDeviceSynchronize();

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=be46f9fb6e9fc0b33198ccf5396e0188e56940e4
commit be46f9fb6e9fc0b33198ccf5396e0188e56940e4
Merge: 5a16e76 854feac
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Feb 1 08:15:44 2018 -0500
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Thu Feb 1 08:15:44 2018 -0500

    Merge branch 'upstream-KWSys' into update-kwsys
    
    * upstream-KWSys:
      KWSys 2018-02-01 (04fcc449)


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=854feacc60c5d1dcf53652a764841e1d9d602ac3
commit 854feacc60c5d1dcf53652a764841e1d9d602ac3
Author:     KWSys Upstream <kwro...@kitware.com>
AuthorDate: Thu Feb 1 07:44:45 2018 -0500
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Thu Feb 1 08:15:44 2018 -0500

    KWSys 2018-02-01 (04fcc449)
    
    Code extracted from:
    
        https://gitlab.kitware.com/utils/kwsys.git
    
    at commit 04fcc449646eb2ff3d701986946a1db60b2161b7 (master).
    
    Upstream Shortlog
    -----------------
    
    Ben Boeckel (11):
          ba270398 SystemToolsAppendComponents: move strings when building 
components
          cfd0f1e6 JoinPath: push back as a character
          6770cb3e GetFilenameName: optionally don't search for \ on non-Windows
          22b189b0 ConvertToUnixSlashes: remove escaped space logic
          342d69a4 ConvertToUnixSlashes: short-circuit on hasDoubleSlash
          5dd87350 ConvertToUnixSlashes: remove pos1
          3b46b7c0 ConvertToUnixSlashes: bail early on empty paths
          55d1d6ab CollapseFullPath: reserve space for components
          68807138 CollapseFullPath: prefer .empty() to .length() == 0
          71a6de42 CollapseFullPath: refactor the overloads to share 
implementations
          318550c7 CheckCollapsePath: add more test cases

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2570e5b..c0154c8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -496,6 +496,16 @@ IF(KWSYS_USE_SystemTools)
     KWSYS_CXX_STAT_HAS_ST_MTIM=${KWSYS_CXX_STAT_HAS_ST_MTIM}
     KWSYS_CXX_STAT_HAS_ST_MTIMESPEC=${KWSYS_CXX_STAT_HAS_ST_MTIMESPEC}
     )
+  IF(NOT WIN32)
+    IF(KWSYS_STANDALONE)
+      OPTION(KWSYS_SYSTEMTOOLS_SUPPORT_WINDOWS_SLASHES "If true, Windows paths 
will be supported on Unix as well" ON)
+    ENDIF()
+    IF(KWSYS_SYSTEMTOOLS_SUPPORT_WINDOWS_SLASHES)
+      SET_PROPERTY(SOURCE SystemTools.cxx testSystemTools.cxx APPEND PROPERTY 
COMPILE_DEFINITIONS
+        KWSYS_SYSTEMTOOLS_SUPPORT_WINDOWS_SLASHES
+        )
+    ENDIF()
+  ENDIF()
 
   # Disable getpwnam for static linux builds since it depends on shared glibc
   GET_PROPERTY(SHARED_LIBS_SUPPORTED GLOBAL PROPERTY 
TARGET_SUPPORTS_SHARED_LIBS)
diff --git a/SystemTools.cxx b/SystemTools.cxx
index 999beb3..38910c8 100644
--- a/SystemTools.cxx
+++ b/SystemTools.cxx
@@ -1884,21 +1884,23 @@ static void ConvertVMSToUnix(std::string& path)
 // convert windows slashes to unix slashes
 void SystemTools::ConvertToUnixSlashes(std::string& path)
 {
+  if (path.empty()) {
+    return;
+  }
+
   const char* pathCString = path.c_str();
   bool hasDoubleSlash = false;
 #ifdef __VMS
   ConvertVMSToUnix(path);
 #else
   const char* pos0 = pathCString;
-  const char* pos1 = pathCString + 1;
   for (std::string::size_type pos = 0; *pos0; ++pos) {
-    // make sure we don't convert an escaped space to a unix slash
-    if (*pos0 == '\\' && *pos1 != ' ') {
+    if (*pos0 == '\\') {
       path[pos] = '/';
     }
 
     // Also, reuse the loop to check for slash followed by another slash
-    if (*pos1 == '/' && *(pos1 + 1) == '/' && !hasDoubleSlash) {
+    if (!hasDoubleSlash && *(pos0 + 1) == '/' && *(pos0 + 2) == '/') {
 #ifdef _WIN32
       // However, on windows if the first characters are both slashes,
       // then keep them that way, so that network paths can be handled.
@@ -1911,43 +1913,41 @@ void SystemTools::ConvertToUnixSlashes(std::string& 
path)
     }
 
     pos0++;
-    pos1++;
   }
 
   if (hasDoubleSlash) {
     SystemTools::ReplaceString(path, "//", "/");
   }
 #endif
+
   // remove any trailing slash
-  if (!path.empty()) {
-    // if there is a tilda ~ then replace it with HOME
-    pathCString = path.c_str();
-    if (pathCString[0] == '~' &&
-        (pathCString[1] == '/' || pathCString[1] == '\0')) {
-      std::string homeEnv;
-      if (SystemTools::GetEnv("HOME", homeEnv)) {
-        path.replace(0, 1, homeEnv);
-      }
+  // if there is a tilda ~ then replace it with HOME
+  pathCString = path.c_str();
+  if (pathCString[0] == '~' &&
+      (pathCString[1] == '/' || pathCString[1] == '\0')) {
+    std::string homeEnv;
+    if (SystemTools::GetEnv("HOME", homeEnv)) {
+      path.replace(0, 1, homeEnv);
     }
+  }
 #ifdef HAVE_GETPWNAM
-    else if (pathCString[0] == '~') {
-      std::string::size_type idx = path.find_first_of("/\0");
-      std::string user = path.substr(1, idx - 1);
-      passwd* pw = getpwnam(user.c_str());
-      if (pw) {
-        path.replace(0, idx, pw->pw_dir);
-      }
+  else if (pathCString[0] == '~') {
+    std::string::size_type idx = path.find_first_of("/\0");
+    std::string user = path.substr(1, idx - 1);
+    passwd* pw = getpwnam(user.c_str());
+    if (pw) {
+      path.replace(0, idx, pw->pw_dir);
     }
+  }
 #endif
-    // remove trailing slash if the path is more than
-    // a single /
-    pathCString = path.c_str();
-    size_t size = path.size();
-    if (size > 1 && *path.rbegin() == '/') {
-      // if it is c:/ then do not remove the trailing slash
-      if (!((size == 3 && pathCString[1] == ':'))) {
-        path.resize(size - 1);
-      }
+  // remove trailing slash if the path is more than
+  // a single /
+  pathCString = path.c_str();
+  size_t size = path.size();
+  if (size > 1 && *path.rbegin() == '/') {
+    // if it is c:/ then do not remove the trailing slash
+    if (!((size == 3 && pathCString[1] == ':'))) {
+      path.resize(size - 1);
     }
   }
 }
@@ -3171,8 +3171,8 @@ void SystemTools::CheckTranslationPath(std::string& path)
 
 static void SystemToolsAppendComponents(
   std::vector<std::string>& out_components,
-  std::vector<std::string>::const_iterator first,
-  std::vector<std::string>::const_iterator last)
+  std::vector<std::string>::iterator first,
+  std::vector<std::string>::iterator last)
 {
   static const std::string up = "..";
   static const std::string cur = ".";
@@ -3182,7 +3182,11 @@ static void SystemToolsAppendComponents(
         out_components.resize(out_components.size() - 1);
       }
     } else if (!i->empty() && *i != cur) {
+#if __cplusplus >= 201103L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201103L)
+      out_components.push_back(std::move(*i));
+#else
       out_components.push_back(*i);
+#endif
     }
   }
 }
@@ -3190,63 +3194,18 @@ static void SystemToolsAppendComponents(
 std::string SystemTools::CollapseFullPath(const std::string& in_path,
                                           const char* in_base)
 {
-  // Collect the output path components.
-  std::vector<std::string> out_components;
-
-  // Split the input path components.
-  std::vector<std::string> path_components;
-  SystemTools::SplitPath(in_path, path_components);
-
-  // If the input path is relative, start with a base path.
-  if (path_components[0].empty()) {
-    std::vector<std::string> base_components;
-    if (in_base) {
-      // Use the given base path.
-      SystemTools::SplitPath(in_base, base_components);
+  // Use the current working directory as a base path.
+  char buf[2048];
+  const char* res_in_base = in_base;
+  if (!res_in_base) {
+    if (const char* cwd = Getcwd(buf, 2048)) {
+      res_in_base = cwd;
     } else {
-      // Use the current working directory as a base path.
-      char buf[2048];
-      if (const char* cwd = Getcwd(buf, 2048)) {
-        SystemTools::SplitPath(cwd, base_components);
-      } else {
-        base_components.push_back("");
-      }
+      res_in_base = "";
     }
-
-    // Append base path components to the output path.
-    out_components.push_back(base_components[0]);
-    SystemToolsAppendComponents(out_components, base_components.begin() + 1,
-                                base_components.end());
   }
 
-  // Append input path components to the output path.
-  SystemToolsAppendComponents(out_components, path_components.begin(),
-                              path_components.end());
-
-  // Transform the path back to a string.
-  std::string newPath = SystemTools::JoinPath(out_components);
-
-  // Update the translation table with this potentially new path.  I am not
-  // sure why this line is here, it seems really questionable, but yet I
-  // would put good money that if I remove it something will break, basically
-  // from what I can see it created a mapping from the collapsed path, to be
-  // replaced by the input path, which almost completely does the opposite of
-  // this function, the only thing preventing this from happening a lot is
-  // that if the in_path has a .. in it, then it is not added to the
-  // translation table. So for most calls this either does nothing due to the
-  // ..  or it adds a translation between identical paths as nothing was
-  // collapsed, so I am going to try to comment it out, and see what hits the
-  // fan, hopefully quickly.
-  // Commented out line below:
-  // SystemTools::AddTranslationPath(newPath, in_path);
-
-  SystemTools::CheckTranslationPath(newPath);
-#ifdef _WIN32
-  newPath = SystemTools::GetActualCaseForPath(newPath);
-  SystemTools::ConvertToUnixSlashes(newPath);
-#endif
-  // Return the reconstructed path.
-  return newPath;
+  return SystemTools::CollapseFullPath(in_path, std::string(res_in_base));
 }
 
 std::string SystemTools::CollapseFullPath(const std::string& in_path,
@@ -3258,9 +3217,10 @@ std::string SystemTools::CollapseFullPath(const 
std::string& in_path,
   // Split the input path components.
   std::vector<std::string> path_components;
   SystemTools::SplitPath(in_path, path_components);
+  out_components.reserve(path_components.size());
 
   // If the input path is relative, start with a base path.
-  if (path_components[0].length() == 0) {
+  if (path_components[0].empty()) {
     std::vector<std::string> base_components;
     // Use the given base path.
     SystemTools::SplitPath(in_base, base_components);
@@ -3619,7 +3579,7 @@ std::string SystemTools::JoinPath(
 
   // All remaining components are always separated with a slash.
   while (first != last) {
-    result.append("/");
+    result.push_back('/');
     result.append((*first++));
   }
 
@@ -3715,7 +3675,12 @@ std::string SystemTools::GetFilenamePath(const 
std::string& filename)
  */
 std::string SystemTools::GetFilenameName(const std::string& filename)
 {
-  std::string::size_type slash_pos = filename.find_last_of("/\\");
+#if defined(_WIN32) || defined(KWSYS_SYSTEMTOOLS_SUPPORT_WINDOWS_SLASHES)
+  const char* separators = "/\\";
+#else
+  char separators = '/';
+#endif
+  std::string::size_type slash_pos = filename.find_last_of(separators);
   if (slash_pos != std::string::npos) {
     return filename.substr(slash_pos + 1);
   } else {
diff --git a/testSystemTools.cxx b/testSystemTools.cxx
index f1321e5..e436a2b 100644
--- a/testSystemTools.cxx
+++ b/testSystemTools.cxx
@@ -39,19 +39,19 @@ typedef unsigned short mode_t;
 static const char* toUnixPaths[][2] = {
   { "/usr/local/bin/passwd", "/usr/local/bin/passwd" },
   { "/usr/lo cal/bin/pa sswd", "/usr/lo cal/bin/pa sswd" },
-  { "/usr/lo\\ cal/bin/pa\\ sswd", "/usr/lo\\ cal/bin/pa\\ sswd" },
+  { "/usr/lo\\ cal/bin/pa\\ sswd", "/usr/lo/ cal/bin/pa/ sswd" },
   { "c:/usr/local/bin/passwd", "c:/usr/local/bin/passwd" },
   { "c:/usr/lo cal/bin/pa sswd", "c:/usr/lo cal/bin/pa sswd" },
-  { "c:/usr/lo\\ cal/bin/pa\\ sswd", "c:/usr/lo\\ cal/bin/pa\\ sswd" },
+  { "c:/usr/lo\\ cal/bin/pa\\ sswd", "c:/usr/lo/ cal/bin/pa/ sswd" },
   { "\\usr\\local\\bin\\passwd", "/usr/local/bin/passwd" },
   { "\\usr\\lo cal\\bin\\pa sswd", "/usr/lo cal/bin/pa sswd" },
-  { "\\usr\\lo\\ cal\\bin\\pa\\ sswd", "/usr/lo\\ cal/bin/pa\\ sswd" },
+  { "\\usr\\lo\\ cal\\bin\\pa\\ sswd", "/usr/lo/ cal/bin/pa/ sswd" },
   { "c:\\usr\\local\\bin\\passwd", "c:/usr/local/bin/passwd" },
   { "c:\\usr\\lo cal\\bin\\pa sswd", "c:/usr/lo cal/bin/pa sswd" },
-  { "c:\\usr\\lo\\ cal\\bin\\pa\\ sswd", "c:/usr/lo\\ cal/bin/pa\\ sswd" },
+  { "c:\\usr\\lo\\ cal\\bin\\pa\\ sswd", "c:/usr/lo/ cal/bin/pa/ sswd" },
   { "\\\\usr\\local\\bin\\passwd", "//usr/local/bin/passwd" },
   { "\\\\usr\\lo cal\\bin\\pa sswd", "//usr/lo cal/bin/pa sswd" },
-  { "\\\\usr\\lo\\ cal\\bin\\pa\\ sswd", "//usr/lo\\ cal/bin/pa\\ sswd" },
+  { "\\\\usr\\lo\\ cal\\bin\\pa\\ sswd", "//usr/lo/ cal/bin/pa/ sswd" },
   { KWSYS_NULLPTR, KWSYS_NULLPTR }
 };
 
@@ -700,6 +700,16 @@ static bool CheckCollapsePath()
   bool res = true;
   res &= CheckCollapsePath("/usr/share/*", "/usr/share/*");
   res &= CheckCollapsePath("C:/Windows/*", "C:/Windows/*");
+  res &= CheckCollapsePath("/usr/share/../lib", "/usr/lib");
+  res &= CheckCollapsePath("/usr/share/./lib", "/usr/share/lib");
+  res &= CheckCollapsePath("/usr/share/../../lib", "/lib");
+  res &= CheckCollapsePath("/usr/share/.././../lib", "/lib");
+  res &= CheckCollapsePath("/../lib", "/lib");
+  res &= CheckCollapsePath("/../lib/", "/lib");
+  res &= CheckCollapsePath("/", "/");
+  res &= CheckCollapsePath("C:/", "C:/");
+  res &= CheckCollapsePath("C:/../", "C:/");
+  res &= CheckCollapsePath("C:/../../", "C:/");
   return res;
 }
 
@@ -764,20 +774,26 @@ static bool CheckGetFilenameName()
   const char* windowsFilepath = "C:\\somewhere\\something";
   const char* unixFilepath = "/somewhere/something";
 
-  std::string expectedFilename = "something";
+#if defined(_WIN32) || defined(KWSYS_SYSTEMTOOLS_SUPPORT_WINDOWS_SLASHES)
+  std::string expectedWindowsFilename = "something";
+#else
+  std::string expectedWindowsFilename = "C:\\somewhere\\something";
+#endif
+  std::string expectedUnixFilename = "something";
 
   bool res = true;
   std::string filename = kwsys::SystemTools::GetFilenameName(windowsFilepath);
-  if (filename != expectedFilename) {
+  if (filename != expectedWindowsFilename) {
     std::cerr << "GetFilenameName(" << windowsFilepath << ") yielded "
-              << filename << " instead of " << expectedFilename << std::endl;
+              << filename << " instead of " << expectedWindowsFilename
+              << std::endl;
     res = false;
   }
 
   filename = kwsys::SystemTools::GetFilenameName(unixFilepath);
-  if (filename != expectedFilename) {
+  if (filename != expectedUnixFilename) {
     std::cerr << "GetFilenameName(" << unixFilepath << ") yielded " << filename
-              << " instead of " << expectedFilename << std::endl;
+              << " instead of " << expectedUnixFilename << std::endl;
     res = false;
   }
   return res;

-----------------------------------------------------------------------

Summary of changes:
 Source/cmCustomCommandGenerator.cxx     |    4 +-
 Source/cmNinjaNormalTargetGenerator.cxx |   28 ------
 Source/kwsys/CMakeLists.txt             |   10 +++
 Source/kwsys/SystemTools.cxx            |  141 ++++++++++++-------------------
 Source/kwsys/testSystemTools.cxx        |   36 +++++---
 Tests/CudaOnly/GPUDebugFlag/main.cu     |    5 ++
 6 files changed, 95 insertions(+), 129 deletions(-)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
https://cmake.org/mailman/listinfo/cmake-commits

Reply via email to