X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/01d2ec474c4c1828c229830ba4e4961de5f0527d..7e5babd61cf6c92d3d3a87a6d66d559ed0422777:/src/simgrid/sg_config.cpp diff --git a/src/simgrid/sg_config.cpp b/src/simgrid/sg_config.cpp index 816d265631..fa7446e55c 100644 --- a/src/simgrid/sg_config.cpp +++ b/src/simgrid/sg_config.cpp @@ -1,22 +1,31 @@ -/* Copyright (c) 2009-2019. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2009-2023. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ /* sg_config: configuration infrastructure for the simulation world */ +#include +#include +#include +#include + #include "simgrid/sg_config.hpp" -#include "simgrid/instr.h" +#include "src/include/xbt/mmalloc.h" #include "src/instr/instr_private.hpp" #include "src/internal_config.h" +#include "src/kernel/context/Context.hpp" #include "src/kernel/lmm/maxmin.hpp" +#include "src/kernel/resource/NetworkModel.hpp" #include "src/mc/mc_config.hpp" #include "src/mc/mc_replay.hpp" +#include "src/simgrid/module.hpp" +#include "src/smpi/include/smpi_config.hpp" #include "src/surf/surf_interface.hpp" -#include "surf/surf.hpp" -#include "xbt/config.hpp" -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_config, surf, "About the configuration of SimGrid"); +#include + +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(config, kernel, "About the configuration of SimGrid"); static simgrid::config::Flag cfg_continue_after_help {"help-nostop", "Do not stop the execution when --help is found", false}; @@ -45,11 +54,10 @@ int _sg_cfg_init_status = 0; static void sg_config_cmd_line(int *argc, char **argv) { bool shall_exit = false; - int i; - int j; bool parse_args = true; // Stop parsing the parameters once we found '--' - for (j = i = 1; i < *argc; i++) { + int j = 1; + for (int i = j; i < *argc; i++) { if (not strcmp("--", argv[i])) { parse_args = false; // Remove that '--' from the arguments @@ -68,7 +76,10 @@ static void sg_config_cmd_line(int *argc, char **argv) XBT_HELP("\n" "Each of these configurations can be used by adding\n" " --cfg=