diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-11-04 18:09:51 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-11-04 18:09:51 (GMT) |
commit | a9df6fdd8ec2cbe12287b1e12219d2fb893ccf80 (patch) | |
tree | 110227939df9f35c68e39d9c863205b176537025 /Source/WXDialog | |
parent | 23dde130c7ffd210a91ee07871ee56a5ebe25440 (diff) | |
download | CMake-a9df6fdd8ec2cbe12287b1e12219d2fb893ccf80.zip CMake-a9df6fdd8ec2cbe12287b1e12219d2fb893ccf80.tar.gz CMake-a9df6fdd8ec2cbe12287b1e12219d2fb893ccf80.tar.bz2 |
Try to fix generator problems on Mac
Diffstat (limited to 'Source/WXDialog')
-rw-r--r-- | Source/WXDialog/cmWXMainFrame.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/WXDialog/cmWXMainFrame.cxx b/Source/WXDialog/cmWXMainFrame.cxx index c752ce5..0465ea4 100644 --- a/Source/WXDialog/cmWXMainFrame.cxx +++ b/Source/WXDialog/cmWXMainFrame.cxx @@ -565,10 +565,16 @@ void cmMainFrame::Initialize(cmCommandLineInfo* cmdInfo) this->LoadFromRegistry(); std::vector<std::string> names; this->m_CMakeInstance->GetRegisteredGenerators(names); + int cc = 0; for(std::vector<std::string>::iterator i = names.begin(); i != names.end(); ++i) { this->m_GeneratorMenu->Append(i->c_str()); + if ( *i == "Unix Makefiles" ) + { + this->m_GeneratorMenu->SetSelection(cc); + } + cc ++; } //{{AFX_DATA_INIT(CMakeSetupDialog) @@ -731,6 +737,19 @@ void cmMainFrame::UpdateSourceBuildMenus() void cmMainFrame::RunCMake(bool generateProjectFiles) { + if(this->m_GeneratorMenu->GetSelection() < 0 || + std::string(this->m_GeneratorMenu->GetValue().c_str()) == "") + { + std::string bindir = this->GetBinaryDir(); + if ( bindir.find("-") != bindir.npos ) + { + std::string message = + "Generator not specified. Please specify the generator for\n" + "building the project."; + wxMessageBox(message.c_str(), "CMake Error", wxICON_ERROR | wxOK ); + return; + } + } if(std::string(this->m_GeneratorMenu->GetValue().c_str()) == "Borland Makefiles") { std::string bindir = this->GetBinaryDir(); |