diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c2bda6f..3118301 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -9,7 +9,7 @@ if(APPLE) endif() if(CYGWIN) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mwindows") #TODO: make juci work with -mwin32 to run without X-server + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mwindows") endif() INCLUDE(FindPkgConfig) diff --git a/src/cmake.cc b/src/cmake.cc index d2ecfe6..aab2338 100644 --- a/src/cmake.cc +++ b/src/cmake.cc @@ -47,7 +47,7 @@ CMake::CMake(const boost::filesystem::path &path) { bool CMake::create_compile_commands(const boost::filesystem::path &path) { Singleton::terminal()->print("Creating "+path.string()+"/compile_commands.json\n"); //TODO: Windows... - if(Singleton::terminal()->execute("cmake . -DCMAKE_EXPORT_COMPILE_COMMANDS=ON", path)==EXIT_SUCCESS) + if(Singleton::terminal()->execute(Singleton::Config::terminal()->cmake_command+" . -DCMAKE_EXPORT_COMPILE_COMMANDS=ON", path)==EXIT_SUCCESS) return true; return false; } diff --git a/src/config.cc b/src/config.cc index f41feb4..0de059c 100644 --- a/src/config.cc +++ b/src/config.cc @@ -14,8 +14,9 @@ MainConfig::MainConfig() { Singleton::Config::window()->theme_name=cfg.get("gtk_theme.name"); Singleton::Config::window()->theme_variant=cfg.get("gtk_theme.variant"); - + Singleton::Config::terminal()->make_command=cfg.get("project.make_command"); + Singleton::Config::terminal()->cmake_command=cfg.get("project.cmake_command"); } void MainConfig::find_or_create_config_files() { diff --git a/src/files.h b/src/files.h index 9112019..a706c2f 100644 --- a/src/files.h +++ b/src/files.h @@ -62,18 +62,13 @@ const std::string configjson = " \"force_kill_last_running\": \"Escape\"\n" " },\n" " \"project\": {\n" +" \"cmake_command\": \"cmake\",\n" " \"make_command\": \"make\"\n" " },\n" " \"directoryfilter\": {\n" " \"ignore\": [\n" -" \"cmake\",\n" -" \"#\",\n" -" \"~\",\n" -" \".idea\",\n" -" \".so\"\n" " ],\n" " \"exceptions\": [\n" -" \"cmakelists.txt\"\n" " ]\n" " }\n" "}\n"; diff --git a/src/terminal.h b/src/terminal.h index 5bdbe1a..dfd1f50 100644 --- a/src/terminal.h +++ b/src/terminal.h @@ -13,6 +13,7 @@ class Terminal : public Gtk::TextView { public: class Config { public: + std::string cmake_command; std::string make_command; };