[Cmake-commits] CMake branch, next, updated. v2.8.4-1395-gd857371

Brad King brad.king at kitware.com
Fri Apr 8 15:39:02 EDT 2011


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  d8573714c6f70ce2bd76ebdbb05555f324a344f2 (commit)
       via  b5676134ce25df1a60724478d056a95bca106e8f (commit)
      from  ed44b79d288b2569e42e8ff4ef194c21dc8f9451 (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=d8573714c6f70ce2bd76ebdbb05555f324a344f2
commit d8573714c6f70ce2bd76ebdbb05555f324a344f2
Merge: ed44b79 b567613
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Apr 8 15:39:01 2011 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Apr 8 15:39:01 2011 -0400

    Merge topic 'windows-make-working-drive' into next
    
    b567613 Fix working drive of make rules on Windows


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b5676134ce25df1a60724478d056a95bca106e8f
commit b5676134ce25df1a60724478d056a95bca106e8f
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Apr 8 09:28:59 2011 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Apr 8 15:36:55 2011 -0400

    Fix working drive of make rules on Windows
    
    Teach cmLocalUnixMakefileGenerator3::CreateCDCommand to change working
    directories for make tools using a Windows shell using "cd /d" instead
    of just "cd".  This tells the shell to change the current drive letter
    as well as the working directory on that drive.
    
    Commit abaa0267 (When the working directory for a custom command is on
    another drive..., 2007-12-17) fixed the same problem for VS IDE
    generators as reported by issue #6150.

diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index d1214d2..d42c124 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -2228,17 +2228,20 @@ void cmLocalUnixMakefileGenerator3
     return;
     }
 
+  // In a Windows shell we must change drive letter too.
+  const char* cd_cmd = this->WindowsShell? "cd /d " : "cd ";
+
   if(!this->UnixCD)
     {
     // On Windows we must perform each step separately and then change
     // back because the shell keeps the working directory between
     // commands.
-    std::string cmd = "cd ";
+    std::string cmd = cd_cmd;
     cmd += this->ConvertToOutputForExisting(tgtDir, relRetDir);
     commands.insert(commands.begin(),cmd);
 
     // Change back to the starting directory.
-    cmd = "cd ";
+    cmd = cd_cmd;
     cmd += this->ConvertToOutputForExisting(relRetDir, tgtDir);
     commands.push_back(cmd);
     }
@@ -2250,7 +2253,7 @@ void cmLocalUnixMakefileGenerator3
     std::vector<std::string>::iterator i = commands.begin();
     for (; i != commands.end(); ++i)
       {
-      std::string cmd = "cd ";
+      std::string cmd = cd_cmd;
       cmd += this->ConvertToOutputForExisting(tgtDir, relRetDir);
       cmd += " && ";
       cmd += *i;

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

Summary of changes:
 Source/cmLocalUnixMakefileGenerator3.cxx |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list