|
|
|
@ -39,8 +39,15 @@ void Project::on_save(int page) { |
|
|
|
if(page>=Notebook::get().size()) |
|
|
|
if(page>=Notebook::get().size()) |
|
|
|
return; |
|
|
|
return; |
|
|
|
auto view=Notebook::get().get_view(page); |
|
|
|
auto view=Notebook::get().get_view(page); |
|
|
|
if(view->file_path.filename()=="CMakeLists.txt") { |
|
|
|
if(view->language && view->language->get_id()=="cmake") { |
|
|
|
auto build=get_build(view->file_path); |
|
|
|
boost::filesystem::path cmake_path; |
|
|
|
|
|
|
|
if(view->file_path.filename()=="CMakeLists.txt") |
|
|
|
|
|
|
|
cmake_path=view->file_path; |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
cmake_path=filesystem::find_file_in_path_parents("CMakeLists.txt", view->file_path.parent_path()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!cmake_path.empty()) { |
|
|
|
|
|
|
|
auto build=get_build(cmake_path); |
|
|
|
if(dynamic_cast<CMake*>(build.get())) { |
|
|
|
if(dynamic_cast<CMake*>(build.get())) { |
|
|
|
build->update_default_build(true); |
|
|
|
build->update_default_build(true); |
|
|
|
if(boost::filesystem::exists(build->get_debug_build_path())) |
|
|
|
if(boost::filesystem::exists(build->get_debug_build_path())) |
|
|
|
@ -56,6 +63,7 @@ void Project::on_save(int page) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void Project::debug_update_status(const std::string &debug_status) { |
|
|
|
void Project::debug_update_status(const std::string &debug_status) { |
|
|
|
if(debug_status.empty()) |
|
|
|
if(debug_status.empty()) |
|
|
|
|