From: Frederic Suter Date: Mon, 2 Dec 2019 09:45:12 +0000 (+0100) Subject: mv version related things from config.h.in to version.h.in X-Git-Tag: v3.25~340 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d011cb8a5566e78daba9b90c6a370dca07b74c5a mv version related things from config.h.in to version.h.in --- diff --git a/include/simgrid/config.h.in b/include/simgrid/config.h.in index 6fd16ee603..b1cc8229c1 100644 --- a/include/simgrid/config.h.in +++ b/include/simgrid/config.h.in @@ -9,28 +9,6 @@ #define SIMGRID_PUBLIC_CONFIG_H #include -/** Define the version numbers of the used header files. - See sg_version_get() to retrieve the version of the dynamic library. */ -#define SIMGRID_VERSION_MAJOR @SIMGRID_VERSION_MAJOR@ -#define SIMGRID_VERSION_MINOR @SIMGRID_VERSION_MINOR@ -#define SIMGRID_VERSION_PATCH @SIMGRID_VERSION_PATCH@ -#define SIMGRID_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@" - -SG_BEGIN_DECL -/** Retrieves the version numbers of the used dynamic library (so, DLL or dynlib), while - SIMGRID_VERSION_MAJOR and friends give the version numbers of the used header files */ -XBT_PUBLIC void sg_version_get(int* major, int* minor, int* patch); - -/** Display the version information and some additional blurb. */ -XBT_PUBLIC void sg_version(); -SG_END_DECL - - -/* Version as a single integer. v3.4 is 30400, v3.16.2 is 31602, v42 will be 420000, and so on. */ -#define SIMGRID_VERSION (100UL * (100UL * (SIMGRID_VERSION_MAJOR) + (SIMGRID_VERSION_MINOR)) + (SIMGRID_VERSION_PATCH)) - -#define SIMGRID_VERSION_STRING "@SIMGRID_VERSION_STRING@" - /* Was Jedule compiled in? */ #cmakedefine01 SIMGRID_HAVE_JEDULE /* Was the Lua support compiled in? */ diff --git a/include/simgrid/msg.h b/include/simgrid/msg.h index a29e549ed8..aa2f024237 100644 --- a/include/simgrid/msg.h +++ b/include/simgrid/msg.h @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/include/simgrid/simdag.h b/include/simgrid/simdag.h index 4957244e29..849930536b 100644 --- a/include/simgrid/simdag.h +++ b/include/simgrid/simdag.h @@ -8,6 +8,7 @@ #include #include +#include #include #include diff --git a/include/simgrid/version.h.in b/include/simgrid/version.h.in index 1f3389cb7f..e431481195 100644 --- a/include/simgrid/version.h.in +++ b/include/simgrid/version.h.in @@ -10,4 +10,26 @@ #define SIMGRID_GIT_VERSION "@GIT_VERSION@" +/** Define the version numbers of the used header files. + See sg_version_get() to retrieve the version of the dynamic library. */ +#define SIMGRID_VERSION_MAJOR @SIMGRID_VERSION_MAJOR@ +#define SIMGRID_VERSION_MINOR @SIMGRID_VERSION_MINOR@ +#define SIMGRID_VERSION_PATCH @SIMGRID_VERSION_PATCH@ +#define SIMGRID_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@" + +SG_BEGIN_DECL +/** Retrieves the version numbers of the used dynamic library (so, DLL or dynlib), while + SIMGRID_VERSION_MAJOR and friends give the version numbers of the used header files */ +XBT_PUBLIC void sg_version_get(int* major, int* minor, int* patch); + +/** Display the version information and some additional blurb. */ +XBT_PUBLIC void sg_version(); +SG_END_DECL + + +/* Version as a single integer. v3.4 is 30400, v3.16.2 is 31602, v42 will be 420000, and so on. */ +#define SIMGRID_VERSION (100UL * (100UL * (SIMGRID_VERSION_MAJOR) + (SIMGRID_VERSION_MINOR)) + (SIMGRID_VERSION_PATCH)) + +#define SIMGRID_VERSION_STRING "@SIMGRID_VERSION_STRING@" + #endif /* SIMGRID_PUBLIC_CONFIG_H */ diff --git a/src/instr/instr_config.cpp b/src/instr/instr_config.cpp index 0080458b2f..fcddfdeaef 100644 --- a/src/instr/instr_config.cpp +++ b/src/instr/instr_config.cpp @@ -6,6 +6,7 @@ #include "include/xbt/config.hpp" #include "simgrid/Exception.hpp" #include "simgrid/s4u/Engine.hpp" +#include "simgrid/version.h" #include "src/instr/instr_private.hpp" #include "surf/surf.hpp" #include "xbt/virtu.h" /* xbt_cmdline */ diff --git a/src/simgrid/sg_config.cpp b/src/simgrid/sg_config.cpp index 2b8cdc2829..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" diff --git a/src/smpi/bindings/smpi_pmpi.cpp b/src/smpi/bindings/smpi_pmpi.cpp index 7b406659c5..f78f90fb52 100644 --- a/src/smpi/bindings/smpi_pmpi.cpp +++ b/src/smpi/bindings/smpi_pmpi.cpp @@ -7,6 +7,7 @@ #include "simgrid/instr.h" #include "simgrid/s4u/Engine.hpp" #include "simgrid/s4u/Host.hpp" +#include "simgrid/version.h" #include "smpi_comm.hpp" #include "smpi_datatype_derived.hpp" #include "smpi_status.hpp"