Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
mv simgrid_config.h simgrid/config
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 16 Jun 2018 23:01:14 +0000 (01:01 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 16 Jun 2018 23:01:40 +0000 (01:01 +0200)
It'd be great if this one could not break our user's compilation :FEAR:

30 files changed:
.gitignore
CMakeLists.txt
ChangeLog
FindSimGrid.cmake
doc/doxygen/ns3.doc
include/simgrid/config.h.in [moved from include/simgrid_config.h.in with 96% similarity]
include/simgrid/jedule/jedule.hpp
include/simgrid/jedule/jedule_events.hpp
include/simgrid/jedule/jedule_platform.hpp
include/simgrid/jedule/jedule_sd_binding.h
include/simgrid/modelchecker.h
include/simgrid_config.h [new file with mode: 0644]
include/xbt/misc.h
include/xbt/string.hpp
include/xbt/sysdep.h
src/instr/instr_interface.cpp
src/instr/instr_private.hpp
src/mc/checker/LivenessChecker.hpp
src/mc/mc_base.cpp
src/mc/mc_dwarf.cpp
src/mc/remote/RemoteClient.hpp
src/xbt/automaton/automaton_lexer.yy.c
src/xbt/automaton/parserPromela.lex
src/xbt/automaton/parserPromela.tab.cacc
src/xbt/automaton/parserPromela.yacc
src/xbt/string.cpp
src/xbt/xbt_main.cpp
tools/cmake/DefinePackages.cmake
tools/cmake/Distrib.cmake
tools/cmake/src/internal_config.h.in

index 3204156..9ddacb2 100644 (file)
@@ -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
index 28492c4..9568207 100644 (file)
@@ -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}")
index b07b74b..ee50307 100644 (file)
--- 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
index dd035e2..ad4792e 100644 (file)
 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
index c91fa55..91950b9 100644 (file)
@@ -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 <tt>include/simgrid_config.h</tt>
+and this information is also available in <tt>include/simgrid/config.h</tt>
 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 <tt>CMakeFiles/CMakeOutput.log</tt> and
similarity index 96%
rename from include/simgrid_config.h.in
rename to include/simgrid/config.h.in
index 3b93712..72d6570 100644 (file)
@@ -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.          */
 
index 5381697..8c867b1 100644 (file)
@@ -6,9 +6,9 @@
 #ifndef JEDULE_HPP_
 #define JEDULE_HPP_
 
+#include <simgrid/config.h>
 #include <simgrid/jedule/jedule_events.hpp>
 #include <simgrid/jedule/jedule_platform.hpp>
-#include <simgrid_config.h>
 
 #include <cstdio>
 
index 5ab0f8f..be98ba9 100644 (file)
@@ -8,8 +8,8 @@
 
 #include <simgrid/jedule/jedule_platform.hpp>
 
+#include <simgrid/config.h>
 #include <simgrid/forward.h>
-#include <simgrid_config.h>
 
 #include <vector>
 #include <string>
index e076f29..e7575b8 100644 (file)
@@ -6,8 +6,8 @@
 #ifndef JED_SIMGRID_PLATFORM_H_
 #define JED_SIMGRID_PLATFORM_H_
 
+#include <simgrid/config.h>
 #include <simgrid/forward.h>
-#include <simgrid_config.h>
 #include <xbt/dynar.h>
 
 #include <unordered_map>
index 5f5ab68..f9c958e 100644 (file)
@@ -6,8 +6,8 @@
 #ifndef JEDULE_SD_BINDING_H_
 #define JEDULE_SD_BINDING_H_
 
+#include <simgrid/config.h>
 #include <simgrid/simdag.h>
-#include <simgrid_config.h>
 
 #if SIMGRID_HAVE_JEDULE
 SG_BEGIN_DECL()
index 547f9fd..77c0c6d 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <stddef.h> /* size_t */
 
-#include <simgrid_config.h> /* SIMGRID_HAVE_MC ? */
+#include <simgrid/config.h> /* SIMGRID_HAVE_MC ? */
 
 #include <xbt/base.h>
 
diff --git a/include/simgrid_config.h b/include/simgrid_config.h
new file mode 100644 (file)
index 0000000..7d2de9f
--- /dev/null
@@ -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 <simgrid/config.h>
index c04f208..7af1415 100644 (file)
@@ -8,7 +8,7 @@
 #ifndef XBT_MISC_H
 #define XBT_MISC_H
 
-#include <simgrid_config.h>
+#include <simgrid/config.h>
 #include <xbt/base.h>
 #include <xbt/dynar.h>
 
index 7af6d33..9400d3d 100644 (file)
@@ -6,7 +6,7 @@
 #ifndef SIMGRID_XBT_STRING_HPP
 #define SIMGRID_XBT_STRING_HPP
 
-#include <simgrid_config.h>
+#include <simgrid/config.h>
 
 #include <cstdarg>
 #include <cstdlib>
index 44ef89a..7bcc04b 100644 (file)
@@ -14,7 +14,7 @@
 #include <xbt/log.h>
 #include <xbt/misc.h>
 
-#include <simgrid_config.h>
+#include <simgrid/config.h>
 
 #include <string.h>
 #include <stdlib.h>
index 4b9c0f1..67cd930 100644 (file)
@@ -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"
index 52c6aaa..be709da 100644 (file)
@@ -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"
index 090b301..fdab4b4 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "src/mc/checker/Checker.hpp"
 #include "src/mc/mc_state.hpp"
-#include <simgrid_config.h>
+#include <simgrid/config.h>
 #include <xbt/automaton.h>
 #include <xbt/base.h>
 
index 384283f..2ad939f 100644 (file)
@@ -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 <simgrid_config.h>
+#include <simgrid/config.h>
 
 #include "mc/mc.h"
 #include "src/mc/mc_base.h"
index 580b8f5..d97c710 100644 (file)
@@ -24,7 +24,7 @@
 #include "xbt/log.h"
 #include "xbt/string.hpp"
 #include "xbt/sysdep.h"
-#include <simgrid_config.h>
+#include <simgrid/config.h>
 
 #include "src/mc/mc_dwarf.hpp"
 #include "src/mc/mc_private.hpp"
index f53bb04..2809fd6 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <sys/types.h>
 
-#include <simgrid_config.h>
+#include <simgrid/config.h>
 
 #include "xbt/base.h"
 #include <xbt/mmalloc.h>
index 4b6061f..098d85e 100644 (file)
@@ -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
index 5107d1b..956ba7e 100644 (file)
@@ -8,7 +8,7 @@
 
 %{
 
-#include "simgrid_config.h"
+#include "simgrid/config.h"
 #if !HAVE_UNISTD_H
 #define YY_NO_UNISTD_H /* hello Windows */
 #endif
index 52a2cea..f721f97 100644 (file)
@@ -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
index 2499e83..cfbc046 100644 (file)
@@ -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
index b8a553b..a3d6559 100644 (file)
@@ -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 <cstdarg>
-#include <cstdio>
-
-#include <simgrid_config.h>
-
+#include <simgrid/config.h>
 #include <xbt/string.hpp>
 #include <xbt/sysdep.h>
 
+#include <cstdarg>
+#include <cstdio>
+
 namespace simgrid {
 namespace xbt {
 
index ef2b60f..5cb3298 100644 (file)
@@ -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 <cmath>
-
-#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 <cmath>
 #include <cstdio>
 #ifdef _WIN32
 # include <csignal> /* To silence MSVC on abort() */
index e6ecdf5..6bd826b 100644 (file)
@@ -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
index 486b809..7a8b059 100644 (file)
@@ -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
index d5d876a..457aaf2 100644 (file)
@@ -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 */
 /* <execinfo.h> */