summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog/CMakeSetupDialog.cxx
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2008-12-16 20:00:17 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2008-12-16 20:00:17 (GMT)
commit64b377d7074a4c070384630938c2d317348df165 (patch)
tree4f9fa3a5e57969aebdf84c0dc81bc63f95f4a0ee /Source/QtDialog/CMakeSetupDialog.cxx
parent2d842b6798cb51bc8c2006b708c348af8720fca6 (diff)
downloadCMake-64b377d7074a4c070384630938c2d317348df165.zip
CMake-64b377d7074a4c070384630938c2d317348df165.tar.gz
CMake-64b377d7074a4c070384630938c2d317348df165.tar.bz2
ENH:
For bug #7191. Improvements to the dialog that sets up the first configure. Fixing the large size of it by breaking it up into a wizard. Also incorporated suggestions from bug report.
Diffstat (limited to 'Source/QtDialog/CMakeSetupDialog.cxx')
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx77
1 files changed, 37 insertions, 40 deletions
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index 32e6516..c4047ab 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -36,7 +36,7 @@
#include "QCMake.h"
#include "QCMakeCacheView.h"
#include "AddCacheEntry.h"
-#include "CMakeFirstConfigure.h"
+#include "FirstConfigure.h"
QCMakeThread::QCMakeThread(QObject* p)
: QThread(p), CMakeInstance(NULL)
@@ -552,7 +552,7 @@ void CMakeSetupDialog::setEnabledState(bool enabled)
bool CMakeSetupDialog::setupFirstConfigure()
{
- CMakeFirstConfigure dialog;
+ FirstConfigure dialog;
// initialize dialog and restore saved settings
@@ -561,7 +561,7 @@ bool CMakeSetupDialog::setupFirstConfigure()
// restore from settings
dialog.loadFromSettings();
-
+
if(dialog.exec() == QDialog::Accepted)
{
dialog.saveToSettings();
@@ -593,45 +593,42 @@ bool CMakeSetupDialog::setupFirstConfigure()
}
else if(dialog.crossCompilerSetup())
{
- QString toolchainFile = dialog.crossCompilerToolChainFile();
- if(!toolchainFile.isEmpty())
- {
- m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_TOOLCHAIN_FILE",
- "Cross Compile ToolChain File", toolchainFile, false);
- }
- else
+ QString fortranCompiler = dialog.getFortranCompiler();
+ if(!fortranCompiler.isEmpty())
{
- QString fortranCompiler = dialog.getFortranCompiler();
- if(!fortranCompiler.isEmpty())
- {
- m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_Fortran_COMPILER",
- "Fortran compiler.", fortranCompiler, false);
- }
-
- QString mode = dialog.getCrossIncludeMode();
- m->insertProperty(QCMakeProperty::STRING, "CMAKE_FIND_ROOT_PATH_MODE_INCLUDE",
- "CMake Find Include Mode", mode, false);
- mode = dialog.getCrossLibraryMode();
- m->insertProperty(QCMakeProperty::STRING, "CMAKE_FIND_ROOT_PATH_MODE_LIBRARY",
- "CMake Find Library Mode", mode, false);
- mode = dialog.getCrossProgramMode();
- m->insertProperty(QCMakeProperty::STRING, "CMAKE_FIND_ROOT_PATH_MODE_PROGRAM",
- "CMake Find Program Mode", mode, false);
-
- QString rootPath = dialog.getCrossRoot();
- m->insertProperty(QCMakeProperty::PATH, "CMAKE_FIND_ROOT_PATH",
- "CMake Find Root Path", rootPath, false);
-
- QString systemName = dialog.getSystemName();
- m->insertProperty(QCMakeProperty::STRING, "CMAKE_SYSTEM_NAME",
- "CMake System Name", systemName, false);
- QString cxxCompiler = dialog.getCXXCompiler();
- m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_CXX_COMPILER",
- "CXX compiler.", cxxCompiler, false);
- QString cCompiler = dialog.getCCompiler();
- m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_C_COMPILER",
- "C compiler.", cCompiler, false);
+ m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_Fortran_COMPILER",
+ "Fortran compiler.", fortranCompiler, false);
}
+
+ QString mode = dialog.getCrossIncludeMode();
+ m->insertProperty(QCMakeProperty::STRING, "CMAKE_FIND_ROOT_PATH_MODE_INCLUDE",
+ "CMake Find Include Mode", mode, false);
+ mode = dialog.getCrossLibraryMode();
+ m->insertProperty(QCMakeProperty::STRING, "CMAKE_FIND_ROOT_PATH_MODE_LIBRARY",
+ "CMake Find Library Mode", mode, false);
+ mode = dialog.getCrossProgramMode();
+ m->insertProperty(QCMakeProperty::STRING, "CMAKE_FIND_ROOT_PATH_MODE_PROGRAM",
+ "CMake Find Program Mode", mode, false);
+
+ QString rootPath = dialog.getCrossRoot();
+ m->insertProperty(QCMakeProperty::PATH, "CMAKE_FIND_ROOT_PATH",
+ "CMake Find Root Path", rootPath, false);
+
+ QString systemName = dialog.getSystemName();
+ m->insertProperty(QCMakeProperty::STRING, "CMAKE_SYSTEM_NAME",
+ "CMake System Name", systemName, false);
+ QString cxxCompiler = dialog.getCXXCompiler();
+ m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_CXX_COMPILER",
+ "CXX compiler.", cxxCompiler, false);
+ QString cCompiler = dialog.getCCompiler();
+ m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_C_COMPILER",
+ "C compiler.", cCompiler, false);
+ }
+ else if(dialog.crossCompilerToolChainFile())
+ {
+ QString toolchainFile = dialog.getCrossCompilerToolChainFile();
+ m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_TOOLCHAIN_FILE",
+ "Cross Compile ToolChain File", toolchainFile, false);
}
return true;
}