@ -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")
INCLUDE(FindPkgConfig)
@ -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;
}
@ -16,6 +16,7 @@ MainConfig::MainConfig() {
Singleton::Config::window()->theme_variant=cfg.get<std::string>("gtk_theme.variant");
Singleton::Config::terminal()->make_command=cfg.get<std::string>("project.make_command");
Singleton::Config::terminal()->cmake_command=cfg.get<std::string>("project.cmake_command");
void MainConfig::find_or_create_config_files() {
@ -62,18 +62,13 @@ const std::string configjson =
" \"force_kill_last_running\": \"<primary><shift>Escape\"\n"
" },\n"
" \"project\": {\n"
" \"cmake_command\": \"cmake\",\n"
" \"make_command\": \"make\"\n"
" \"directoryfilter\": {\n"
" \"ignore\": [\n"
" \"cmake\",\n"
" \"#\",\n"
" \"~\",\n"
" \".idea\",\n"
" \".so\"\n"
" ],\n"
" \"exceptions\": [\n"
" \"cmakelists.txt\"\n"
" ]\n"
" }\n"
"}\n";
@ -13,6 +13,7 @@ class Terminal : public Gtk::TextView {
public:
class Config {
std::string cmake_command;
std::string make_command;
};