diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2010-07-12 19:48:51 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2010-09-01 17:08:14 (GMT) |
commit | f794d589a44918c905911eb7688d69350922c6b3 (patch) | |
tree | c5893a8eff5b26496740c5e4b77e47ca73268c8b /Source/QtDialog | |
parent | 48b5b855934be341c02139c0bed88c35c1b40d8f (diff) | |
download | CMake-f794d589a44918c905911eb7688d69350922c6b3.zip CMake-f794d589a44918c905911eb7688d69350922c6b3.tar.gz CMake-f794d589a44918c905911eb7688d69350922c6b3.tar.bz2 |
Make --strict-mode option, and integrate with cmake-gui
Diffstat (limited to 'Source/QtDialog')
-rw-r--r-- | Source/QtDialog/CMakeSetupDialog.cxx | 9 | ||||
-rw-r--r-- | Source/QtDialog/CMakeSetupDialog.h | 1 | ||||
-rw-r--r-- | Source/QtDialog/QCMake.cxx | 8 | ||||
-rw-r--r-- | Source/QtDialog/QCMake.h | 3 |
4 files changed, 20 insertions, 1 deletions
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index 74a3d35..7600897 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -114,8 +114,12 @@ CMakeSetupDialog::CMakeSetupDialog() this, SLOT(doInstallForCommandLine())); #endif QMenu* OptionsMenu = this->menuBar()->addMenu(tr("&Options")); - this->SuppressDevWarningsAction = OptionsMenu->addAction(tr("&Suppress dev Warnings (-Wno-dev)")); + this->SuppressDevWarningsAction = + OptionsMenu->addAction(tr("&Suppress dev Warnings (-Wno-dev)")); this->SuppressDevWarningsAction->setCheckable(true); + this->StrictModeAction = + OptionsMenu->addAction(tr("&Strict Mode (--strict-mode)")); + this->StrictModeAction->setCheckable(true); QAction* debugAction = OptionsMenu->addAction(tr("&Debug Output")); debugAction->setCheckable(true); @@ -240,6 +244,9 @@ void CMakeSetupDialog::initialize() QObject::connect(this->SuppressDevWarningsAction, SIGNAL(triggered(bool)), this->CMakeThread->cmakeInstance(), SLOT(setSuppressDevWarnings(bool))); + QObject::connect(this->StrictModeAction, SIGNAL(triggered(bool)), + this->CMakeThread->cmakeInstance(), + SLOT(setStrictMode(bool))); if(!this->SourceDirectory->text().isEmpty() || !this->BinaryDirectory->lineEdit()->text().isEmpty()) diff --git a/Source/QtDialog/CMakeSetupDialog.h b/Source/QtDialog/CMakeSetupDialog.h index 0e3caec..cd2be6e 100644 --- a/Source/QtDialog/CMakeSetupDialog.h +++ b/Source/QtDialog/CMakeSetupDialog.h @@ -93,6 +93,7 @@ protected: QAction* ConfigureAction; QAction* GenerateAction; QAction* SuppressDevWarningsAction; + QAction* StrictModeAction; QAction* InstallForCommandLineAction; State CurrentState; diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx index dc31fad..31daf3c 100644 --- a/Source/QtDialog/QCMake.cxx +++ b/Source/QtDialog/QCMake.cxx @@ -28,6 +28,7 @@ QCMake::QCMake(QObject* p) : QObject(p) { this->SuppressDevWarnings = false; + this->StrictMode = false; qRegisterMetaType<QCMakeProperty>(); qRegisterMetaType<QCMakePropertyList>(); @@ -164,6 +165,8 @@ void QCMake::configure() this->CMakeInstance->CreateGlobalGenerator(this->Generator.toAscii().data())); this->CMakeInstance->LoadCache(); this->CMakeInstance->SetSuppressDevWarnings(this->SuppressDevWarnings); + std::cerr << "set strict " << this->StrictMode << "\n"; + this->CMakeInstance->SetStrictMode(this->StrictMode); this->CMakeInstance->PreLoadCMakeFiles(); cmSystemTools::ResetErrorOccuredFlag(); @@ -417,3 +420,8 @@ void QCMake::setSuppressDevWarnings(bool value) { this->SuppressDevWarnings = value; } + +void QCMake::setStrictMode(bool value) +{ + this->StrictMode = value; +} diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h index bbfb3d7..f20893f 100644 --- a/Source/QtDialog/QCMake.h +++ b/Source/QtDialog/QCMake.h @@ -88,6 +88,8 @@ public slots: void setDebugOutput(bool); /// set whether to do suppress dev warnings void setSuppressDevWarnings(bool value); + /// set whether to run cmake in strict mode + void setStrictMode(bool value); public: /// get the list of cache properties @@ -133,6 +135,7 @@ protected: static void errorCallback(const char* msg, const char* title, bool&, void* cd); bool SuppressDevWarnings; + bool StrictMode; QString SourceDirectory; QString BinaryDirectory; QString Generator; |