X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/96cedde3cdbc0b8ffc3f096a1b65d021b0226f99..d011cb8a5566e78daba9b90c6a370dca07b74c5a:/src/simgrid/sg_config.cpp diff --git a/src/simgrid/sg_config.cpp b/src/simgrid/sg_config.cpp index d02aa1943a..11bd7dd3bb 100644 --- a/src/simgrid/sg_config.cpp +++ b/src/simgrid/sg_config.cpp @@ -7,6 +7,7 @@ #include "simgrid/sg_config.hpp" #include "simgrid/instr.h" +#include "simgrid/version.h" #include "src/instr/instr_private.hpp" #include "src/internal_config.h" #include "src/kernel/lmm/maxmin.hpp" @@ -41,15 +42,6 @@ void sg_config_continue_after_help() */ int _sg_cfg_init_status = 0; -/* instruct the upper layer (simix or simdag) to exit as soon as possible */ -bool _sg_cfg_exit_asap = false; - -#define sg_cfg_exit_early() \ - do { \ - _sg_cfg_exit_asap = true; \ - return; \ - } while (0) - /* Parse the command line, looking for options */ static void sg_config_cmd_line(int *argc, char **argv) { @@ -69,44 +61,42 @@ static void sg_config_cmd_line(int *argc, char **argv) simgrid::config::set_parse(opt); XBT_DEBUG("Did apply '%s' as config setting", opt); } else if (parse_args && not strcmp(argv[i], "--version")) { - printf("%s\n", SIMGRID_VERSION_STRING); + sg_version(); shall_exit = true; } else if (parse_args && (not strcmp(argv[i], "--cfg-help") || not strcmp(argv[i], "--help"))) { - printf("Description of the configuration accepted by this simulator:\n"); + XBT_HELP("Description of the configuration accepted by this simulator:"); simgrid::config::help(); - printf( - "\n" - "Each of these configurations can be used by adding\n" - " --cfg=