Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'v3_10_x'
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 4 Nov 2013 20:47:23 +0000 (21:47 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 4 Nov 2013 20:47:23 +0000 (21:47 +0100)
Conflicts:
CMakeLists.txt
ChangeLog

Fixed by defining current version as 3.11-devel.

CMakeLists.txt
ChangeLog
buildtools/Cmake/AddTests.cmake
buildtools/Cmake/CompleteInFiles.cmake
buildtools/Cmake/PrintArgs.cmake
include/simgrid_config.h.in
src/simgrid/sg_config.c

index 61d40e4..a00593a 100644 (file)
@@ -52,12 +52,19 @@ set(CMAKE_Fortran_LINK_FLAGS "" CACHE TYPE INTERNAL FORCE)
 set(SIMGRID_VERSION_MAJOR "3")
 set(SIMGRID_VERSION_MINOR "11")
 set(SIMGRID_VERSION_PATCH "0")
+set(SIMGRID_VERSION_EXTRA "-devel") # Extra words to add to version string (e.g. -rc1)
+
+set(SIMGRID_VERSION_DATE  "2013") # Year for copyright information
 
 if(${SIMGRID_VERSION_PATCH} EQUAL "0")
   set(release_version "${SIMGRID_VERSION_MAJOR}.${SIMGRID_VERSION_MINOR}")
 else()
   set(release_version "${SIMGRID_VERSION_MAJOR}.${SIMGRID_VERSION_MINOR}.${SIMGRID_VERSION_PATCH}")
 endif()
+
+set(SIMGRID_VERSION_STRING
+  "SimGrid version ${release_version}${SIMGRID_VERSION_EXTRA}\\nCopyright (c) ${SIMGRID_VERSION_DATE}. The Simgrid Team.")
+
 set(libsimgrid_version "${release_version}")
 set(libsimgrid-java_version "${release_version}")
 set(GCC_NEED_VERSION "4.0")
index 4adffbd..ee0c4e5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,7 +4,7 @@ SimGrid (3.11) NOT RELEASED; urgency=low
 
  -- $date Da SimGrid team <simgrid-devel@lists.gforge.inria.fr>
 
-SimGrid (3.10pre1) unstable; urgency=low
+SimGrid (3.10-rc1) unstable; urgency=low
 
  Java:
  * Reintegrate Java to the main archive as desynchronizing these
@@ -82,6 +82,9 @@ SimGrid (3.10pre1) unstable; urgency=low
    Unfortunately, calling exit may cause SimGrid to segfault, which is quite
    annoying when scripting around the simulator. Adding a
    --cfg=clean_atexit:no allows to circumvent this issue.
+ * New command line option --version, to get SimGrid version information.
+   Packagers may want to add extra words to SIMGRID_VERSION_EXTRA defined in
+   CMakeLists.txt.
 
 -- Mon Oct 7 2013 Da SimGrid team <simgrid-devel@lists.gforge.inria.fr>
 
index 6c1f959..e377f88 100644 (file)
@@ -103,8 +103,9 @@ if(NOT enable_memcheck)
     ADD_TEST(tesh-msg-pid-ucontext              ${TESH_COMMAND} ${TESH_OPTION} --cfg contexts/factory:ucontext --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/pid.tesh)
   endif()
 
-
-  IF(enable_debug) # these tests need the assertion mechanism
+  # these tests need the assertion mechanism
+  # exclude them from memcheck, as they normally die, leaving lots of unfree'd objects
+  IF(enable_debug AND NOT enable_memcheck)
     ADD_TEST(tesh-simdag-parser-bogus-symmetric ${TESH_COMMAND} ${TESH_OPTION} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms two_hosts_asymetric.tesh)
   ENDIF()
 
index 846f9ea..eaf6c29 100644 (file)
@@ -511,12 +511,20 @@ if(EXISTS ${CMAKE_HOME_DIRECTORY}/.git/ AND NOT WIN32)
     string(REPLACE "\n" "" GIT_DATE "${GIT_DATE}")
     message(STATUS "Git date: ${GIT_DATE}")
     string(REGEX REPLACE " .*" "" GIT_VERSION "${GIT_VERSION}")
-    STRING(REPLACE " +0000" "" GIT_DATE "${GIT_DATE}")
-    STRING(REPLACE " " "~" GIT_DATE "${GIT_DATE}")
-    STRING(REPLACE ":" "-" GIT_DATE "${GIT_DATE}")
   endif()
 endif()
 
+if(release)
+  set(SIMGRID_VERSION_STRING "${SIMGRID_VERSION_STRING}\\nRelease build")
+else()
+  set(SIMGRID_VERSION_STRING "${SIMGRID_VERSION_STRING}\\nDevelopment build")
+endif()
+if(GIT_VERSION)
+  set(SIMGRID_VERSION_STRING "${SIMGRID_VERSION_STRING} at commit ${GIT_VERSION}")
+endif()
+if(GIT_DATE)
+  set(SIMGRID_VERSION_STRING "${SIMGRID_VERSION_STRING} (${GIT_DATE})")
+endif()
 #--------------------------------------------------------------------------------------------------
 
 set(makecontext_CPPFLAGS_2 "")
index d15127a..200f671 100644 (file)
@@ -74,9 +74,9 @@ message("\nConfiguration of package `simgrid':")
 message("        BUILDNAME ...........: ${BUILDNAME}")
 message("        SITE ................: ${SITE}")
 if(release)
-  message("        Release .............: simgrid-${release_version} (release build)")
+  message("        Release .............: simgrid-${release_version}${SIMGRID_VERSION_EXTRA} (release build)")
 else()
-  message("        Release .............: simgrid-${release_version} (development build)")
+  message("        Release .............: simgrid-${release_version}${SIMGRID_VERSION_EXTRA} (development build)")
 endif()
 message("")
 message("        Compiler: C .........: ${CMAKE_C_COMPILER} (${CMAKE_C_COMPILER_ID})")
index fb08c29..789464f 100644 (file)
@@ -22,6 +22,8 @@ SG_BEGIN_DECL()
 #define SIMGRID_VERSION_MINOR @SIMGRID_VERSION_MINOR@
 #define SIMGRID_VERSION_PATCH @SIMGRID_VERSION_PATCH@
 
+#define SIMGRID_VERSION_STRING "@SIMGRID_VERSION_STRING@"
+
 /* Version X.Y.Z will get version number XYZ: all digits concatenated without dots
  * (with Y and Z must be on two positions)*/
 
index 0f88330..b812c87 100644 (file)
@@ -55,6 +55,9 @@ static void sg_config_cmd_line(int *argc, char **argv)
 
       xbt_cfg_set_parse(_sg_cfg_set, opt);
       XBT_DEBUG("Did apply '%s' as config setting", opt);
+    } else if (!strcmp(argv[i], "--version")) {
+      printf("%s\n", SIMGRID_VERSION_STRING);
+      shall_exit = 1;
     } else if (!strcmp(argv[i], "--cfg-help") || !strcmp(argv[i], "--help")) {
       printf
           ("Description of the configuration accepted by this simulator:\n");
@@ -71,6 +74,8 @@ static void sg_config_cmd_line(int *argc, char **argv)
 #endif
 "\n"
 "You can also use --help-logs and --help-log-categories to see the details of logging output.\n"
+"\n"
+"You can also use --version to get SimGrid version information.\n"
 "\n"
         );
       shall_exit = 1;