From: agiersch Date: Tue, 22 Feb 2011 13:51:04 +0000 (+0000) Subject: Define SIMGRID_VERSION through cmake. X-Git-Tag: v3.6_beta2~258 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d1f1ad261bf96a6200f15bd79c0b05ea8d87bbd1?ds=sidebyside Define SIMGRID_VERSION through cmake. Also add macro MAKE_SIMGRID_VERSION(major, minor, patch). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9685 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/CMakeLists.txt b/CMakeLists.txt index c1c945307c..16c6ea81d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,11 @@ project(simgrid CXX C) set(CMAKE_C_FLAGS "" CACHE TYPE INTERNAL FORCE) set(CMAKE_CXX_FLAGS "" CACHE TYPE INTERNAL FORCE) set(CMAKE_EXE_LINKER_FLAGS "" CACHE TYPE INTERNAL FORCE) -set(release_version "3.5") +### Version 3.5.99, aka 3.6 svn +set(SIMGRID_VERSION_MAJOR "3") +set(SIMGRID_VERSION_MINOR "5") +set(SIMGRID_VERSION_PATCH "99") +set(release_version "${SIMGRID_VERSION_MAJOR}.${SIMGRID_VERSION_MINOR}") set(libsimgrid_version "${release_version}") set(libgras_version "${release_version}") set(libsmpi_version "${release_version}") diff --git a/ChangeLog b/ChangeLog index 73a299b8cb..a789501d54 100644 --- a/ChangeLog +++ b/ChangeLog @@ -83,6 +83,8 @@ SimGrid (3.6) unstable; urgency=low nuclear plant operating system). If such things should happen, you could rely on that macro to adapt. - current value: 30600 for 3.06.00, aka 3.6 + * Define macro MAKE_SIMGRID_VERSION(major, minor, patch) to help building + a number that can be compared with SIMGRID_VERSION. -- Da SimGrid team diff --git a/include/simgrid_config.h.in b/include/simgrid_config.h.in index 74c1495de9..8006704efa 100644 --- a/include/simgrid_config.h.in +++ b/include/simgrid_config.h.in @@ -17,7 +17,16 @@ SG_BEGIN_DECL() /* Version X.Y.Z will get version number XYZ: all digits concatenated without dots * (with Y and Z must be on two positions)*/ -#define SIMGRID_VERSION 30599 /* 3.5.99, aka 3.6 svn */ +#define MAKE_SIMGRID_VERSION(major, minor, patch) \ + (100UL * (100UL * (major) + (minor)) + (patch)) + +#cmakedefine SIMGRID_VERSION_MAJOR @SIMGRID_VERSION_MAJOR@ +#cmakedefine SIMGRID_VERSION_MINOR @SIMGRID_VERSION_MINOR@ +#cmakedefine SIMGRID_VERSION_PATCH @SIMGRID_VERSION_PATCH@ + +#define SIMGRID_VERSION MAKE_SIMGRID_VERSION(SIMGRID_VERSION_MAJOR, \ + SIMGRID_VERSION_MINOR, \ + SIMGRID_VERSION_PATCH) /* take care of DLL usage madness */