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
#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
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");