From: turcksin Date: Fri, 13 Dec 2013 21:33:31 +0000 (+0000) Subject: Read version number for Paralution. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2143101ba2cbbda3972c9752183a9fcaffd5b03f;p=dealii-svn.git Read version number for Paralution. git-svn-id: https://svn.dealii.org/branches/branch_paralution@31996 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/modules/FindPARALUTION.cmake b/deal.II/cmake/modules/FindPARALUTION.cmake index c650ab9868..7a1a5fb0ec 100644 --- a/deal.II/cmake/modules/FindPARALUTION.cmake +++ b/deal.II/cmake/modules/FindPARALUTION.cmake @@ -21,6 +21,9 @@ # # PARALUTION_INCLUDE_DIRS # PARALUTION_LIBRARIES +# PARALUTION_VERSION +# PARALUTION_VERSION_MAJOR +# PARALUTION_VERSION_MINOR # SET_IF_EMPTY(PARALUTION_DIR "$ENV{PARALUTION_DIR}") @@ -61,6 +64,27 @@ IF(PARALUTION_FOUND) SET(PARALUTION_LIBRARIES ${PARALUTION_LIBRARY} ) + FILE(STRINGS "${PARALUTION_INCLUDE_DIR}/base/version.hpp" PARALUTION_VERSION_MAJOR_STRING + REGEX "#define.*PARALUTION_VER_MAJOR") + STRING(REGEX REPLACE "^.*PARALUTION_VER_MAJOR ([0-9]+).*" "\\1" + PARALUTION_VERSION_MAJOR "${PARALUTION_VERSION_MAJOR_STRING}" + ) + + FILE(STRINGS "${PARALUTION_INCLUDE_DIR}/base/version.hpp" PARALUTION_VERSION_MINOR_STRING + REGEX "#define.*PARALUTION_VER_MINOR") + STRING(REGEX REPLACE "^.*PARALUTION_VER_MINOR ([0-9]+).*" "\\1" + PARALUTION_VERSION_MINOR "${PARALUTION_VERSION_MINOR_STRING}" + ) + + FILE(STRINGS "${PARALUTION_INCLUDE_DIR}/base/version.hpp" PARALUTION_VERSION_REVISION_STRING + REGEX "#define.*PARALUTION_VER_REV") + STRING(REGEX REPLACE "^.*PARALUTION_VER_REV .([0-9]+).*" "\\1" + PARALUTION_VERSION_REVISION "${PARALUTION_VERSION_REVISION_STRING}" + ) + + SET(PARALUTION_VERSION + "${PARALUTION_VERSION_MAJOR}.${PARALUTION_VERSION_MINOR}.${PARALUTION_VERSION_REVISION}" + ) MARK_AS_ADVANCED(PARALUTION_DIR) ELSE()