From: Matthias Maier Date: Sat, 12 Oct 2013 18:41:21 +0000 (+0000) Subject: Add version information for mumps, tbb and umfpack X-Git-Tag: v8.1.0~570^2~75 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3e0d52771a4fc3aaa16a150b7ae1f7efec44548;p=dealii.git Add version information for mumps, tbb and umfpack git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@31209 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/modules/FindMUMPS.cmake b/deal.II/cmake/modules/FindMUMPS.cmake index 24e48975de..6099238908 100644 --- a/deal.II/cmake/modules/FindMUMPS.cmake +++ b/deal.II/cmake/modules/FindMUMPS.cmake @@ -22,6 +22,10 @@ # MUMPS_INCLUDE_DIRS # MUMPS_LIBRARIES # MUMPS_LINKER_FLAGS +# MUMPS_VERSION +# MUMPS_VERSION_MAJOR +# MUMPS_VERSION_MINOR +# MUMPS_VERSION_SUBMINOR # SET_IF_EMPTY(MUMPS_DIR "$ENV{MUMPS_DIR}") @@ -72,6 +76,23 @@ IF(PORD_LIBRARY MATCHES "-NOTFOUND") UNSET(PORD_LIBRARY CACHE) ENDIF() +IF(EXISTS ${MUMPS_INCLUDE_DIR}/dmumps_c.h) + FILE(STRINGS "${MUMPS_INCLUDE_DIR}/dmumps_c.h" MUMPS_VERSION_STRING + REGEX "#define.*MUMPS_VERSION") + STRING(REGEX REPLACE "^.*MUMPS_VERSION.*\"(.+)\".*" "\\1" + MUMPS_VERSION "${MUMPS_VERSION_STRING}" + ) + STRING(REGEX REPLACE + "([0-9]+)\\..*" "\\1" MUMPS_VERSION_MAJOR "${MUMPS_VERSION}" + ) + STRING(REGEX REPLACE + "^[0-9]+\\.([0-9]+).*" "\\1" MUMPS_VERSION_MINOR "${MUMPS_VERSION}" + ) + STRING(REGEX REPLACE + "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" MUMPS_VERSION_SUBMINOR "${MUMPS_VERSION}" + ) +ENDIF() + SET(_output ${DMUMPS_LIBRARY} ${MUMPS_COMMON_LIBRARY} ${PORD_LIBRARY}) FIND_PACKAGE_HANDLE_STANDARD_ARGS(MUMPS DEFAULT_MSG _output # Cosmetic: Gives nice output diff --git a/deal.II/cmake/modules/FindTBB.cmake b/deal.II/cmake/modules/FindTBB.cmake index 4c45373cec..82f407417e 100644 --- a/deal.II/cmake/modules/FindTBB.cmake +++ b/deal.II/cmake/modules/FindTBB.cmake @@ -22,13 +22,16 @@ # TBB_LIBRARIES # TBB_INCLUDE_DIRS # TBB_WITH_DEBUGLIB +# TBB_VERSION +# TBB_VERSION_MAJOR +# TBB_VERSION_MINOR # INCLUDE(FindPackageHandleStandardArgs) SET_IF_EMPTY(TBB_DIR "$ENV{TBB_DIR}") -FIND_PATH(TBB_INCLUDE_DIR tbb/parallel_reduce.h +FIND_PATH(TBB_INCLUDE_DIR tbb/tbb_stddef.h HINTS ${TBB_DIR} PATH_SUFFIXES include include/tbb tbb @@ -59,6 +62,24 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(TBB DEFAULT_MSG TBB_INCLUDE_DIR ) +IF(NOT TBB_INCLUDE_DIR MATCHES "-NOTFOUND") + FILE(STRINGS "${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h" TBB_VERSION_MAJOR_STRING + REGEX "#define.*TBB_VERSION_MAJOR") + STRING(REGEX REPLACE "^.*TBB_VERSION_MAJOR.*([0-9]+).*" "\\1" + TBB_VERSION_MAJOR "${TBB_VERSION_MAJOR_STRING}" + ) + + FILE(STRINGS "${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h" TBB_VERSION_MINOR_STRING + REGEX "#define.*TBB_VERSION_MINOR") + STRING(REGEX REPLACE "^.*TBB_VERSION_MINOR.*([0-9]+).*" "\\1" + TBB_VERSION_MINOR "${TBB_VERSION_MINOR_STRING}" + ) + + SET(TBB_VERSION + "${TBB_VERSION_MAJOR}.${TBB_VERSION_MINOR}" + ) +ENDIF() + MARK_AS_ADVANCED( TBB_LIBRARY TBB_DEBUG_LIBRARY diff --git a/deal.II/cmake/modules/FindUMFPACK.cmake b/deal.II/cmake/modules/FindUMFPACK.cmake index 746fdf0143..8f5ed61440 100644 --- a/deal.II/cmake/modules/FindUMFPACK.cmake +++ b/deal.II/cmake/modules/FindUMFPACK.cmake @@ -22,6 +22,10 @@ # UMFPACK_LIBRARIES # UMFPACK_INCLUDE_DIRS # UMFPACK_LINKER_FLAGS +# UMFPACK_VERSION +# UMFPACK_VERSION_MAJOR +# UMFPACK_VERSION_MINOR +# UMFPACK_VERSION_SUBMINOR # INCLUDE(FindPackageHandleStandardArgs) @@ -110,6 +114,27 @@ FIND_UMFPACK_LIBRARY(CCOLAMD ccolamd) FIND_UMFPACK_LIBRARY(CAMD camd) FIND_UMFPACK_LIBRARY(SuiteSparse_config suitesparseconfig) +IF(EXISTS ${UMFPACK_INCLUDE_DIR}/umfpack.h) + FILE(STRINGS "${UMFPACK_INCLUDE_DIR}/umfpack.h" UMFPACK_VERSION_MAJOR_STRING + REGEX "#define.*UMFPACK_MAIN_VERSION") + STRING(REGEX REPLACE "^.*UMFPACK_MAIN_VERSION.*([0-9]+).*" "\\1" + UMFPACK_VERSION_MAJOR "${UMFPACK_VERSION_MAJOR_STRING}" + ) + FILE(STRINGS "${UMFPACK_INCLUDE_DIR}/umfpack.h" UMFPACK_VERSION_MINOR_STRING + REGEX "#define.*UMFPACK_SUB_VERSION") + STRING(REGEX REPLACE "^.*UMFPACK_SUB_VERSION.*([0-9]+).*" "\\1" + UMFPACK_VERSION_MINOR "${UMFPACK_VERSION_MINOR_STRING}" + ) + FILE(STRINGS "${UMFPACK_INCLUDE_DIR}/umfpack.h" UMFPACK_VERSION_SUBMINOR_STRING + REGEX "#define.*UMFPACK_SUBSUB_VERSION") + STRING(REGEX REPLACE "^.*UMFPACK_SUBSUB_VERSION.*([0-9]+).*" "\\1" + UMFPACK_VERSION_SUBMINOR "${UMFPACK_VERSION_SUBMINOR_STRING}" + ) + SET(UMFPACK_VERSION + "${UMFPACK_VERSION_MAJOR}.${UMFPACK_VERSION_MINOR}.${UMFPACK_VERSION_SUBMINOR}" + ) +ENDIF() + SET(_output ${UMFPACK_LIBRARY} ${CHOLMOD_LIBRARY} ${CCOLAMD_LIBRARY} ${COLAMD_LIBRARY} ${CAMD_LIBRARY} ${AMD_LIBRARY} ${SuiteSparse_config_LIBRARY}) FIND_PACKAGE_HANDLE_STANDARD_ARGS(UMFPACK DEFAULT_MSG _output # Cosmetic: Gives nice output diff --git a/deal.II/cmake/setup_finalize.cmake b/deal.II/cmake/setup_finalize.cmake index ed18ccc6b6..8dd205b3b6 100644 --- a/deal.II/cmake/setup_finalize.cmake +++ b/deal.II/cmake/setup_finalize.cmake @@ -204,6 +204,8 @@ FOREACH(_var ${_features}) # IF(DEFINED ${_feature}_VERSION) _detailed("# ${_feature}_VERSION = ${${_feature}_VERSION}\n") + ELSEIF(_feature MATCHES "THREADS" AND DEFINED TBB_VERSION) + _detailed("# TBB_VERSION = ${TBB_VERSION}\n") ENDIF() # @@ -220,9 +222,9 @@ FOREACH(_var ${_features}) IF( # MPI: _var2 MATCHES "^${_feature}_CXX_(COMPILER|COMPILE_FLAGS|LINK_FLAGS|LIBRARIES|INCLUDE_PATH)$" OR # Boost: - ( _feature MATCHES "BOOST" AND _var2 MATCHES "^Boost(_LIBRARIES|_INCLUDE_DIRS)$" ) OR + ( _feature MATCHES "BOOST" AND _var2 MATCHES "^Boost_(LIBRARIES|INCLUDE_DIRS)$" ) OR # TBB: - ( _feature MATCHES "THREADS" AND _var2 MATCHES "^TBB(_LIBRARIES|_INCLUDE_DIRS)$" ) OR + ( _feature MATCHES "THREADS" AND _var2 MATCHES "^TBB_(LIBRARIES|INCLUDE_DIRS)$" ) OR # Generic: ( (NOT _var2 MATCHES "^(MPI|Boost)") AND _var2 MATCHES "^${_feature}_(INCLUDE_DIRS|LIBRARIES|LINKER_FLAGS)$" ) diff --git a/deal.II/doc/users/Config.sample b/deal.II/doc/users/Config.sample index 4567c63a99..4bcbbcbe20 100644 --- a/deal.II/doc/users/Config.sample +++ b/deal.II/doc/users/Config.sample @@ -362,6 +362,10 @@ # SET(MUMPS_LIBRARIES "library;and;semicolon;separated;list;of;link;interface" CACHE STRING "") # SET(MUMPS_INCLUDE_DIRS "semicolon;separated;list;of;include;dirs" CACHE STRING "") # SET(MUMPS_LINKER_FLAGS "..." CACHE STRING "") +# SET(MUMPS_VERSION "x.y.z" CACHE STRING "") +# SET(MUMPS_VERSION_MAJOR "x" CACHE STRING "") +# SET(MUMPS_VERSION_MINOR "y" CACHE STRING "") +# SET(MUMPS_VERSION_SUBMINOR "z" CACHE STRING "") # @@ -430,11 +434,11 @@ # SET(PETSC_FOUND TRUE CACHE BOOL "") # SET(PETSC_LIBRARIES "library;and;semicolon;separated;list;of;link;interface" CACHE STRING "") # SET(PETSC_INCLUDE_DIRS "semicolon;separated;list;of;include;dirs" CACHE STRING "") -# SET(PETSC_VERSION "x.y.z." CACHE STRING "") +# SET(PETSC_VERSION "x.y.z.p" CACHE STRING "") # SET(PETSC_VERSION_MAJOR "x" CACHE STRING "") # SET(PETSC_VERSION_MINOR "y" CACHE STRING "") # SET(PETSC_VERSION_SUBMINOR "z" CACHE STRING "") -# SET(PETSC_VERSION_PATCH "" CACHE STRING "") +# SET(PETSC_VERSION_PATCH "p" CACHE STRING "") # SET(PETSC_WITH_MPI_UNI FALSE CACHE BOOL "") # @@ -456,11 +460,11 @@ # SET(SLEPC_FOUND TRUE CACHE BOOL "") # SET(SLEPC_LIBRARIES "library;and;semicolon;separated;list;of;link;interface" CACHE STRING "") # SET(SLEPC_INCLUDE_DIRS "semicolon;separated;list;of;include;dirs" CACHE STRING "") -# SET(SLEPC_VERSION "x.y.z." CACHE STRING "") +# SET(SLEPC_VERSION "x.y.z.p" CACHE STRING "") # SET(SLEPC_VERSION_MAJOR "x" CACHE STRING "") # SET(SLEPC_VERSION_MINOR "y" CACHE STRING "") # SET(SLEPC_VERSION_SUBMINOR "z" CACHE STRING "") -# SET(SLEPC_VERSION_PATCH "" CACHE STRING "") +# SET(SLEPC_VERSION_PATCH "p" CACHE STRING "") # SET(SLEPC_WITH_MPI_UNI FALSE CACHE BOOL "") # @@ -487,6 +491,9 @@ # SET(TBB_LIBRARIES "library;and;semicolon;separated;list;of;link;interface" CACHE STRING "") # SET(TBB_INCLUDE_DIRS "semicolon;separated;list;of;include;dirs" CACHE STRING "") # SET(TBB_WITH_DEBUGLIB TRUE CACHE BOOL "") +# SET(TBB_VERSION "x.y" CACHE STRING "") +# SET(TBB_VERSION_MAJOR "x" CACHE STRING "") +# SET(TBB_VERSION_MINOR "y" CACHE STRING "") # @@ -507,6 +514,7 @@ # SET(TRILINOS_FOUND TRUE CACHE BOOL "") # SET(TRILINOS_LIBRARIES "library;and;semicolon;separated;list;of;link;interface" CACHE STRING "") # SET(TRILINOS_INCLUDE_DIRS "semicolon;separated;list;of;include;dirs" CACHE STRING "") +# SET(TRILINOS_VERSION "x.y.z" CACHE STRING "") # SET(TRILINOS_VERSION_MAJOR "x" CACHE STRING "") # SET(TRILINOS_VERSION_MINOR "y" CACHE STRING "") # SET(TRILINOS_VERSION_SUBMINOR "z" CACHE STRING "") @@ -537,6 +545,10 @@ # SET(UMFPACK_LIBRARIES "library;and;semicolon;separated;list;of;link;interface" CACHE STRING "") # SET(UMFPACK_INCLUDE_DIRS "semicolon;separated;list;of;include;dirs" CACHE STRING "") # SET(UMFPACK_LINKER_FLAGS "..." CACHE STRING "") +# SET(UMFPACK_VERSION "x.y.z" CACHE STRING "") +# SET(UMFPACK_VERSION_MAJOR "x" CACHE STRING "") +# SET(UMFPACK_VERSION_MINOR "y" CACHE STRING "") +# SET(UMFPACK_VERSION_SUBMINOR "z" CACHE STRING "") #