Browse Source

cmake error messages no longer appear twice when saving CMakeLists.txt

merge-requests/365/head
eidheim 10 years ago
parent
commit
4a6d92c893
  1. 6
      src/notebook.cc

6
src/notebook.cc

@ -248,15 +248,15 @@ bool Notebook::save(int page) {
boost::filesystem::path project_path;
if(view->file_path.filename()=="CMakeLists.txt") {
auto &directories=Directories::get();
if(directories.cmake && directories.cmake->project_path!="" && view->file_path.generic_string().substr(0, directories.cmake->project_path.generic_string().size()+1)==directories.cmake->project_path.generic_string()+'/' && CMake::create_compile_commands(directories.cmake->project_path)) {
if(directories.cmake && directories.cmake->project_path!="" && view->file_path.generic_string().substr(0, directories.cmake->project_path.generic_string().size()+1)==directories.cmake->project_path.generic_string()+'/') {
if(CMake::create_compile_commands(directories.cmake->project_path))
project_path=directories.cmake->project_path;
}
else {
CMake cmake(view->file_path.parent_path());
if(cmake.project_path!="" && CMake::create_compile_commands(cmake.project_path)) {
if(cmake.project_path!="" && CMake::create_compile_commands(cmake.project_path))
project_path=cmake.project_path;
}
}
if(project_path!="") {
for(auto source_view: source_views) {
if(auto source_clang_view=dynamic_cast<Source::ClangView*>(source_view)) {

Loading…
Cancel
Save