summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2010-05-05 12:48:30 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2010-05-05 12:49:24 (GMT)
commit1df3f58317120567697cf5ae7b628c4674625b4a (patch)
tree6c1a7414621f634f1f822d45e1bf4ebf9583935b /Source
parent0bf998a46bb52cb9006ee73e9b7166f0abb69170 (diff)
downloadCMake-1df3f58317120567697cf5ae7b628c4674625b4a.zip
CMake-1df3f58317120567697cf5ae7b628c4674625b4a.tar.gz
CMake-1df3f58317120567697cf5ae7b628c4674625b4a.tar.bz2
BUG: Fix Bug #9975 when softlinks are used.
Diffstat (limited to 'Source')
-rw-r--r--Source/QtDialog/CMakeSetup.cxx19
1 files changed, 11 insertions, 8 deletions
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());
}
}
}
ht'>0
-rw-r--r--Tests/QtAutogenRerun/mocPlugin/StyleC.cpp (renamed from Tests/QtAutogen/mocPlugin/StyleC.cpp)0
-rw-r--r--Tests/QtAutogenRerun/mocPlugin/StyleC.hpp (renamed from Tests/QtAutogen/mocPlugin/StyleC.hpp)0
-rw-r--r--Tests/QtAutogenRerun/mocPlugin/StyleCommon.hpp (renamed from Tests/QtAutogen/mocPlugin/StyleCommon.hpp)0
-rw-r--r--Tests/QtAutogenRerun/mocPlugin/StyleD.cpp (renamed from Tests/QtAutogen/mocPlugin/StyleD.cpp)0
-rw-r--r--Tests/QtAutogenRerun/mocPlugin/StyleD.hpp (renamed from Tests/QtAutogen/mocPlugin/StyleD.hpp)0
-rw-r--r--Tests/QtAutogenRerun/mocPlugin/StyleE.cpp (renamed from Tests/QtAutogen/mocPlugin/StyleE.cpp)0
-rw-r--r--Tests/QtAutogenRerun/mocPlugin/StyleE.hpp (renamed from Tests/QtAutogen/mocPlugin/StyleE.hpp)0
-rw-r--r--Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleB.json (renamed from Tests/QtAutogen/mocPlugin/jsonIn/StyleB.json)0
-rw-r--r--Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleB_Custom.json (renamed from Tests/QtAutogen/mocPlugin/jsonIn/StyleB_Custom.json)0
-rw-r--r--Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleC.json (renamed from Tests/QtAutogen/mocPlugin/jsonIn/StyleC.json)0
-rw-r--r--Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleD.json (renamed from Tests/QtAutogen/mocPlugin/jsonIn/StyleD.json)0
-rw-r--r--Tests/QtAutogenRerun/mocPlugin/main.cpp (renamed from Tests/QtAutogen/mocPlugin/main.cpp)0
-rw-r--r--Tests/QtAutogenRerun/mocRerun/CMakeLists.txt (renamed from Tests/QtAutogen/mocRerun/CMakeLists.txt)0
-rw-r--r--Tests/QtAutogenRerun/mocRerun/input.txt (renamed from Tests/QtAutogen/mocRerun/input.txt)0
-rw-r--r--Tests/QtAutogenRerun/mocRerun/main.cpp.in (renamed from Tests/QtAutogen/mocRerun/main.cpp.in)0
-rw-r--r--Tests/QtAutogenRerun/mocRerun/res1.qrc (renamed from Tests/QtAutogen/mocRerun/res1.qrc)0
-rw-r--r--Tests/QtAutogenRerun/mocRerun/test1a.h.in (renamed from Tests/QtAutogen/mocRerun/test1a.h.in)0
-rw-r--r--Tests/QtAutogenRerun/mocRerun/test1b.h.in (renamed from Tests/QtAutogen/mocRerun/test1b.h.in)0
-rw-r--r--Tests/QtAutogenRerun/rccDepends/CMakeLists.txt (renamed from Tests/QtAutogen/rccDepends/CMakeLists.txt)0
-rw-r--r--Tests/QtAutogenRerun/rccDepends/main.cpp (renamed from Tests/QtAutogen/rccDepends/main.cpp)0
-rw-r--r--Tests/QtAutogenRerun/rccDepends/res/input1.txt.in (renamed from Tests/QtAutogen/rccDepends/res/input1.txt.in)0
-rw-r--r--Tests/QtAutogenRerun/rccDepends/res/input2.txt.in (renamed from Tests/QtAutogen/rccDepends/res/input2.txt.in)0
-rw-r--r--Tests/QtAutogenRerun/rccDepends/res1a.qrc.in (renamed from Tests/QtAutogen/rccDepends/res1a.qrc.in)0
-rw-r--r--Tests/QtAutogenRerun/rccDepends/res1b.qrc.in (renamed from Tests/QtAutogen/rccDepends/res1b.qrc.in)0
-rw-r--r--Tests/QtAutogenRerun/rccDepends/res2a.qrc.in (renamed from Tests/QtAutogen/rccDepends/res2a.qrc.in)0
-rw-r--r--Tests/QtAutogenRerun/rccDepends/res2b.qrc.in (renamed from Tests/QtAutogen/rccDepends/res2b.qrc.in)0
39 files changed, 322 insertions, 206 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 34418c5..13d796e 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1285,12 +1285,28 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt5Autogen"
--force-new-ctest-process
--build-options ${build_options}
- -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} -DQT_TEST_VERSION=5
+ -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
+ -DQT_TEST_VERSION=5
${QtAutogen_BUILD_OPTIONS}
--test-command ${run_autogen_test}
)
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt5Autogen")
+ add_test(NAME Qt5AutogenRerun COMMAND ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/QtAutogenRerun"
+ "${CMake_BINARY_DIR}/Tests/Qt5AutogenRerun"
+ ${build_generator_args}
+ --build-project QtAutogenRerun
+ --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt5AutogenRerun"
+ --force-new-ctest-process
+ --build-options ${build_options}
+ -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
+ -DQT_TEST_VERSION=5
+ ${QtAutogen_BUILD_OPTIONS}
+ )
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt5AutogenRerun")
+
add_test(Qt5AutoUicInterface ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/QtAutoUicInterface"
@@ -1315,12 +1331,28 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt4Autogen"
--force-new-ctest-process
--build-options ${build_options}
- -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} -DQT_TEST_VERSION=4
+ -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
+ -DQT_TEST_VERSION=4
${QtAutogen_BUILD_OPTIONS}
--test-command ${run_autogen_test}
)
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4Autogen")
+ add_test(NAME Qt4AutogenRerun COMMAND ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/QtAutogenRerun"
+ "${CMake_BINARY_DIR}/Tests/Qt4AutogenRerun"
+ ${build_generator_args}
+ --build-project QtAutogenRerun
+ --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt4AutogenRerun"
+ --force-new-ctest-process
+ --build-options ${build_options}
+ -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
+ -DQT_TEST_VERSION=4
+ ${QtAutogen_BUILD_OPTIONS}
+ )
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4AutogenRerun")
+
add_test(Qt4AutoUicInterface ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/QtAutoUicInterface"
@@ -1330,7 +1362,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt4AutoUicInterface"
--force-new-ctest-process
--build-options ${build_options}
- -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} -DQT_TEST_VERSION=4
+ -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
+ -DQT_TEST_VERSION=4
--test-command ${run_autouic_test}
)
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4AutoUicInterface")
diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt