diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2005-02-11 19:36:57 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2005-02-11 19:36:57 (GMT) |
commit | 71ff74d0459fe0fd08e51f79da8976d0b92786c0 (patch) | |
tree | 7e972ea480187d448952d6358b51589d02560864 /Source/MFCDialog | |
parent | ef5db04e24e0374ebf0ffed11350a347bafac3fb (diff) | |
download | CMake-71ff74d0459fe0fd08e51f79da8976d0b92786c0.zip CMake-71ff74d0459fe0fd08e51f79da8976d0b92786c0.tar.gz CMake-71ff74d0459fe0fd08e51f79da8976d0b92786c0.tar.bz2 |
FIX: fix for bug 1135
Diffstat (limited to 'Source/MFCDialog')
-rw-r--r-- | Source/MFCDialog/CMakeSetupDialog.cpp | 23 | ||||
-rw-r--r-- | Source/MFCDialog/CMakeSetupDialog.h | 1 |
2 files changed, 23 insertions, 1 deletions
diff --git a/Source/MFCDialog/CMakeSetupDialog.cpp b/Source/MFCDialog/CMakeSetupDialog.cpp index 535573e..7f7d8f3 100644 --- a/Source/MFCDialog/CMakeSetupDialog.cpp +++ b/Source/MFCDialog/CMakeSetupDialog.cpp @@ -158,6 +158,7 @@ CMakeSetupDialog::CMakeSetupDialog(const CMakeCommandLineInfo& cmdInfo, CWnd* pParent /*=NULL*/) : CDialog(CMakeSetupDialog::IDD, pParent) { + m_GeneratorPicked = false; m_Cursor = LoadCursor(NULL, IDC_ARROW); m_RunningConfigure = false; cmSystemTools::SetRunCommandHideConsole(true); @@ -713,6 +714,11 @@ void CMakeSetupDialog::RunCMake(bool generateProjectFiles) // Callback for build projects button void CMakeSetupDialog::OnConfigure() { + // if(!m_GeneratorPicked) +// { +// // generator has not been picked add one here +// } + // enable error messages each time configure is pressed cmSystemTools::EnableMessages(); this->RunCMake(false); @@ -773,8 +779,13 @@ void CMakeSetupDialog::OnChangeWhereBuild() this->m_WhereSource = path.c_str(); this->m_WhereSourceControl.SetWindowText(this->m_WhereSource); this->OnChangeWhereSource(); + m_GeneratorPicked = true; } - + else + { + m_GeneratorPicked = false; + } + m_CacheEntriesList.RemoveAll(); m_CacheEntriesList.ShowWindow(SW_SHOW); this->LoadCacheFromDiskToGUI(); @@ -979,6 +990,7 @@ void CMakeSetupDialog::LoadCacheFromDiskToGUI() cachem->GetCacheIterator("CMAKE_GENERATOR"); if(!it.IsAtEnd()) { + m_GeneratorPicked = true; std::string curGen = it.GetValue(); if(m_GeneratorChoiceString != curGen.c_str()) { @@ -1330,6 +1342,15 @@ void CMakeSetupDialog::OnHelpButton() void CMakeSetupDialog::OnDeleteButton() { + std::string message = "Are you sure you want to delete the CMakeCache.txt file for:\n"; + message += m_WhereBuild; + if(::MessageBox(0, message.c_str(), "Delete Cache?", + MB_YESNO|MB_TASKMODAL) == IDNO) + { + return; + } + m_GeneratorPicked = false; + if(m_WhereBuild != "" && this->m_CMakeInstance) { this->m_CMakeInstance->GetCacheManager()->DeleteCache(m_WhereBuild); diff --git a/Source/MFCDialog/CMakeSetupDialog.h b/Source/MFCDialog/CMakeSetupDialog.h index 3294b37..4825368 100644 --- a/Source/MFCDialog/CMakeSetupDialog.h +++ b/Source/MFCDialog/CMakeSetupDialog.h @@ -138,6 +138,7 @@ protected: cmake *m_CMakeInstance; HCURSOR m_Cursor; bool m_RunningConfigure; + bool m_GeneratorPicked; }; //{{AFX_INSERT_LOCATION}} |