Browse Source

Fixes to cmake builds

merge-requests/365/head
eidheim 10 years ago
parent
commit
25da8e59f1
  1. 7
      src/cmake.cc
  2. 1
      src/directories.cc
  3. 3
      src/window.cc

7
src/cmake.cc

@ -161,7 +161,6 @@ bool CMake::create_debug_build(const boost::filesystem::path &project_path) {
auto it=debug_build_needed.find(project_path.string());
if(it==debug_build_needed.end())
return true;
debug_build_needed.erase(it);
}
std::unique_ptr<Dialog::Message> message;
@ -170,8 +169,12 @@ bool CMake::create_debug_build(const boost::filesystem::path &project_path) {
filesystem::escape_argument(project_path)+" -DCMAKE_BUILD_TYPE=Debug", debug_build_path);
if(message)
message->hide();
if(exit_status==EXIT_SUCCESS)
if(exit_status==EXIT_SUCCESS) {
auto it=debug_build_needed.find(project_path.string());
if(it!=debug_build_needed.end())
debug_build_needed.erase(it);
return true;
}
return false;
}

1
src/directories.cc

@ -130,6 +130,7 @@ void Directories::open(const boost::filesystem::path& dir_path) {
update_mutex.unlock();
cmake=std::unique_ptr<CMake>(new CMake(dir_path));
CMake::create_default_build(cmake->project_path);
auto project=cmake->get_functions_parameters("project");
if(project.size()>0 && project[0].second.size()>0)
get_column(0)->set_title(project[0].second[0]);

3
src/window.cc

@ -211,7 +211,8 @@ std::unique_ptr<CMake> Window::get_cmake() {
auto cmake=std::unique_ptr<CMake>(new CMake(path));
if(cmake->project_path.empty())
return nullptr;
CMake::create_default_build(cmake->project_path);
if(!CMake::create_default_build(cmake->project_path))
return nullptr;
return cmake;
}

Loading…
Cancel
Save