diff --git a/juci/config.json b/juci/config.json index a9553f6..09cb5a2 100644 --- a/juci/config.json +++ b/juci/config.json @@ -57,6 +57,7 @@ ] }, "project": { + "compile_commands": [ "rm -rf ./.build", "mkdir build", diff --git a/juci/terminal.cc b/juci/terminal.cc index 85f9047..45670d2 100644 --- a/juci/terminal.cc +++ b/juci/terminal.cc @@ -55,7 +55,7 @@ void Terminal::Controller::Run(std::string executable) { PrintMessage("juCi++ execute: " + executable + "\n"); DEBUG("Terminal: Compile: running run command: "); DEBUG_VAR(executable); - ExecuteCommand("cd ./.build/; ./"+executable, "r"); + ExecuteCommand("cd"+config().run_command() + "; ./"+executable, "r"); PrintMessage("\n"); } diff --git a/juci/terminal.h b/juci/terminal.h index 5fb7f7e..bccf7d2 100644 --- a/juci/terminal.h +++ b/juci/terminal.h @@ -13,8 +13,11 @@ namespace Terminal { Config(Terminal::Config& original); std::vector& compile_commands() { return compile_commands_; } void InsertCompileCommand(std::string command); + std::string& run_command() { return run_command_; } + void SetRunCommand(std::string command); private: std::vector compile_commands_; + std::string run_command_; }; class View {