ENH: add error checking for empty build dir

This commit is contained in:
Bill Hoffman 2001-04-25 18:53:33 -04:00
parent 5c83326fb4
commit 11b68dea51
1 changed files with 16 additions and 0 deletions

View File

@ -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();