From: Martin Quinson Date: Sat, 16 Jun 2018 23:01:14 +0000 (+0200) Subject: mv simgrid_config.h simgrid/config X-Git-Tag: v3.20~89 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/85ba969329ba8ffcdd29e8adbfdb58047bfc80ee mv simgrid_config.h simgrid/config It'd be great if this one could not break our user's compilation :FEAR: --- diff --git a/.gitignore b/.gitignore index 3204156a00..9ddacb2402 100644 --- a/.gitignore +++ b/.gitignore @@ -40,7 +40,7 @@ src/*_unit.cpp src/*_unit.c ### Generated files _*.c -include/simgrid_config.h +include/simgrid/config.h include/smpi/smpif.h src/internal_config.h testprog diff --git a/CMakeLists.txt b/CMakeLists.txt index 28492c4dcb..956820705e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -615,11 +615,11 @@ endif() # Avoid triggering a (full) rebuild by touching the files if they did not really change configure_file("${CMAKE_HOME_DIRECTORY}/tools/cmake/src/internal_config.h.in" "${CMAKE_BINARY_DIR}/src/internal_config.h.generated" @ONLY IMMEDIATE) -configure_file("${CMAKE_HOME_DIRECTORY}/include/simgrid_config.h.in" "${CMAKE_BINARY_DIR}/include/simgrid_config.h.generated" @ONLY IMMEDIATE) +configure_file("${CMAKE_HOME_DIRECTORY}/include/simgrid/config.h.in" "${CMAKE_BINARY_DIR}/include/simgrid/config.h.generated" @ONLY IMMEDIATE) execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/src/internal_config.h.generated ${CMAKE_BINARY_DIR}/src/internal_config.h) -execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/include/simgrid_config.h.generated ${CMAKE_BINARY_DIR}/include/simgrid_config.h) +execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/include/simgrid/config.h.generated ${CMAKE_BINARY_DIR}/include/simgrid/config.h) file(REMOVE ${CMAKE_BINARY_DIR}/src/internal_config.h.generated) -file(REMOVE ${CMAKE_BINARY_DIR}/include/simgrid_config.h.generated) +file(REMOVE ${CMAKE_BINARY_DIR}/include/simgrid/config.h.generated) # We need two versions of the SMPI scripts because they contain the path to the library # so, it depends of whether SimGrid is installed, or run from the sources (during the build) @@ -679,7 +679,7 @@ endif() set(generated_headers_to_install ${CMAKE_CURRENT_BINARY_DIR}/include/smpi/mpif.h - ${CMAKE_CURRENT_BINARY_DIR}/include/simgrid_config.h + ${CMAKE_CURRENT_BINARY_DIR}/include/simgrid/config.h ) set(generated_headers ${CMAKE_CURRENT_BINARY_DIR}/src/internal_config.h ) @@ -857,9 +857,9 @@ foreach(line ${config_output}) message(" ${line}") endforeach() message("##########################################") -message("#### Content of simgrid_config.h ####") +message("#### Content of simgrid/config.h ####") message("##########################################") -file(STRINGS ${CMAKE_CURRENT_BINARY_DIR}/include/simgrid_config.h config_output) +file(STRINGS ${CMAKE_CURRENT_BINARY_DIR}/include/simgrid/config.h config_output) LIST(REMOVE_AT config_output 0 1 2 3 4 5 6 7 8 9 -1) # Pass the file header foreach(line ${config_output}) message(" ${line}") diff --git a/ChangeLog b/ChangeLog index b07b74bc20..ee50307006 100644 --- a/ChangeLog +++ b/ChangeLog @@ -27,6 +27,9 @@ XBT: - Config: the C API is now deprecated (will be removed in 3.23), and the C++ API has been slightly improved. +Other: + - Move simgrid_config.h to simgrid/config.h (old header still working) + Fixed bugs: - #143: Setting a breakpoint at a given time - #258: daemonized actors hang after all non-daemonized actors have completed diff --git a/FindSimGrid.cmake b/FindSimGrid.cmake index dd035e23f5..ad4792e827 100644 --- a/FindSimGrid.cmake +++ b/FindSimGrid.cmake @@ -56,9 +56,16 @@ cmake_minimum_required(VERSION 2.8) find_path(SimGrid_INCLUDE_DIR - NAMES simgrid_config.h + NAMES simgrid/config.h PATHS ${SimGrid_PATH}/include /opt/simgrid/include ) +if (NOT SimGrid_INCLUDE_DIR) + # search under the old name + find_path(SimGrid_INCLUDE_DIR + NAMES simgrid_config.h + PATHS ${SimGrid_PATH}/include /opt/simgrid/include + ) +endif() find_library(SimGrid_LIBRARY NAMES simgrid PATHS ${SimGrid_PATH}/lib /opt/simgrid/lib @@ -68,7 +75,11 @@ mark_as_advanced(SimGrid_LIBRARY) if (SimGrid_INCLUDE_DIR) set(SimGrid_VERSION_REGEX "^#define SIMGRID_VERSION_(MAJOR|MINOR|PATCH) ([0-9]+)$") - file(STRINGS "${SimGrid_INCLUDE_DIR}/simgrid_config.h" SimGrid_VERSION_STRING REGEX ${SimGrid_VERSION_REGEX}) + if (EXISTS "${SimGrid_INCLUDE_DIR}/simgrid/config.h") + file(STRINGS "${SimGrid_INCLUDE_DIR}/simgrid/config.h" SimGrid_VERSION_STRING REGEX ${SimGrid_VERSION_REGEX}) + else() + file(STRINGS "${SimGrid_INCLUDE_DIR}/simgrid_config.h" SimGrid_VERSION_STRING REGEX ${SimGrid_VERSION_REGEX}) + endif() set(SimGrid_VERSION "") # Concat the matches to MAJOR.MINOR.PATCH assuming they appear in this order diff --git a/doc/doxygen/ns3.doc b/doc/doxygen/ns3.doc index c91fa5561e..91950b9201 100644 --- a/doc/doxygen/ns3.doc +++ b/doc/doxygen/ns3.doc @@ -42,7 +42,7 @@ cmake . -Denable_ns3=ON -DNS3_HINT=/opt/ns3 # or change the path if needed \endverbatim By the end of the configuration, cmake reports whether ns-3 was found, -and this information is also available in include/simgrid_config.h +and this information is also available in include/simgrid/config.h If your local copy defines the variable \c SIMGRID_HAVE_NS3 to 1, then ns-3 was correctly detected. If it's defined to 0, then something went wrong. Explore CMakeFiles/CMakeOutput.log and diff --git a/include/simgrid_config.h.in b/include/simgrid/config.h.in similarity index 96% rename from include/simgrid_config.h.in rename to include/simgrid/config.h.in index 3b93712833..72d6570e10 100644 --- a/include/simgrid_config.h.in +++ b/include/simgrid/config.h.in @@ -1,4 +1,4 @@ -/* simgrid_config.h - Results of the configure made visible to user code. */ +/* simgrid/config.h - Results of the configure made visible to user code. */ /* Copyright (c) 2009-2018. The SimGrid Team. All rights reserved. */ diff --git a/include/simgrid/jedule/jedule.hpp b/include/simgrid/jedule/jedule.hpp index 5381697fd7..8c867b1793 100644 --- a/include/simgrid/jedule/jedule.hpp +++ b/include/simgrid/jedule/jedule.hpp @@ -6,9 +6,9 @@ #ifndef JEDULE_HPP_ #define JEDULE_HPP_ +#include #include #include -#include #include diff --git a/include/simgrid/jedule/jedule_events.hpp b/include/simgrid/jedule/jedule_events.hpp index 5ab0f8f108..be98ba99bc 100644 --- a/include/simgrid/jedule/jedule_events.hpp +++ b/include/simgrid/jedule/jedule_events.hpp @@ -8,8 +8,8 @@ #include +#include #include -#include #include #include diff --git a/include/simgrid/jedule/jedule_platform.hpp b/include/simgrid/jedule/jedule_platform.hpp index e076f2902e..e7575b8f59 100644 --- a/include/simgrid/jedule/jedule_platform.hpp +++ b/include/simgrid/jedule/jedule_platform.hpp @@ -6,8 +6,8 @@ #ifndef JED_SIMGRID_PLATFORM_H_ #define JED_SIMGRID_PLATFORM_H_ +#include #include -#include #include #include diff --git a/include/simgrid/jedule/jedule_sd_binding.h b/include/simgrid/jedule/jedule_sd_binding.h index 5f5ab68d2d..f9c958e134 100644 --- a/include/simgrid/jedule/jedule_sd_binding.h +++ b/include/simgrid/jedule/jedule_sd_binding.h @@ -6,8 +6,8 @@ #ifndef JEDULE_SD_BINDING_H_ #define JEDULE_SD_BINDING_H_ +#include #include -#include #if SIMGRID_HAVE_JEDULE SG_BEGIN_DECL() diff --git a/include/simgrid/modelchecker.h b/include/simgrid/modelchecker.h index 547f9fd237..77c0c6d10c 100644 --- a/include/simgrid/modelchecker.h +++ b/include/simgrid/modelchecker.h @@ -16,7 +16,7 @@ #include /* size_t */ -#include /* SIMGRID_HAVE_MC ? */ +#include /* SIMGRID_HAVE_MC ? */ #include diff --git a/include/simgrid_config.h b/include/simgrid_config.h new file mode 100644 index 0000000000..7d2de9f8f3 --- /dev/null +++ b/include/simgrid_config.h @@ -0,0 +1,9 @@ +/* simgrid_config.h - backward-compatibility wrapper. Stop using it */ + +/* Copyright (c) 2018. 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. */ + +#warning simgrid_config.h is now deprecated. Please use simgrid/config.h instead +#include diff --git a/include/xbt/misc.h b/include/xbt/misc.h index c04f2089dc..7af14159c6 100644 --- a/include/xbt/misc.h +++ b/include/xbt/misc.h @@ -8,7 +8,7 @@ #ifndef XBT_MISC_H #define XBT_MISC_H -#include +#include #include #include diff --git a/include/xbt/string.hpp b/include/xbt/string.hpp index 7af6d332c1..9400d3d3bf 100644 --- a/include/xbt/string.hpp +++ b/include/xbt/string.hpp @@ -6,7 +6,7 @@ #ifndef SIMGRID_XBT_STRING_HPP #define SIMGRID_XBT_STRING_HPP -#include +#include #include #include diff --git a/include/xbt/sysdep.h b/include/xbt/sysdep.h index 44ef89aa89..7bcc04b738 100644 --- a/include/xbt/sysdep.h +++ b/include/xbt/sysdep.h @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/src/instr/instr_interface.cpp b/src/instr/instr_interface.cpp index 4b9c0f129e..67cd9306c5 100644 --- a/src/instr/instr_interface.cpp +++ b/src/instr/instr_interface.cpp @@ -4,7 +4,6 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "simgrid/kernel/routing/NetPoint.hpp" -#include "simgrid_config.h" #include "src/instr/instr_private.hpp" #include "src/surf/network_interface.hpp" #include "src/surf/surf_private.hpp" diff --git a/src/instr/instr_private.hpp b/src/instr/instr_private.hpp index 52c6aaa8f2..be709da8f0 100644 --- a/src/instr/instr_private.hpp +++ b/src/instr/instr_private.hpp @@ -10,7 +10,6 @@ #include "simgrid/instr.h" #include "simgrid/s4u/Actor.hpp" -#include "simgrid_config.h" #include "src/instr/instr_paje_containers.hpp" #include "src/instr/instr_paje_events.hpp" #include "src/instr/instr_paje_types.hpp" diff --git a/src/mc/checker/LivenessChecker.hpp b/src/mc/checker/LivenessChecker.hpp index 090b301cba..fdab4b4ee9 100644 --- a/src/mc/checker/LivenessChecker.hpp +++ b/src/mc/checker/LivenessChecker.hpp @@ -16,7 +16,7 @@ #include "src/mc/checker/Checker.hpp" #include "src/mc/mc_state.hpp" -#include +#include #include #include diff --git a/src/mc/mc_base.cpp b/src/mc/mc_base.cpp index 384283fd33..2ad939fb20 100644 --- a/src/mc/mc_base.cpp +++ b/src/mc/mc_base.cpp @@ -3,7 +3,7 @@ /* 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. */ -#include +#include #include "mc/mc.h" #include "src/mc/mc_base.h" diff --git a/src/mc/mc_dwarf.cpp b/src/mc/mc_dwarf.cpp index 580b8f513e..d97c7107cb 100644 --- a/src/mc/mc_dwarf.cpp +++ b/src/mc/mc_dwarf.cpp @@ -24,7 +24,7 @@ #include "xbt/log.h" #include "xbt/string.hpp" #include "xbt/sysdep.h" -#include +#include #include "src/mc/mc_dwarf.hpp" #include "src/mc/mc_private.hpp" diff --git a/src/mc/remote/RemoteClient.hpp b/src/mc/remote/RemoteClient.hpp index f53bb047c4..2809fd6922 100644 --- a/src/mc/remote/RemoteClient.hpp +++ b/src/mc/remote/RemoteClient.hpp @@ -16,7 +16,7 @@ #include -#include +#include #include "xbt/base.h" #include diff --git a/src/xbt/automaton/automaton_lexer.yy.c b/src/xbt/automaton/automaton_lexer.yy.c index 4b6061f3c2..098d85ef82 100644 --- a/src/xbt/automaton/automaton_lexer.yy.c +++ b/src/xbt/automaton/automaton_lexer.yy.c @@ -511,7 +511,7 @@ char *xbt_automaton_parser_text; * under the terms of the license (GNU LGPL) which comes with this package. */ #line 10 "parserPromela.lex" -#include "simgrid_config.h" +#include "simgrid/config.h" #if !HAVE_UNISTD_H #define YY_NO_UNISTD_H /* hello Windows */ #endif diff --git a/src/xbt/automaton/parserPromela.lex b/src/xbt/automaton/parserPromela.lex index 5107d1b212..956ba7ef4e 100644 --- a/src/xbt/automaton/parserPromela.lex +++ b/src/xbt/automaton/parserPromela.lex @@ -8,7 +8,7 @@ %{ -#include "simgrid_config.h" +#include "simgrid/config.h" #if !HAVE_UNISTD_H #define YY_NO_UNISTD_H /* hello Windows */ #endif diff --git a/src/xbt/automaton/parserPromela.tab.cacc b/src/xbt/automaton/parserPromela.tab.cacc index 52a2cea9a7..f721f979ce 100644 --- a/src/xbt/automaton/parserPromela.tab.cacc +++ b/src/xbt/automaton/parserPromela.tab.cacc @@ -72,7 +72,7 @@ /* Copy the first part of user declarations. */ #line 7 "parserPromela.yacc" /* yacc.c:339 */ -#include "simgrid_config.h" +#include "simgrid/config.h" #if !HAVE_UNISTD_H #define YY_NO_UNISTD_H /* hello Windows */ #endif diff --git a/src/xbt/automaton/parserPromela.yacc b/src/xbt/automaton/parserPromela.yacc index 2499e83d27..cfbc046103 100644 --- a/src/xbt/automaton/parserPromela.yacc +++ b/src/xbt/automaton/parserPromela.yacc @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ %{ -#include "simgrid_config.h" +#include "simgrid/config.h" #if !HAVE_UNISTD_H #define YY_NO_UNISTD_H /* hello Windows */ #endif diff --git a/src/xbt/string.cpp b/src/xbt/string.cpp index b8a553bc17..a3d6559e95 100644 --- a/src/xbt/string.cpp +++ b/src/xbt/string.cpp @@ -1,17 +1,15 @@ -/* Copyright (c) 2015-2018. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2015-2018. 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. */ -#include -#include - -#include - +#include #include #include +#include +#include + namespace simgrid { namespace xbt { diff --git a/src/xbt/xbt_main.cpp b/src/xbt/xbt_main.cpp index ef2b60f283..5cb3298475 100644 --- a/src/xbt/xbt_main.cpp +++ b/src/xbt/xbt_main.cpp @@ -7,22 +7,19 @@ #define XBT_LOG_LOCALLY_DEFINE_XBT_CHANNEL /* MSVC don't want it to be declared extern in headers and local here */ -#include "simgrid_config.h" +#include "simgrid/config.h" +#include "simgrid/sg_config.hpp" +#include "src/internal_config.h" +#include "src/xbt_modinter.h" /* prototype of other module's init/exit in XBT */ #include "xbt/config.hpp" #include "xbt/dynar.h" #include "xbt/log.h" #include "xbt/log.hpp" #include "xbt/misc.h" +#include "xbt/module.h" /* this module */ #include "xbt/sysdep.h" -#include - -#include "xbt/module.h" /* this module */ - -#include "src/xbt_modinter.h" /* prototype of other module's init/exit in XBT */ -#include "simgrid/sg_config.hpp" - -#include "src/internal_config.h" +#include #include #ifdef _WIN32 # include /* To silence MSVC on abort() */ diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index e6ecdf5fb5..6bd826b0fe 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -658,6 +658,7 @@ set(MC_SIMGRID_MC_SRC src/mc/checker/simgrid_mc.cpp) set(headers_to_install + include/simgrid_config.h include/simgrid/actor.h include/simgrid/engine.h include/simgrid/chrono.hpp @@ -763,7 +764,7 @@ set(headers_to_install include/xbt/xbt_os_time.h ) set(source_of_generated_headers - include/simgrid_config.h.in + include/simgrid/config.h.in include/smpi/mpif.h.in) ### depend of some variables setted upper diff --git a/tools/cmake/Distrib.cmake b/tools/cmake/Distrib.cmake index 486b809c5a..7a8b059812 100644 --- a/tools/cmake/Distrib.cmake +++ b/tools/cmake/Distrib.cmake @@ -101,7 +101,7 @@ add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_INSTALL_PREFIX}/include/mc COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_INSTALL_PREFIX}/include/simgrid COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_INSTALL_PREFIX}/include/simgrid.h - COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_INSTALL_PREFIX}/include/simgrid_config.h + COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_INSTALL_PREFIX}/include/simgrid/config.h COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_INSTALL_PREFIX}/include/xbt.h COMMAND ${CMAKE_COMMAND} -E echo "uninstall include ok" COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_INSTALL_PREFIX}/share/man/man1/simgrid_update_xml.1 diff --git a/tools/cmake/src/internal_config.h.in b/tools/cmake/src/internal_config.h.in index d5d876afc0..457aaf2633 100644 --- a/tools/cmake/src/internal_config.h.in +++ b/tools/cmake/src/internal_config.h.in @@ -8,7 +8,7 @@ /* 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. */ -#include "simgrid_config.h" /* what was compiled in? */ +#include "simgrid/config.h" /* what was compiled in? */ /* Non-standard header files */ /* */