[Cmake-commits] CMake branch, master, updated. 1df3f58317120567697cf5ae7b628c4674625b4a

cmake-commits at cmake.org cmake-commits at cmake.org
Wed May 5 08:49:31 EDT 2010


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  1df3f58317120567697cf5ae7b628c4674625b4a (commit)
      from  0bf998a46bb52cb9006ee73e9b7166f0abb69170 (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=1df3f58317120567697cf5ae7b628c4674625b4a
commit 1df3f58317120567697cf5ae7b628c4674625b4a
Author: Clinton Stimpson <clinton at elemtech.com>
Date:   Wed May 5 06:48:30 2010 -0600

    BUG: Fix Bug #9975 when softlinks are used.

diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx
index e613a78..fc61709 100644
--- a/Source/QtDialog/CMakeSetup.cxx
+++ b/Source/QtDialog/CMakeSetup.cxx
@@ -11,7 +11,6 @@
 ============================================================================*/
 #include "QCMake.h"  // include to disable MS warnings
 #include <QApplication>
-#include <QFileInfo>
 #include <QDir>
 #include <QTranslator>
 #include <QLocale>
@@ -21,6 +20,7 @@
 #include "cmake.h"
 #include "cmVersion.h"
 #include <cmsys/CommandLineArguments.hxx>
+#include <cmsys/SystemTools.hxx>
 
 //----------------------------------------------------------------------------
 static const char * cmDocumentationName[][3] =
@@ -164,16 +164,19 @@ int main(int argc, char** argv)
     QStringList args = app.arguments();
     if(args.count() == 2)
       {
-      QFileInfo buildFileInfo(args[1], "CMakeCache.txt");
-      QFileInfo srcFileInfo(args[1], "CMakeLists.txt");
-      if(buildFileInfo.exists())
+      cmsys_stl::string filePath = cmSystemTools::CollapseFullPath("..");
+      cmsys_stl::string buildFilePath =
+        cmSystemTools::CollapseFullPath("CMakeCache.txt", filePath.c_str());
+      cmsys_stl::string srcFilePath =
+        cmSystemTools::CollapseFullPath("CMakeLists.txt", filePath.c_str());
+      if(cmSystemTools::FileExists(buildFilePath.c_str()))
         {
-        dialog.setBinaryDirectory(buildFileInfo.absolutePath());
+        dialog.setBinaryDirectory(filePath.c_str());
         }
-      else if(srcFileInfo.exists())
+      else if(cmSystemTools::FileExists(srcFilePath.c_str()))
         {
-        dialog.setSourceDirectory(srcFileInfo.absolutePath());
-        dialog.setBinaryDirectory(QDir::currentPath());
+        dialog.setSourceDirectory(filePath.c_str());
+        dialog.setBinaryDirectory(cmSystemTools::CollapseFullPath(".").c_str());
         }
       }
     }

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

Summary of changes:
 Source/QtDialog/CMakeSetup.cxx |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list