From 05b43f9e459144d1a07eabea4258a77b7cd14c3c Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Thu, 23 Jul 2015 18:12:23 +0200 Subject: [PATCH 1/1] make the SIMGRID_VERSION_STRING easier to parse in subprojects --- CMakeLists.txt | 5 +++-- buildtools/Cmake/CompleteInFiles.cmake | 8 ++++---- include/simgrid_config.h.in | 2 ++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e7311c77d7..9f85a08141 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,8 +65,9 @@ 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) 2004-${SIMGRID_VERSION_DATE}. The Simgrid Team.") +set(SIMGRID_VERSION_STRING "SimGrid version ${release_version}${SIMGRID_VERSION_EXTRA}") +set(SIMGRID_VERSION_BANNER + "SIMGRID_VERSION_STRING\\nCopyright (c) 2004-${SIMGRID_VERSION_DATE}. The Simgrid Team.") set(libsimgrid_version "${release_version}") set(libsimgrid-java_version "${release_version}") diff --git a/buildtools/Cmake/CompleteInFiles.cmake b/buildtools/Cmake/CompleteInFiles.cmake index 3237badb8a..9a098a01ec 100644 --- a/buildtools/Cmake/CompleteInFiles.cmake +++ b/buildtools/Cmake/CompleteInFiles.cmake @@ -549,15 +549,15 @@ elseif(EXISTS ${CMAKE_HOME_DIRECTORY}/.gitversion) endif() if(release) - set(SIMGRID_VERSION_STRING "${SIMGRID_VERSION_STRING}\\nRelease build") + set(SIMGRID_VERSION_BANNER "${SIMGRID_VERSION_BANNER}\\nRelease build") else() - set(SIMGRID_VERSION_STRING "${SIMGRID_VERSION_STRING}\\nDevelopment build") + set(SIMGRID_VERSION_BANNER "${SIMGRID_VERSION_BANNER}\\nDevelopment build") endif() if(GIT_VERSION) - set(SIMGRID_VERSION_STRING "${SIMGRID_VERSION_STRING} at commit ${GIT_VERSION}") + set(SIMGRID_VERSION_BANNER "${SIMGRID_VERSION_BANNER} at commit ${GIT_VERSION}") endif() if(GIT_DATE) - set(SIMGRID_VERSION_STRING "${SIMGRID_VERSION_STRING} (${GIT_DATE})") + set(SIMGRID_VERSION_BANNER "${SIMGRID_VERSION_BANNER} (${GIT_DATE})") endif() #-------------------------------------------------------------------------------------------------- diff --git a/include/simgrid_config.h.in b/include/simgrid_config.h.in index 6a93f00b90..45d389d305 100644 --- a/include/simgrid_config.h.in +++ b/include/simgrid_config.h.in @@ -19,6 +19,8 @@ #define SIMGRID_VERSION_STRING "@SIMGRID_VERSION_STRING@" +#define SIMGRID_VERSION_BANNER "@SIMGRID_VERSION_BANNER@" + /* Version X.Y.Z will get version number XYZ: all digits concatenated without dots * (with Y and Z must be on two positions)*/ -- 2.20.1