Browse Source

added run commands to config

master
tedjk 11 years ago
parent
commit
bc94a3bb3f
  1. 9
      juci/config.cc
  2. 3
      juci/config.json

9
juci/config.cc

@ -31,9 +31,14 @@ void MainConfig::GenerateSource() {
void MainConfig::GenerateTerminalCommands() {
boost::property_tree::ptree source_json = cfg_.get_child("project");
boost::property_tree::ptree commands_json = source_json.get_child("compile_commands");
for (auto &i : commands_json) {
boost::property_tree::ptree compile_commands_json = source_json.get_child("compile_commands");
boost::property_tree::ptree run_commands_json = source_json.get_child("run_commands");
for (auto &i : compile_commands_json) {
terminal_cfg_.InsertCompileCommand(i.second.get_value<std::string>());
}
for (auto &i : run_commands_json) {
terminal_cfg_.SetRunCommand(i.second.get_value<std::string>());
}
}
}

3
juci/config.json

@ -57,6 +57,9 @@
]
},
"project": {
"run_path": [
".build"
],
"compile_commands": [
"rm -rf ./.build",
"mkdir build",

Loading…
Cancel
Save