]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add version information for mumps, tbb and umfpack
authorMatthias Maier <tamiko@kyomu.43-1.org>
Sat, 12 Oct 2013 18:41:21 +0000 (18:41 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Sat, 12 Oct 2013 18:41:21 +0000 (18:41 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@31209 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/modules/FindMUMPS.cmake
deal.II/cmake/modules/FindTBB.cmake
deal.II/cmake/modules/FindUMFPACK.cmake
deal.II/cmake/setup_finalize.cmake
deal.II/doc/users/Config.sample

index 24e48975de730fd6087634f502926b43b50a9620..6099238908291c6b1d24ffb5e3e721f47c0cd521 100644 (file)
 #   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
index 4c45373cecd89e6ca8cbdf1d68347cee717b73fb..82f407417ea6b0e7eacca8e1adad20b9cd5815f3 100644 (file)
 #   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
index 746fdf0143ad06fa714bd52c4959a4d3a556b19a..8f5ed61440fbdcfd74a41997bbc0fbc0d436c9a3 100644 (file)
 #   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
index ed18ccc6b683ea110833d0720aef98e9745684f1..8dd205b3b655c4b0368f4a53c944a990657d25a1 100644 (file)
@@ -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)$" )
index 4567c63a99898b9e53d27f1ab47b078c67ced646..4bcbbcbe205efb49232996a23f2092b0059ace44 100644 (file)
 # 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 "")
 #
 
 
 # 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 "")
 #
 
 # 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 "")
 #
 
 # 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 "")
 #
 
 
 # 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 "")
 # 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 "")
 #
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.