Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Define SIMGRID_VERSION through cmake.
authoragiersch <agiersch@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 22 Feb 2011 13:51:04 +0000 (13:51 +0000)
committeragiersch <agiersch@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 22 Feb 2011 13:51:04 +0000 (13:51 +0000)
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

CMakeLists.txt
ChangeLog
include/simgrid_config.h.in

index c1c9453..16c6ea8 100644 (file)
@@ -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(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}")
 set(libsimgrid_version "${release_version}")
 set(libgras_version "${release_version}")
 set(libsmpi_version "${release_version}")
index 73a299b..a789501 100644 (file)
--- 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
      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 <simgrid-devel@lists.gforge.inria.fr>
 
 
  -- Da SimGrid team <simgrid-devel@lists.gforge.inria.fr>
 
index 74c1495..8006704 100644 (file)
@@ -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)*/
 
 /* 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 */
 
 
 /* take care of DLL usage madness */