[Cmake-commits] CMake branch, next, updated. v3.7.2-2227-gf38f5c7

Ben Boeckel ben.boeckel at kitware.com
Wed Jan 18 12:29:53 EST 2017


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  f38f5c7b2003bd0865d395e07f015d5d8c1580a7 (commit)
       via  7f0a21a51eb483c523a2c8880ce4e0466251ec74 (commit)
      from  9d16616b45a62a9b398cff89d9801a7e9af264b0 (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=f38f5c7b2003bd0865d395e07f015d5d8c1580a7
commit f38f5c7b2003bd0865d395e07f015d5d8c1580a7
Merge: 9d16616 7f0a21a
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Wed Jan 18 12:29:52 2017 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Jan 18 12:29:52 2017 -0500

    Merge topic 'case-insensitive-bindir-detection' into next
    
    7f0a21a5 cmSystemTools: use the actual case for root detection


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f0a21a51eb483c523a2c8880ce4e0466251ec74
commit 7f0a21a51eb483c523a2c8880ce4e0466251ec74
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Wed Jan 18 10:06:23 2017 -0500
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Wed Jan 18 10:08:40 2017 -0500

    cmSystemTools: use the actual case for root detection
    
    On Windows, calling a binary installed with the default `bin` binary
    directory will fail to be detected when called as `BIN\cmake.exe` due to
    the string compare. Get the actual case of the path before checking that
    the path ends with `CMAKE_BIN_DIR`.
    
    Fixes #16574.

diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 3d8fdf5..e693beb 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1979,7 +1979,8 @@ void cmSystemTools::FindCMakeResources(const char* argv0)
   // Install tree has
   // - "<prefix><CMAKE_BIN_DIR>/cmake"
   // - "<prefix><CMAKE_DATA_DIR>"
-  if (cmHasSuffix(exe_dir, CMAKE_BIN_DIR)) {
+  const std::string actual_case = cmSystemTools::GetActualCaseForPath(exe_dir);
+  if (cmHasSuffix(actual_case, CMAKE_BIN_DIR)) {
     std::string const prefix =
       exe_dir.substr(0, exe_dir.size() - strlen(CMAKE_BIN_DIR));
     cmSystemToolsCMakeRoot = prefix + CMAKE_DATA_DIR;

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

Summary of changes:
 Source/cmSystemTools.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list