]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Update UMFPACK as well. Prettify the rest
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 28 Sep 2012 12:15:40 +0000 (12:15 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 28 Sep 2012 12:15:40 +0000 (12:15 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@26828 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/configure/configure_1_lapack.cmake [moved from deal.II/cmake/configure/configure_lapack.cmake with 100% similarity]
deal.II/cmake/configure/configure_arpack.cmake
deal.II/cmake/configure/configure_trilinos.cmake
deal.II/cmake/configure/configure_umfpack.cmake
deal.II/cmake/modules/FindAMD.cmake
deal.II/cmake/modules/FindARPACK.cmake
deal.II/cmake/modules/FindUMFPACK.cmake

index 31b7dbd4124f50c16e947e2546a09a226e26045b..880e18be723d84b90e2f355ab68ca7a383231935 100644 (file)
@@ -2,6 +2,12 @@
 # Configuration for the ARPACK library:
 #
 
+SET(FEATURE_ARPACK_DEPENDS
+  # Currently, with enabled arpack support, we also need to setup
+  # LAPACK support in deal.II:
+  DEAL_II_WITH_LAPACK
+  )
+
 MACRO(FEATURE_ARPACK_FIND_EXTERNAL var)
   FIND_PACKAGE(ARPACK)
 
index 51c9f3228b2d97c5c2afe80800d7114687e06ba6..31d8576c59bf34f1e36688c21883250118ee5c4c 100644 (file)
@@ -102,8 +102,9 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
     # with the -std=c++0x flag of GCC, see deal.II FAQ.
     # Test whether that is indeed the case
     #
-    LIST(APPEND CMAKE_REQUIRED_INCLUDES ${TRILINOS_INCLUDE_DIRS})
+    SET(CMAKE_REQUIRED_INCLUDES ${TRILINOS_INCLUDE_DIRS})
     PUSH_TEST_FLAG("${DEAL_II_CXX11_FLAG}")
+
     CHECK_CXX_SOURCE_COMPILES(
       "
       #include <Sacado_cmath.hpp>
@@ -135,8 +136,9 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
         SET(${var} FALSE)
       ENDIF()
     ENDIF()
+
     POP_TEST_FLAG()
-    LIST(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES ${TRILINOS_INCLUDE_DIRS})
+    SET(CMAKE_REQUIRED_INCLUDES)
 
     #
     # Remove the following variables from the cache to force a recheck:
@@ -156,7 +158,10 @@ MACRO(FEATURE_TRILINOS_CONFIGURE_EXTERNAL var)
 
 
   LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES
+    # The Trilinos libraries:
     ${TRILINOS_LIBRARIES}
+    # All external libraries necessary for the Trilinos libraries. Nice and
+    # easy :-)
     ${Trilinos_TPL_LIBRARIES}
     )
 
index 6eecc3f3d5627b671aa5613983579b4b2ced3546..3322c3edcaecd679eb47b12b87eac905b99b6d87 100644 (file)
@@ -4,29 +4,26 @@
 
 
 SET(FEATURE_UMFPACK_DEPENDS
-  #
-  # Currently, with enabled umfpack support, we also need LAPACK...
-  #
+  # Currently, with enabled umfpack support, we also need to setup
+  # LAPACK support in deal.II:
   DEAL_II_WITH_LAPACK
   )
 
 
 MACRO(FEATURE_UMFPACK_FIND_EXTERNAL var)
   FIND_PACKAGE(UMFPACK)
-  FIND_PACKAGE(AMD)
 
-  IF(UMFPACK_FOUND AND AMD_FOUND)
+  IF(UMFPACK_FOUND)
     SET(${var} TRUE)
   ENDIF()
 ENDMACRO()
 
 
 MACRO(FEATURE_UMFPACK_CONFIGURE_EXTERNAL var)
-  INCLUDE_DIRECTORIES(${UMFPACK_INCLUDE_DIR} ${AMD_INCLUDE_DIR})
 
-  LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES
-    ${UMFPACK_LIBRARY} ${AMD_LIBRARY}
-    )
+  INCLUDE_DIRECTORIES(${UMFPACK_INCLUDE_DIRS})
+  LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${UMFPACK_LIBRARIES})
+  ADD_FLAGS(CMAKE_SHARED_LINKER_FLAGS "${UMFPACK_LINKER_FLAGS}")
 
   SET(HAVE_LIBUMFPACK TRUE)
 
@@ -39,9 +36,13 @@ SET(FEATURE_UMFPACK_HAVE_CONTRIB TRUE)
 
 MACRO(FEATURE_UMFPACK_CONFIGURE_CONTRIB var)
   #
-  # Add umfpack and amd directly to the object files of deal.II
+  # DEAL_II_WITH_LAPACK will pull in an external BLAS library. So no need
+  # to setup something more than contrib BLAS here.
   #
 
+  #
+  # Add umfpack and amd directly to the object files of deal.II
+  #
   SET(umfpack_folder "${CMAKE_SOURCE_DIR}/contrib/umfpack")
 
   INCLUDE_DIRECTORIES(
index 8fccdfdc10b8d604f9f8dbc1dd60d963ab2d9f59..6f1c550bd90b4bf5fc0a6de0d5d404fa18e7ed6a 100644 (file)
@@ -1,6 +1,11 @@
 #
 # Try to find the AMD library
 #
+# This module exports
+#
+#   AMD_LIBRARY
+#   AMD_INCLUDE_DIR
+#
 
 INCLUDE(FindPackageHandleStandardArgs)
 
index a06eb965d1e457b36e1e595e2303f59b2bb14836..b200e4576bb3671e2fd29adebb2da9786888db2d 100644 (file)
@@ -4,7 +4,6 @@
 # This module exports
 #
 #   ARPACK_LIBRARIES
-#
 #   ARPACK_LINKER_FLAGS
 #
 
@@ -31,8 +30,8 @@ SET(ARPACK_LINKER_FLAGS
   )
 
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(ARPACK DEFAULT_MSG
-  ARPACK_LIBRARY
-  LAPACK_LIBRARIES
+  ARPACK_LIBRARIES
+  ARPACK_LINKER_FLAGS
   )
 
 IF(ARPACK_FOUND)
index eacab946d2b70a2fbe108523343ba486bd2e1d18..db730353399466102d6d5a0759e4dc7598808276 100644 (file)
@@ -1,12 +1,24 @@
 #
 # Try to find the UMFPACK library
 #
+# This module exports
+#
+#   UMFPACK_LIBRARIES
+#   UMFPACK_INCLUDE_DIRS
+#   UMFPACK_LINKER_FLAGS
+#
 
 INCLUDE(FindPackageHandleStandardArgs)
 
 SET_IF_EMPTY(AMD_DIR "$ENV{AMD_DIR}")
 SET_IF_EMPTY(UMFPACK_DIR "$ENV{UMFPACK_DIR}")
 
+#
+# UMFPACK depends on AMD and BLAS, so search for them:
+#
+FIND_PACKAGE(AMD)
+FIND_PACKAGE(BLAS)
+
 FIND_PATH(UMFPACK_INCLUDE_DIR umfpack.h
   HINTS
     ${AMD_DIR}
@@ -23,13 +35,37 @@ FIND_LIBRARY(UMFPACK_LIBRARY
     lib${LIB_SUFFIX} lib64 lib Lib UMFPACK/Lib ../UMFPACK/Lib
 )
 
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(UMFPACK DEFAULT_MSG UMFPACK_LIBRARY UMFPACK_INCLUDE_DIR)
+SET(UMFPACK_LIBRARIES
+  UMFPACK_LIBRARY
+  AMD_LIBRARY
+  BLAS_LIBRARIES
+  )
+
+SET(UMFPACK_INCLUDE_DIRS
+  ${UMFPACK_INCLUDE_DIR}
+  ${AMD_INCLUDE_DIR}
+  )
+
+SET(UMFPACK_LINKER_FLAGS
+  ${BLAS_LINKER_FLAGS}
+  )
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(UMFPACK DEFAULT_MSG
+  UMFPACK_LIBRARIES
+  UMFPACK_INCLUDE_DIRS
+  UMFPACK_LINKER_FLAGS
+  )
 
 IF(UMFPACK_FOUND)
   MARK_AS_ADVANCED(
     UMFPACK_LIBRARY
     UMFPACK_INCLUDE_DIR
     UMFPACK_DIR
+    AMD_LIBRARY
+    AMD_INCLUDE_DIR
+    lapack_LIBRARY
+    atlas_LIBRARY
+    blas_LIBRARY
   )
 ELSE()
   SET(UMFPACK_DIR "" 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.