# 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)
# 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>
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:
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}
)
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)
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(
#
# Try to find the AMD library
#
+# This module exports
+#
+# AMD_LIBRARY
+# AMD_INCLUDE_DIR
+#
INCLUDE(FindPackageHandleStandardArgs)
# This module exports
#
# ARPACK_LIBRARIES
-#
# ARPACK_LINKER_FLAGS
#
)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ARPACK DEFAULT_MSG
- ARPACK_LIBRARY
- LAPACK_LIBRARIES
+ ARPACK_LIBRARIES
+ ARPACK_LINKER_FLAGS
)
IF(ARPACK_FOUND)
#
# 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}
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