diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-04-25 22:53:33 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-04-25 22:53:33 (GMT) |
commit | 11b68dea51e8cb8fa243bc91f489a308fc71d45c (patch) | |
tree | aa2e864ac91a8ab79891562b51062b95a45a5c52 | |
parent | 5c83326fb43296bec07fe084497f8b3ea5b05e88 (diff) | |
download | CMake-11b68dea51e8cb8fa243bc91f489a308fc71d45c.zip CMake-11b68dea51e8cb8fa243bc91f489a308fc71d45c.tar.gz CMake-11b68dea51e8cb8fa243bc91f489a308fc71d45c.tar.bz2 |
ENH: add error checking for empty build dir
-rw-r--r-- | Source/MFCDialog/CMakeSetupDialog.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/MFCDialog/CMakeSetupDialog.cpp b/Source/MFCDialog/CMakeSetupDialog.cpp index 0303375..67800b9 100644 --- a/Source/MFCDialog/CMakeSetupDialog.cpp +++ b/Source/MFCDialog/CMakeSetupDialog.cpp @@ -315,6 +315,22 @@ void CMakeSetupDialog::LoadFromRegistry() void CMakeSetupDialog::OnBuildProjects() { + if(!cmSystemTools::FileExists(m_WhereBuild)) + { + std::string message = + "Build directory does not exist, should I create it?\n\n" + "Directory: "; + message += (const char*)m_WhereBuild; + if(MessageBox(message.c_str(), "Create Directory", MB_OKCANCEL) == IDOK) + { + cmSystemTools::MakeDirectory(m_WhereBuild); + } + else + { + MessageBox("Build Project aborted, nothing done."); + return; + } + } ::SetCursor(LoadCursor(NULL, IDC_WAIT)); // get all the info from the screen this->UpdateData(); |