Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
make the propaganda useful (and thus desirable) to the users
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 12 Jan 2017 12:25:04 +0000 (13:25 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 14 Jan 2017 00:54:16 +0000 (01:54 +0100)
CMakeLists.txt
include/simgrid_config.h.in
src/surf/surf_interface.cpp

index e41ea66..62b507d 100644 (file)
@@ -660,6 +660,8 @@ if(EXISTS ${CMAKE_HOME_DIRECTORY}/.git/)
   endif()
 elseif(EXISTS ${CMAKE_HOME_DIRECTORY}/.gitversion)
   FILE(STRINGS ${CMAKE_HOME_DIRECTORY}/.gitversion GIT_VERSION)
+else()
+  set(GIT_VERSION "none, release version")
 endif()
 
 ### Generate the required headers and scripts
index b9726b9..0d0cd0d 100644 (file)
@@ -14,6 +14,8 @@
 #define SIMGRID_VERSION_MAJOR @SIMGRID_VERSION_MAJOR@
 #define SIMGRID_VERSION_MINOR @SIMGRID_VERSION_MINOR@
 #define SIMGRID_VERSION_PATCH @SIMGRID_VERSION_PATCH@
+#define SIMGRID_GIT_VERSION   "@GIT_VERSION@"
+#define SIMGRID_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
 
 SG_BEGIN_DECL()
 /** Retrieves the version numbers of the used dynamic library (so, DLL or dynlib), while
index 7c3d2d5..45ccea0 100644 (file)
@@ -284,7 +284,8 @@ void sg_version_get(int* ver_major, int* ver_minor, int* ver_patch)
 
 void sg_version()
 {
-  std::printf("This program was linked against %s\n", SIMGRID_VERSION_STRING);
+  std::printf("This program was linked against %s (git: %s), found in %s.\n",
+              SIMGRID_VERSION_STRING, SIMGRID_GIT_VERSION, SIMGRID_INSTALL_PREFIX);
 
 #if HAVE_MC
   std::printf("   Model-checking support compiled in.\n");