From c7503545bfdba00e2b72d70502a95c6ca495f2ca Mon Sep 17 00:00:00 2001 From: Andreas Naumann <andreas.naumann@tu-dresden.de> Date: Sun, 1 May 2011 17:39:24 +0000 Subject: [PATCH] revision number as variable in trunk --- AMDiS/CMakeLists.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/AMDiS/CMakeLists.txt b/AMDiS/CMakeLists.txt index 3d6b168b..df04e933 100644 --- a/AMDiS/CMakeLists.txt +++ b/AMDiS/CMakeLists.txt @@ -392,17 +392,17 @@ list(REMOVE_DUPLICATES deb_add_dirs) #PACKAGES #let cmake look for the svn-version -find_package(Subversion) -if(Subversion_FOUND) - Subversion_WC_INFO(${AMDiS_SOURCE_DIR} mtlSubinfo) - set(CurrentRevision ${mtlSubinfo_WC_REVISION}) -# message("current revision: ${mtlSubinfo_WC_REVISION}") -else(Subversion_FOUND) - set(CurrentRevision "0") -endif(Subversion_FOUND) +if( NOT CurrentRevision ) + find_package(Subversion) + if(Subversion_FOUND) + Subversion_WC_INFO(${AMDiS_SOURCE_DIR} mtlSubinfo) + set(CurrentRevision "0.9.${mtlSubinfo_WC_REVISION}") + # message("current revision: ${mtlSubinfo_WC_REVISION}") + endif(Subversion_FOUND) +endif( NOT CurrentRevision ) set(CPACK_PACKAGE_NAME "AMDiS") set(CPACK_PACKAGE_CONTACT "Andreas.Naumann@tu-dresden.de") -set(CPACK_PACKAGE_VERSION "0.9.${CurrentRevision}") +set(CPACK_PACKAGE_VERSION "${CurrentRevision}") set(CPACK_GENERATOR "RPM" "DEB" "TGZ") set(CPACK_INSTALL_PREFIX "/usr/") -- GitLab