static void build_for_device (IdeContext *context, IdeDevice *device) { g_autoptr(IdeBuilder) builder = NULL; g_autoptr(IdeBuildResult) build_result = NULL; g_autoptr(GError) error = NULL; IdeBuildSystem *build_system; IdeBuilderBuildFlags flags = IDE_BUILDER_BUILD_FLAGS_NONE; GKeyFile *config; print_build_info (context, device); config = g_key_file_new (); if (rebuild) flags |= IDE_BUILDER_BUILD_FLAGS_FORCE_REBUILD; if (parallel) g_key_file_set_integer (config, "parallel", "workers", parallel); build_system = ide_context_get_build_system (context); builder = ide_build_system_get_builder (build_system, config, device, &error); g_key_file_unref (config); if (!builder) { g_printerr ("%s\n", error->message); quit (EXIT_FAILURE); return; } build_start = g_get_monotonic_time (); ide_builder_build_async (builder, flags, &build_result, NULL, build_cb, NULL); if (build_result) { GInputStream *stderr_stream; GInputStream *stdout_stream; stderr_stream = ide_build_result_get_stderr_stream (build_result); stdout_stream = ide_build_result_get_stdout_stream (build_result); log_dumper (stderr_stream, TRUE); log_dumper (stdout_stream, FALSE); g_object_unref (stderr_stream); g_object_unref (stdout_stream); } }
/** * Parse string of program options and store the given option values * in the member variables of this class. * * @param argc number of program arguments * @param argv program arguments */ void Command_line_options::parse(int argc, const char* argv[]) { assert(argc > 0); reset(); program = argv[0]; for (int i = 1; i < argc; ++i) { const std::string option(argv[i]); if (starts_with(option,"--slha-input-file=")) { slha_input_file = option.substr(18); if (slha_input_file.empty()) WARNING("no SLHA input file name given"); } else if (starts_with(option,"--slha-output-file=")) { slha_output_file = option.substr(19); if (slha_output_file.empty()) WARNING("no SLHA output file name given"); } else if (starts_with(option,"--spectrum-output-file=")) { spectrum_file = option.substr(23); } else if (starts_with(option,"--rgflow-output-file=")) { rgflow_file = option.substr(21); } else if (option == "--help" || option == "-h") { print_usage(std::cout); do_exit = true; } else if (option == "--build-info") { print_build_info(std::cout); do_exit = true; } else if (option == "--model-info") { do_print_model_info = true; do_exit = true; } else if (option == "--version" || option == "-v") { print_version(std::cout); do_exit = true; } else { ERROR("Unrecognized command line option: " << option); do_exit = true; exit_status = EXIT_FAILURE; } } }
void vrouter_ops_process(void *s_req) { vrouter_ops *req = (vrouter_ops *)s_req; if (opt[INFO_OPT_INDEX]) { if (req->vo_build_info) print_build_info(req->vo_build_info); print_vrouter_parameters(req); print_log_level(req); print_enabled_log_types(req); } else { if (opt[GET_LOG_LEVEL_INDEX]) print_log_level(req); if (opt[GET_ENABLED_LOGS_INDEX]) print_enabled_log_types(req); } return; }