--- /dev/null
+## ---------------------------------------------------------------------
+## $Id$
+##
+## Copyright (C) 2014 by the deal.II authors
+##
+## This file is part of the deal.II library.
+##
+## The deal.II library is free software; you can use it, redistribute
+## it, and/or modify it under the terms of the GNU Lesser General
+## Public License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+## The full text of the license can be found in the file LICENSE at
+## the top level of the deal.II distribution.
+##
+## ---------------------------------------------------------------------
+
+#
+# DEAL_II_PACKAGE_HANDLE
+#
+# TODO: Documentation
+#
+
+MACRO(DEAL_II_PACKAGE_HANDLE _feature _var)
+
+ IF(DEFINED ${_feature}_VERSION)
+ MESSAGE(STATUS " ${_feature}_VERSION: ${${_feature}_VERSION}")
+ ENDIF()
+
+ SET(${_feature}_FOUND TRUE)
+
+ SET(_variable ${_var})
+ SET(_cleanup ${_var})
+ SET(${_feature}_${_variable} "")
+ SET(_required TRUE)
+ SET(_fine TRUE)
+
+ FOREACH(_arg ${ARGN})
+ IF(_arg MATCHES "^LIBRARIES(|_DEBUG|_RELEASE)$"
+ OR _arg MATCHES "^(|BUNDLED_|USER_)INCLUDE_DIRS$"
+ OR _arg MATCHES "^(|USER_)DEFINITIONS(|_DEBUG|_RELEASE)$"
+ OR _arg MATCHES "^CXX_FLAGS(|_DEBUG|_RELEASE)"
+ OR _arg MATCHES "^LINKER_FLAGS(|_DEBUG|_RELEASE)")
+
+ IF(_fine)
+ IF(_variable MATCHES "^CXX_FLAGS(|_DEBUG|_RELEASE)"
+ OR _variable MATCHES "^LINKER_FLAGS(|_DEBUG|_RELEASE)")
+ TO_STRING(${_feature}_${_variable} ${${_feature}_${_variable}})
+ ENDIF()
+ MESSAGE(STATUS " ${_feature}_${_variable}: ${${_feature}_${_variable}}")
+ ENDIF()
+
+ #
+ # *Yay* a new keyword.
+ #
+ SET(_variable ${_arg})
+ LIST(APPEND _cleanup ${_var})
+ SET(${_feature}_${_variable} "")
+ SET(_required TRUE)
+ SET(_fine TRUE)
+
+ ELSEIF("${_arg}" STREQUAL "REQUIRED")
+ SET(_required TRUE)
+ ELSEIF("${_arg}" STREQUAL "OPTIONAL")
+ SET(_required FALSE)
+ ELSEIF( _arg MATCHES "^(optimized|debug|general)$"
+ AND "${_variable}" STREQUAL "LIBRARIES")
+ #
+ # Keywords are special...
+ #
+ LIST(APPEND ${_feature}_${_variable} ${_arg})
+ ELSE()
+ MARK_AS_ADVANCED(${_arg})
+ IF(NOT DEFINED ${_arg} OR ${_arg} MATCHES "-NOTFOUND")
+ IF(_required AND _fine)
+ IF(NOT DEFINED ${_arg})
+ MESSAGE(STATUS
+ " ${_feature}_${_variable}: *** Required variable \"${_arg}\" undefined ***"
+ )
+ ELSE()
+ MESSAGE(STATUS
+ " ${_feature}_${_variable}: *** Required variable \"${_arg}\" set to NOTFOUND ***"
+ )
+ ENDIF()
+ SET(${_feature}_FOUND FALSE)
+ SET(_fine FALSE)
+ ENDIF()
+ ELSE()
+ LIST(APPEND ${_feature}_${_variable} ${${_arg}})
+ ENDIF()
+ ENDIF()
+ ENDFOREACH()
+
+ IF(_fine)
+ IF(_variable MATCHES "^CXX_FLAGS(|_DEBUG|_RELEASE)"
+ OR _variable MATCHES "^LINKER_FLAGS(|_DEBUG|_RELEASE)")
+ TO_STRING(${_feature}_${_variable} ${${_feature}_${_variable}})
+ ENDIF()
+ MESSAGE(STATUS " ${_feature}_${_variable}: ${${_feature}_${_variable}}")
+ ENDIF()
+
+ IF(${_feature}_FOUND)
+ #
+ # Deduplicate entries in *_INCLUDE_DIRS and *_LIBRARIES
+ #
+ FOREACH(_suffix INCLUDE_DIRS USER_INCLUDE_DIRS BUNDLED_INCLUDE_DIRS)
+ REMOVE_DUPLICATES(${_feature}_${_suffix})
+ ENDFOREACH()
+ FOREACH(_suffix
+ LIBRARIES LIBRARIES_RELEASE LIBRARIES_DEBUG
+ USER_DEFINITIONS USER_DEFINITIONS_DEBUG USER_DEFINITIONS_RELEASE
+ DEFINITIONS DEFINITIONS_DEBUG DEFINITIONS_RELEASE
+ )
+ REMOVE_DUPLICATES(${_feature}_${_suffix} REVERSE)
+ ENDFOREACH()
+
+ MESSAGE(STATUS "Found ${_feature}")
+ MARK_AS_ADVANCED(${_feature}_DIR)
+
+ ELSE()
+
+ FOREACH(_v _cleanup)
+ SET(${_feature}_${_v})
+ ENDFOREACH()
+ MESSAGE(STATUS "Could NOT find ${_feature}")
+ ENDIF()
+ENDMACRO()
# TODO: ARPACK and mpi...
#
-INCLUDE(FindPackageHandleStandardArgs)
-
SET(ARPACK_DIR "" CACHE PATH "An optional hint to an ARPACK installation")
SET_IF_EMPTY(ARPACK_DIR "$ENV{ARPACK_DIR}")
FIND_LIBRARY(ARPACK_LIBRARY
NAMES arpack
- HINTS
- ${ARPACK_DIR}
+ HINTS ${ARPACK_DIR}
PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(ARPACK DEFAULT_MSG
- ARPACK_LIBRARY
- LAPACK_FOUND
- )
-
-MARK_AS_ADVANCED(
- lapack_LIBRARY
- atlas_LIBRARY
- blas_LIBRARY
- ARPACK_LIBRARY
+DEAL_II_PACKAGE_HANDLE(ARPACK
+ LIBRARIES REQUIRED ARPACK_LIBRARY LAPACK_LIBRARIES
+ LINKER_FLAGS OPTIONAL LAPACK_LINKER_FLAGS
)
-
-IF(ARPACK_FOUND)
- SET(ARPACK_LIBRARIES ${ARPACK_LIBRARY} ${LAPACK_LIBRARIES})
- SET(ARPACK_LINKER_FLAGS ${LAPACK_LINKER_FLAGS})
-
- MARK_AS_ADVANCED(ARPACK_DIR)
-ENDIF()
-
ENDIF()
LIST(REMOVE_ITEM LAPACK_LIBRARIES "FALSE")
- MARK_AS_ADVANCED( BLAS_DIR LAPACK_DIR)
+ MARK_AS_ADVANCED(BLAS_DIR LAPACK_DIR)
ELSE()
SET(DEALII_LAPACK_FOUND FALSE)
# HDF5_WITH_MPI
#
-INCLUDE(FindPackageHandleStandardArgs)
-
SET(HDF5_DIR "" CACHE PATH "An optional hint to an hdf5 directory")
SET_IF_EMPTY(HDF5_DIR "$ENV{HDF5_DIR}")
FIND_PATH(HDF5_INCLUDE_DIR hdf5.h
- HINTS
- ${HDF5_DIR}
- PATH_SUFFIXES
- hdf5 hdf5/include include/hdf5 include
+ HINTS ${HDF5_DIR}
+ PATH_SUFFIXES hdf5 hdf5/include include/hdf5 include
)
FIND_LIBRARY(HDF5_LIBRARY NAMES hdf5
- HINTS
- ${HDF5_DIR}
- PATH_SUFFIXES
- hdf5/lib lib${LIB_SUFFIX} lib64 lib
+ HINTS ${HDF5_DIR}
+ PATH_SUFFIXES hdf5/lib lib${LIB_SUFFIX} lib64 lib
)
FIND_LIBRARY(HDF5_HL_LIBRARY NAMES hdf5_hl
- HINTS
- ${HDF5_DIR}
- PATH_SUFFIXES
- lib${LIB_SUFFIX} lib64 lib
+ HINTS ${HDF5_DIR}
+ PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
)
FIND_FILE(HDF5_PUBCONF NAMES H5pubconf.h H5pubconf-64.h
- HINTS
- ${HDF5_INCLUDE_DIR}
- ${HDF5_DIR}
- PATH_SUFFIXES
- hdf5 hdf5/include include/hdf5 include
- )
-
-SET(_output ${HDF5_HL_LIBRARY} ${HDF5_LIBRARY})
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(HDF5 DEFAULT_MSG
- _output # Cosmetic: Gives nice output
- HDF5_HL_LIBRARY
- HDF5_LIBRARY
- HDF5_INCLUDE_DIR
- HDF5_PUBCONF
- )
-
-MARK_AS_ADVANCED(
- HDF5_LIBRARY
- HDF5_HL_LIBRARY
- HDF5_INCLUDE_DIR
- HDF5_PUBCONF
+ HINTS ${HDF5_INCLUDE_DIR} ${HDF5_DIR}
+ PATH_SUFFIXES hdf5 hdf5/include include/hdf5 include
)
+MARK_AS_ADVANCED(HDF5_PUBCONF)
-IF(HDF5_FOUND)
- SET(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR})
- SET(HDF5_LIBRARIES ${HDF5_HL_LIBRARY} ${HDF5_LIBRARY} ${MPI_C_LIBRARIES})
-
+IF(EXISTS ${HDF5_PUBCONF})
#
# Is hdf5 compiled with support for mpi?
#
ELSE()
SET(HDF5_WITH_MPI TRUE)
ENDIF()
-
- MARK_AS_ADVANCED(HDF5_DIR)
ENDIF()
+DEAL_II_PACKAGE_HANDLE(HDF5
+ LIBRARIES
+ REQUIRED HDF5_HL_LIBRARY HDF5_LIBRARY
+ OPTIONAL MPI_C_LIBRARIES
+ INCLUDE_DIRS
+ REQUIRED HDF5_INCLUDE_DIR
+ )
# METIS_VERSION_SUBMINOR
#
-INCLUDE(FindPackageHandleStandardArgs)
-
SET(METIS_DIR "" CACHE PATH "An optional hint to a metis directory")
SET_IF_EMPTY(METIS_DIR "$ENV{METIS_DIR}")
FIND_LIBRARY(METIS_LIBRARY
NAMES metis
- HINTS
- ${METIS_DIR}
+ HINTS ${METIS_DIR}
PATH_SUFFIXES
lib${LIB_SUFFIX} lib64 lib
# This is a hint, isn't it?
)
FIND_PATH(METIS_INCLUDE_DIR metis.h
- HINTS
- ${METIS_DIR}
- PATH_SUFFIXES
- metis include/metis include
+ HINTS ${METIS_DIR}
+ PATH_SUFFIXES metis include/metis include
)
IF(EXISTS ${METIS_INCLUDE_DIR}/metis.h)
)
ENDIF()
-
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(METIS DEFAULT_MSG
- METIS_LIBRARY
- METIS_INCLUDE_DIR
+DEAL_II_PACKAGE_HANDLE(METIS
+ LIBRARIES
+ OPTIONAL PARMETIS_LIBRARY
+ REQUIRED METIS_LIBRARY
+ OPTIONAL MPI_C_LIBRARIES
+ INCLUDE_DIRS
+ REQUIRED METIS_INCLUDE_DIR
)
-
-MARK_AS_ADVANCED(
- METIS_LIBRARY
- PARMETIS_LIBRARY
- METIS_INCLUDE_DIR
- )
-
-IF(METIS_FOUND)
-
- IF(NOT PARMETIS_LIBRARY MATCHES "-NOTFOUND")
- SET(METIS_LIBRARIES ${PARMETIS_LIBRARY})
- ENDIF()
-
- LIST(APPEND METIS_LIBRARIES
- ${METIS_LIBRARY}
- ${MPI_C_LIBRARIES} # for good measure
- )
- SET(METIS_INCLUDE_DIRS ${METIS_INCLUDE_DIR})
-
- MARK_AS_ADVANCED(METIS_DIR)
-ENDIF()
SET(MUMPS_DIR "" CACHE PATH "An optional hint to a mumps directory")
SET_IF_EMPTY(MUMPS_DIR "$ENV{MUMPS_DIR}")
-INCLUDE(FindPackageHandleStandardArgs)
-
#
# Search for all known dependencies of MUMPS:
# (We'll rely on the user of FindMUMPS, setting up mpi *cough*)
FIND_PATH(MUMPS_INCLUDE_DIR dmumps_c.h
- HINTS
- ${MUMPS_DIR}
- PATH_SUFFIXES
- mumps include/mumps include
+ HINTS ${MUMPS_DIR}
+ PATH_SUFFIXES mumps include/mumps include
)
FIND_LIBRARY(DMUMPS_LIBRARY
NAMES dmumps
- HINTS
- ${MUMPS_DIR}
+ HINTS ${MUMPS_DIR}
PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
)
FIND_LIBRARY(MUMPS_COMMON_LIBRARY
NAMES mumps_common
- HINTS
- ${MUMPS_DIR}
+ HINTS ${MUMPS_DIR}
PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
)
#
FIND_LIBRARY(PORD_LIBRARY
NAMES pord
- HINTS
- ${MUMPS_DIR}
+ HINTS ${MUMPS_DIR}
PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
)
MARK_AS_ADVANCED(PORD_LIBRARY)
)
ENDIF()
-SET(_output ${DMUMPS_LIBRARY} ${MUMPS_COMMON_LIBRARY} ${PORD_LIBRARY})
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(MUMPS DEFAULT_MSG
- _output # Cosmetic: Gives nice output
- DMUMPS_LIBRARY
- MUMPS_COMMON_LIBRARY
- MUMPS_INCLUDE_DIR
- SCALAPACK_FOUND
- )
-
-MARK_AS_ADVANCED(
- DMUMPS_LIBRARY
- MUMPS_COMMON_LIBRARY
- MUMPS_INCLUDE_DIR
- PORD_LIBRARY
+DEAL_II_PACKAGE_HANDLE(MUMPS
+ LIBRARIES
+ REQUIRED DMUMPS_LIBRARY MUMPS_COMMON_LIBRARY
+ OPTIONAL PORD_LIBRARY
+ REQUIRED SCALAPACK_LIBRARIES
+ OPTIONAL METIS_LIBRARIES MPI_Fortran_LIBRARIES
+ INCLUDE_DIRS
+ REQUIRED MUMPS_INCLUDE_DIR
+ LINKER_FLAGS
+ OPTIONAL SCALAPACK_LINKER_FLAGS
)
-
-IF(MUMPS_FOUND)
- SET(MUMPS_INCLUDE_DIRS ${MUMPS_INCLUDE_DIR})
- SET(MUMPS_LIBRARIES
- ${DMUMPS_LIBRARY}
- ${MUMPS_COMMON_LIBRARY}
- ${PORD_LIBRARY}
- ${SCALAPACK_LIBRARIES}
- ${METIS_LIBRARIES}
- ${MPI_Fortran_LIBRARIES}
- )
- SET(MUMPS_LINKER_FLAGS ${SCALAPACK_LINKER_FLAGS})
-
- MARK_AS_ADVANCED(MUMPS_DIR)
-ENDIF()
-
# MUPARSER_VERSION_SUBMINOR
#
-INCLUDE(FindPackageHandleStandardArgs)
-
SET(MUPARSER_DIR "" CACHE PATH "An optional hint to a MUPARSER installation")
SET_IF_EMPTY(MUPARSER_DIR "$ENV{MUPARSER_DIR}")
)
ENDIF()
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(MUPARSER DEFAULT_MSG
- MUPARSER_LIBRARY
- MUPARSER_INCLUDE_DIR
+DEAL_II_PACKAGE_HANDLE(MUPARSER
+ LIBRARIES REQUIRED MUPARSER_LIBRARY
+ INCLUDE_DIRS REQUIRED MUPARSER_INCLUDE_DIR
)
-
-IF(MUPARSER_FOUND)
- SET(MUPARSER_LIBRARIES ${MUPARSER_LIBRARY})
- SET(MUPARSER_INCLUDE_DIRS ${MUPARSER_INCLUDE_DIR})
-
- MARK_AS_ADVANCED(MUPARSER_DIR)
-ENDIF()
# NETCDF_INCLUDE_DIRS
#
-INCLUDE(FindPackageHandleStandardArgs)
-
SET(NETCDF_DIR "" CACHE PATH "An optional hint to a NETCDF installation")
SET_IF_EMPTY(NETCDF_DIR "$ENV{NETCDF_DIR}")
FIND_PATH(NETCDF_INCLUDE_DIR netcdfcpp.h
- HINTS
- ${NETCDF_DIR}
- PATH_SUFFIXES
- netcdf include
+ HINTS ${NETCDF_DIR}
+ PATH_SUFFIXES netcdf include
)
#
#
FIND_LIBRARY(NETCDF_CPLUSPLUS_LIBRARY NAMES netcdf_c++ netcdf_cpp
- HINTS
- ${NETCDF_DIR}
- PATH_SUFFIXES
- lib${LIB_SUFFIX} lib64 lib
+ HINTS ${NETCDF_DIR}
+ PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
)
FIND_LIBRARY(NETCDF_C_LIBRARY NAMES netcdf
- HINTS
- ${NETCDF_DIR}
- PATH_SUFFIXES
- lib${LIB_SUFFIX} lib64 lib
- )
-
-SET(_output ${NETCDF_CPLUSPLUS_LIBRARY} ${NETCDF_C_LIBRARY})
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(NETCDF DEFAULT_MSG
- _output # Cosmetic: Gives nice output
- NETCDF_CPLUSPLUS_LIBRARY
- NETCDF_C_LIBRARY
- NETCDF_INCLUDE_DIR
+ HINTS ${NETCDF_DIR}
+ PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
)
-MARK_AS_ADVANCED(
- NETCDF_CPLUSPLUS_LIBRARY
- NETCDF_C_LIBRARY
- NETCDF_INCLUDE_DIR
+DEAL_II_PACKAGE_HANDLE(NETCDF
+ LIBRARIES REQUIRED NETCDF_CPLUSPLUS_LIBRARY NETCDF_C_LIBRARY
+ INCLUDE_DIRS REQUIRED NETCDF_INCLUDE_DIR
)
-
-IF(NETCDF_FOUND)
- SET(NETCDF_INCLUDE_DIRS ${NETCDF_INCLUDE_DIR})
- SET(NETCDF_LIBRARIES ${NETCDF_CPLUSPLUS_LIBRARY} ${NETCDF_C_LIBRARY})
-
- MARK_AS_ADVANCED(NETCDF_DIR)
-ENDIF()
FIND_LIBRARY(P4EST_LIBRARY_OPTIMIZED
NAMES p4est
- HINTS
- ${P4EST_DIR}/FAST
- ${P4EST_DIR}/DEBUG
- ${P4EST_DIR}
- PATH_SUFFIXES
- lib${LIB_SUFFIX} lib64 lib src
- )
-
-FIND_LIBRARY(P4EST_LIBRARY_DEBUG
- NAMES p4est
- HINTS
- ${P4EST_DIR}/DEBUG
- PATH_SUFFIXES
- lib${LIB_SUFFIX} lib64 lib src
+ HINTS ${P4EST_DIR}/FAST ${P4EST_DIR}/DEBUG ${P4EST_DIR}
+ PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib src
)
FIND_LIBRARY(SC_LIBRARY_OPTIMIZED
lib${LIB_SUFFIX} lib64 lib src sc/src
)
+#
+# Support debug variants as well:
+#
+
+FIND_LIBRARY(P4EST_LIBRARY_DEBUG
+ NAMES p4est
+ HINTS ${P4EST_DIR}/DEBUG
+ PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib src
+ )
+
FIND_LIBRARY(SC_LIBRARY_DEBUG
NAMES sc
- HINTS
- ${SC_DIR}/DEBUG
- ${P4EST_DIR}/DEBUG
- PATH_SUFFIXES
- lib${LIB_SUFFIX} lib64 lib src sc/src
+ HINTS ${SC_DIR}/DEBUG ${P4EST_DIR}/DEBUG
+ PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib src sc/src
)
+MARK_AS_ADVANCED(P4EST_LIBRARY_DEBUG SC_LIBRARY_DEBUG)
+
+IF( ( "${P4EST_LIBRARY_OPTIMIZED}" STREQUAL "${P4EST_LIBRARY_DEBUG}"
+ AND "${SC_LIBRARY_OPTIMIZED}" STREQUAL "${SC_LIBRARY_DEBUG}" )
+ OR P4EST_LIBRARY_DEBUG MATCHES "-NOTFOUND"
+ OR SC_LIBRARY_DEBUG MATCHES "-NOTFOUND" )
+ SET(_libraries P4EST_LIBRARY_OPTIMIZED SC_LIBRARY_OPTIMIZED)
+ELSE()
+ SET(_libraries
+ optimized P4EST_LIBRARY_OPTIMIZED SC_LIBRARY_OPTIMIZED
+ debug P4EST_LIBRARY_DEBUG SC_LIBRARY_DEBUG
+ general
+ )
+ENDIF()
+
FIND_PATH(P4EST_INCLUDE_DIR p4est_config.h
- HINTS
- ${P4EST_DIR}/FAST
- ${P4EST_DIR}/DEBUG
- ${P4EST_DIR}
- PATH_SUFFIXES
- p4est include/p4est include src
+ HINTS ${P4EST_DIR}/FAST ${P4EST_DIR}/DEBUG ${P4EST_DIR}
+ PATH_SUFFIXES p4est include/p4est include src
)
IF(EXISTS ${P4EST_INCLUDE_DIR}/p4est_config.h)
ENDIF()
ENDIF()
-
-SET(_output ${P4EST_LIBRARY_OPTMIZED} ${SC_LIBRARY_OPTIMIZED})
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(P4EST DEFAULT_MSG
- _output # Cosmetic: Gives nice output
- P4EST_LIBRARY_OPTIMIZED
- SC_LIBRARY_OPTIMIZED
- P4EST_INCLUDE_DIR
- SC_INCLUDE_DIR
- )
-
-MARK_AS_ADVANCED(
- P4EST_LIBRARY_OPTIMIZED
- P4EST_LIBRARY_DEBUG
- P4EST_INCLUDE_DIR
- SC_LIBRARY_OPTIMIZED
- SC_LIBRARY_DEBUG
- SC_INCLUDE_DIR
+DEAL_II_PACKAGE_HANDLE(P4EST
+ LIBRARIES
+ REQUIRED ${_libraries}
+ OPTIONAL LAPACK_LIBRARIES MPI_C_LIBRARIES
+ INCLUDE_DIRS
+ REQUIRED P4EST_INCLUDE_DIR SC_INCLUDE_DIR
)
-
-
-IF(P4EST_FOUND)
-
- IF( ( "${P4EST_LIBRARY_OPTIMIZED}" STREQUAL "${P4EST_LIBRARY_DEBUG}"
- AND
- "${SC_LIBRARY_OPTIMIZED}" STREQUAL "${SC_LIBRARY_DEBUG}" )
- OR P4EST_LIBRARY_DEBUG MATCHES "-NOTFOUND"
- OR SC_LIBRARY_DEBUG MATCHES "-NOTFOUND" )
- SET(P4EST_LIBRARIES
- ${P4EST_LIBRARY_OPTIMIZED}
- ${SC_LIBRARY_OPTIMIZED}
- )
- ELSE()
- SET(P4EST_LIBRARIES
- optimized
- ${P4EST_LIBRARY_OPTIMIZED}
- ${SC_LIBRARY_OPTIMIZED}
- debug
- ${P4EST_LIBRARY_DEBUG}
- ${SC_LIBRARY_DEBUG}
- general
- )
- ENDIF()
-
- LIST(APPEND P4EST_LIBRARIES
- ${LAPACK_LIBRARIES} # for good measure
- ${MPI_C_LIBRARIES} # for good measure
- )
- SET(P4EST_INCLUDE_DIRS
- ${P4EST_INCLUDE_DIR}
- ${SC_INCLUDE_DIR}
- )
-
- MARK_AS_ADVANCED(P4EST_DIR)
-ENDIF()
# PETSC_WITH_COMPLEX
#
-INCLUDE(FindPackageHandleStandardArgs)
-
SET(PETSC_DIR "" CACHE PATH "An optional hint to a PETSc directory")
SET(PETSC_ARCH "" CACHE STRING "An optional hint to a PETSc arch")
SET_IF_EMPTY(PETSC_DIR "$ENV{PETSC_DIR}")
SET_IF_EMPTY(PETSC_ARCH "$ENV{PETSC_ARCH}")
-
FIND_LIBRARY(PETSC_LIBRARY
NAMES petsc
- HINTS
- # petsc is special. Account for that
- ${PETSC_DIR}
- ${PETSC_DIR}/${PETSC_ARCH}
+ HINTS ${PETSC_DIR} ${PETSC_DIR}/${PETSC_ARCH}
PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
)
#
FIND_PATH(PETSC_INCLUDE_DIR_ARCH petscconf.h
- HINTS
- # petsc is special. Account for that
- ${PETSC_DIR}
- ${PETSC_DIR}/${PETSC_ARCH}
- ${PETSC_INCLUDE_DIRS}
+ HINTS ${PETSC_DIR} ${PETSC_DIR}/${PETSC_ARCH} ${PETSC_INCLUDE_DIRS}
PATH_SUFFIXES petsc include include/petsc
)
#
FIND_PATH(PETSC_INCLUDE_DIR_COMMON petscversion.h
- HINTS
- ${PETSC_DIR}
- ${PETSC_DIR}/${PETSC_ARCH}
- ${PETSC_INCLUDE_DIRS}
+ HINTS ${PETSC_DIR} ${PETSC_DIR}/${PETSC_ARCH} ${PETSC_INCLUDE_DIRS}
PATH_SUFFIXES petsc include include/petsc
)
FIND_FILE(PETSC_PETSCVARIABLES
NAMES petscvariables
- HINTS
- ${PETSC_DIR}/${PETSC_ARCH}
- ${PETSC_DIR}
+ HINTS ${PETSC_DIR}/${PETSC_ARCH} ${PETSC_DIR}
PATH_SUFFIXES conf
)
ENDIF()
ENDFOREACH()
-
ENDIF()
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(PETSC DEFAULT_MSG
- PETSC_LIBRARY
- PETSC_INCLUDE_DIR_ARCH
- PETSC_INCLUDE_DIR_COMMON
- )
-
-MARK_AS_ADVANCED(
- PETSC_INCLUDE_DIR_ARCH
- PETSC_INCLUDE_DIR_COMMON
- PETSC_INCLUDE_DIRS
- PETSC_LIBRARY
- PETSC_PETSCVARIABLES
+DEAL_II_PACKAGE_HANDLE(PETSC
+ LIBRARIES
+ REQUIRED PETSC_LIBRARY
+ OPTIONAL _petsc_libraries
+ INCLUDE_DIRS
+ REQUIRED PETSC_INCLUDE_DIR_COMMON PETSC_INCLUDE_DIR_ARCH
+ OPTIONAL _petsc_includes
)
IF(PETSC_FOUND)
- SET(PETSC_LIBRARIES ${PETSC_LIBRARY} ${_petsc_libraries})
- SET(PETSC_INCLUDE_DIRS
- ${PETSC_INCLUDE_DIR_COMMON}
- ${PETSC_INCLUDE_DIR_ARCH}
- ${_petsc_includes}
- )
-
- MARK_AS_ADVANCED(PETSC_ARCH PETSC_DIR)
+ MARK_AS_ADVANCED(PETSC_ARCH)
ENDIF()
-
SET_IF_EMPTY(SCALAPACK_DIR "$ENV{SCALAPACK_DIR}")
SET_IF_EMPTY(BLACS_DIR "$ENV{BLACS_DIR}")
-INCLUDE(FindPackageHandleStandardArgs)
-
FIND_LIBRARY(SCALAPACK_LIBRARY NAMES scalapack
- HINTS
- ${SCALAPACK_DIR}
- PATH_SUFFIXES
- lib${LIB_SUFFIX} lib64 lib
+ HINTS ${SCALAPACK_DIR}
+ PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
)
#
STRING(TOUPPER "${_lib}" _lib_upper)
FIND_LIBRARY(${_lib_upper}_LIBRARY
NAMES ${_lib} ${_lib}_MPI-LINUX-0 ${_lib}_MPI-DARWIN-0
- HINTS
- ${BLACS_DIR}
- ${SCALAPACK_DIR}
- ${SCALAPACK_DIR}/../blacs/
+ HINTS ${BLACS_DIR} ${SCALAPACK_DIR} ${SCALAPACK_DIR}/../blacs/
PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib LIB
)
- IF(NOT ${_lib_upper}_LIBRARY MATCHES "-NOTFOUND")
- LIST(APPEND BLACS_LIBRARIES
- ${${_lib_upper}_LIBRARY}
- )
- ENDIF()
+ MARK_AS_ADVANCED(${_lib_upper}_LIBRARY)
ENDFOREACH()
-
-SET(_output ${SCALAPACK_LIBRARY} ${BLACS_LIBRARIES})
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(SCALAPACK DEFAULT_MSG
- _output # Cosmetic: Gives nice output
- SCALAPACK_LIBRARY
- LAPACK_FOUND
- )
-
-MARK_AS_ADVANCED(
- SCALAPACK_LIBRARY
- BLACS_LIBRARY
- BLACSCINIT_LIBRARY
- BLACSF77INIT_LIBRARY
+DEAL_II_PACKAGE_HANDLE(SCALAPACK
+ LIBRARIES
+ REQUIRED SCALAPACK_LIBRARY LAPACK_LIBRARIES
+ OPTIONAL BLACS_LIBRARY BLACSCINIT_LIBRARY BLACSF77INIT_LIBRARY MPI_Fortran_LIBRARIES
+ LINKER_FLAGS
+ OPTIONAL LAPACK_LINKER_FLAGS
)
IF(SCALAPACK_FOUND)
- SET(SCALAPACK_LIBRARIES
- ${SCALAPACK_LIBRARY}
- ${LAPACK_LIBRARIES}
- ${BLACS_LIBRARIES}
- ${MPI_Fortran_LIBRARIES} # for good measure
- )
- SET(SCALAPACK_LINKER_FLAGS ${LAPACK_LINKER_FLAGS})
-
- MARK_AS_ADVANCED(SCALAPACK_DIR BLACS_DIR)
+ MARK_AS_ADVANCED(BLACS_DIR)
ENDIF()
-
# SLEPC_VERSION_PATCH
#
-INCLUDE(FindPackageHandleStandardArgs)
-
SET(SLEPC_DIR "" CACHE PATH "An optional hint to a SLEPC directory")
SET_IF_EMPTY(SLEPC_DIR "$ENV{SLEPC_DIR}")
SET_IF_EMPTY(PETSC_DIR "$ENV{PETSC_DIR}")
FIND_LIBRARY(SLEPC_LIBRARY
NAMES slepc
- HINTS
- # SLEPC is special. Account for that
- ${SLEPC_DIR}
- ${SLEPC_DIR}/${PETSC_ARCH}
- ${PETSC_DIR}
+ HINTS ${SLEPC_DIR} ${SLEPC_DIR}/${PETSC_ARCH} ${PETSC_DIR}
PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
)
FIND_PATH(SLEPC_INCLUDE_DIR_ARCH slepcconf.h
HINTS
- # SLEPC is special. Account for that
${SLEPC_DIR}
${SLEPC_DIR}/${PETSC_ARCH}
${SLEPC_INCLUDE_DIRS}
STRING(REGEX REPLACE "^.*SLEPC_VERSION_MINOR.*([0-9]+).*" "\\1"
SLEPC_VERSION_MINOR "${SLEPC_VERSION_MINOR_STRING}"
)
-
FILE(STRINGS "${SLEPC_SLEPCVERSION_H}" SLEPC_VERSION_SUBMINOR_STRING
REGEX "#define.*SLEPC_VERSION_SUBMINOR")
STRING(REGEX REPLACE "^.*SLEPC_VERSION_SUBMINOR.*([0-9]+).*" "\\1"
SLEPC_VERSION_SUBMINOR "${SLEPC_VERSION_SUBMINOR_STRING}"
)
-
FILE(STRINGS "${SLEPC_SLEPCVERSION_H}" SLEPC_VERSION_PATCH_STRING
REGEX "#define.*SLEPC_VERSION_PATCH")
STRING(REGEX REPLACE "^.*SLEPC_VERSION_PATCH.*([0-9]+).*" "\\1"
)
ENDIF()
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(SLEPC DEFAULT_MSG
- SLEPC_LIBRARY
- SLEPC_INCLUDE_DIR_ARCH
- SLEPC_INCLUDE_DIR_COMMON
- PETSC_FOUND
+DEAL_II_PACKAGE_HANDLE(SLEPC
+ LIBRARIES
+ REQUIRED SLEPC_LIBRARY PETSC_LIBRARIES
+ INCLUDE_DIRS
+ REQUIRED SLEPC_INCLUDE_DIR_ARCH SLEPC_INCLUDE_DIR_COMMON
)
-
-MARK_AS_ADVANCED(
- SLEPC_DIR
- SLEPC_INCLUDE_DIR_ARCH
- SLEPC_INCLUDE_DIR_COMMON
- SLEPC_INCLUDE_DIRS
- SLEPC_LIBRARY
- )
-
-IF(SLEPC_FOUND)
- SET(SLEPC_INCLUDE_DIRS
- ${SLEPC_INCLUDE_DIR_ARCH}
- ${SLEPC_INCLUDE_DIR_COMMON}
- )
- SET(SLEPC_LIBRARIES
- ${SLEPC_LIBRARY}
- ${PETSC_LIBRARIES}
- )
- MARK_AS_ADVANCED(SLEPC_DIR)
-ENDIF()
-
PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
)
+#
+# Also search for the debug library:
+#
FILE(GLOB _path ${TBB_DIR}/build/*_debug)
FIND_LIBRARY(TBB_DEBUG_LIBRARY
NAMES tbb_debug
${TBB_DIR}
PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
)
+IF(NOT TBB_DEBUG_LIBRARY MATCHES "-NOTFOUND")
+ SET(TBB_WITH_DEBUGLIB TRUE)
+ SET(_libraries debug TBB_DEBUG_LIBRARY optimized TBB_LIBRARY)
+ELSE()
+ SET(_libraries TBB_LIBRARY)
+ENDIF()
FIND_PATH(TBB_INCLUDE_DIR tbb/tbb_stddef.h
HINTS
)
ENDIF()
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(TBB DEFAULT_MSG
- TBB_LIBRARY
- TBB_INCLUDE_DIR
- )
-
-MARK_AS_ADVANCED(
- TBB_LIBRARY
- TBB_DEBUG_LIBRARY
- TBB_INCLUDE_DIR
+DEAL_II_PACKAGE_HANDLE(TBB
+ LIBRARIES REQUIRED ${_libraries}
+ INCLUDE_DIRS REQUIRED TBB_INCLUDE_DIR
)
-
-IF(TBB_FOUND)
- IF(NOT TBB_DEBUG_LIBRARY MATCHES "-NOTFOUND")
- SET(TBB_WITH_DEBUGLIB TRUE)
- SET(TBB_LIBRARIES debug ${TBB_DEBUG_LIBRARY} optimized ${TBB_LIBRARY})
- ELSE()
- SET(TBB_LIBRARIES ${TBB_LIBRARY})
- ENDIF()
-
- SET(TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
-
- MARK_AS_ADVANCED(TBB_DIR)
-ENDIF()
-
#
# *Boy* Sanitize the include paths given by TrilinosConfig.cmake...
#
-SET(TRILINOS_INCLUDE_DIRS ${Trilinos_INCLUDE_DIRS})
STRING(REGEX REPLACE
"(lib64|lib)\\/cmake\\/Trilinos\\/\\.\\.\\/\\.\\.\\/\\.\\.\\/" ""
- TRILINOS_INCLUDE_DIRS "${TRILINOS_INCLUDE_DIRS}"
+ Trilinos_INCLUDE_DIRS "${Trilinos_INCLUDE_DIRS}"
)
-
#
# We'd like to have the full library names but the Trilinos package only
# exports a list with short names...
# So we check again for every lib and store the full path:
#
+SET(_libraries "")
FOREACH(_library ${Trilinos_LIBRARIES})
IF(_new_trilinos_config)
UNSET(TRILINOS_LIBRARY_${_library} CACHE)
NO_CMAKE_FIND_ROOT_PATH
)
- MARK_AS_ADVANCED(TRILINOS_LIBRARY_${_library})
-
- LIST(APPEND TRILINOS_LIBRARIES ${TRILINOS_LIBRARY_${_library}})
- LIST(APPEND TRILINOS_LIBRARY_VARIABLES TRILINOS_LIBRARY_${_library})
-
+ LIST(APPEND _libraries TRILINOS_LIBRARY_${_library})
ENDFOREACH()
-#
-# Add the link interface:
-#
-LIST(APPEND TRILINOS_LIBRARIES
- ${Trilinos_TPL_LIBRARIES}
- ${MPI_CXX_LIBRARIES} # for good measure
+DEAL_II_PACKAGE_HANDLE(TRILINOS
+ LIBRARIES
+ REQUIRED ${_libraries} Trilinos_TPL_LIBRARIES
+ OPTIONAL MPI_CXX_LIBRARIES
+ INCLUDE_DIRS
+ REQUIRED Trilinos_INCLUDE_DIRS
)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(TRILINOS DEFAULT_MSG
- TRILINOS_LIBRARIES # cosmetic: Gives nice output
- TRILINOS_CONFIG_FOUND
- EPETRA_CONFIG_H
- ${TRILINOS_LIBRARY_VARIABLES}
- )
-
-MARK_AS_ADVANCED(TRILINOS_CONFIG_DIR EPETRA_CONFIG_H)
-
IF(TRILINOS_FOUND)
-
#
# Some versions of Sacado_cmath.hpp do things that aren't compatible
# with the -std=c++0x flag of GCC, see deal.II FAQ.
)
RESET_CMAKE_REQUIRED()
- MARK_AS_ADVANCED(TRILINOS_DIR)
-
ELSE()
- SET(TRILINOS_LIBRARIES)
- SET(TRILINOS_INCLUDE_DIRS)
UNSET(TRILINOS_CONFIG_DIR_SAVED CACHE)
ENDIF()
-
PATH_SUFFIXES
lib${LIB_SUFFIX} lib64 lib Lib ${_comp}/Lib
)
- IF(NOT "${ARGN}" STREQUAL "REQUIRED")
- IF(${_comp}_LIBRARY MATCHES "-NOTFOUND")
- SET(${_comp}_LIBRARY "")
- UNSET(${_comp}_LIBRARY CACHE)
- ENDIF()
- ENDIF()
ENDMACRO()
FIND_UMFPACK_PATH(UMFPACK umfpack.h)
FIND_UMFPACK_PATH(AMD amd.h)
-#
-# Well, recent versions of UMFPACK include SuiteSparse_config.h, if so,
-# ensure that we'll find these headers as well.
-#
-IF(NOT UMFPACK_INCLUDE_DIR MATCHES "-NOTFOUND")
+IF(EXISTS ${UMFPACK_INCLUDE_DIR}/umfpack.h)
+ #
+ # Well, recent versions of UMFPACK include SuiteSparse_config.h, if so,
+ # ensure that we'll find these headers as well.
+ #
FILE(STRINGS "${UMFPACK_INCLUDE_DIR}/umfpack.h" UMFPACK_SUITESPARSE_STRING
REGEX "#include \"SuiteSparse_config.h\"")
IF(NOT "${UMFPACK_SUITESPARSE_STRING}" STREQUAL "")
FIND_UMFPACK_PATH(SuiteSparse_config SuiteSparse_config.h)
- LIST(APPEND _required SuiteSparse_config_INCLUDE_DIR)
ENDIF()
+
+ 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()
#
# Link against everything we can find to avoid underlinkage:
#
-FIND_UMFPACK_LIBRARY(UMFPACK umfpack REQUIRED)
-FIND_UMFPACK_LIBRARY(AMD amd REQUIRED)
+FIND_UMFPACK_LIBRARY(UMFPACK umfpack)
+FIND_UMFPACK_LIBRARY(AMD amd)
FIND_UMFPACK_LIBRARY(CHOLMOD cholmod)
FIND_UMFPACK_LIBRARY(COLAMD colamd)
FIND_UMFPACK_LIBRARY(CCOLAMD ccolamd)
)
RESET_CMAKE_REQUIRED()
-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}"
- )
+IF(LAPACK_SUITESPARSECONFIG_WITH_PIC OR NOT BUILD_SHARED_LIBS)
+ SET(_suitesparse_config SuiteSparse_config_LIBRARY)
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
- UMFPACK_LIBRARY
- AMD_LIBRARY
- UMFPACK_INCLUDE_DIR
- AMD_INCLUDE_DIR
- ${_required}
- LAPACK_FOUND
- )
-
-MARK_AS_ADVANCED(
- AMD_INCLUDE_DIR
- AMD_LIBRARY
- atlas_LIBRARY
- blas_LIBRARY
- CAMD_LIBRARY
- CHOLMOD_LIBRARY
- CCOLAMD_LIBRARY
- COLAMD_LIBRARY
- SuiteSparse_config_INCLUDE_DIR
- SuiteSparse_config_LIBRARY
- UMFPACK_INCLUDE_DIR
- UMFPACK_LIBRARY
+#
+# Add rt to the link interface as well (for whatever reason,
+# libsuitesparse.so depends on clock_gettime but the shared
+# lib does not record its dependence on librt.so as evidenced
+# by ldd :-( ):
+#
+FIND_SYSTEM_LIBRARY(rt_LIBRARY NAMES rt)
+
+DEAL_II_PACKAGE_HANDLE(UMFPACK
+ LIBRARIES
+ REQUIRED UMFPACK_LIBRARY
+ OPTIONAL CHOLMOD_LIBRARY CCOLAMD_LIBRARY COLAMD_LIBRARY CAMD_LIBRARY ${_suitesparse_config}
+ REQUIRED AMD_LIBRARY
+ OPTIONAL METIS_LIBRARIES LAPACK_LIBRARIES rt_LIBRARY
+ INCLUDE_DIRS
+ REQUIRED UMFPACK_INCLUDE_DIR AMD_INCLUDE_DIR
+ OPTIONAL SuiteSparse_config_INCLUDE_DIR
+ LINKER_FLAGS
+ OPTIONAL LAPACK_LINKER_FLAGS
)
-
IF(UMFPACK_FOUND)
- SET(UMFPACK_LIBRARIES
- ${UMFPACK_LIBRARY}
- ${CHOLMOD_LIBRARY}
- ${CCOLAMD_LIBRARY}
- ${COLAMD_LIBRARY}
- ${CAMD_LIBRARY}
- ${AMD_LIBRARY}
- )
- IF(LAPACK_SUITESPARSECONFIG_WITH_PIC OR NOT BUILD_SHARED_LIBS)
- LIST(APPEND UMFPACK_LIBRARIES ${SuiteSparse_config_LIBRARY})
- ENDIF()
-
- #
- # For good measure:
- #
- IF(METIS_FOUND)
- LIST(APPEND UMFPACK_LIBRARIES ${METIS_LIBRARIES})
- ENDIF()
-
- LIST(APPEND UMFPACK_LIBRARIES ${LAPACK_LIBRARIES})
-
- #
- # Add rt to the link interface as well (for whatever reason,
- # libsuitesparse.so depends on clock_gettime but the shared
- # lib does not record its dependence on librt.so as evidenced
- # by ldd :-( ):
- #
- FIND_SYSTEM_LIBRARY(rt_LIBRARY NAMES rt)
- MARK_AS_ADVANCED(rt_LIBRARY)
- IF(NOT rt_LIBRARY MATCHES "-NOTFOUND")
- LIST(APPEND UMFPACK_LIBRARIES ${rt_LIBRARY})
- ENDIF()
-
- SET(UMFPACK_INCLUDE_DIRS
- ${UMFPACK_INCLUDE_DIR}
- ${AMD_INCLUDE_DIR}
- ${SuiteSparse_config_INCLUDE_DIR}
- )
- SET(UMFPACK_LINKER_FLAGS ${LAPACK_LINKER_FLAGS})
-
- MARK_AS_ADVANCED(UMFPACK_DIR SUITESPARSE_DIR)
+ MARK_AS_ADVANCED(SUITESPARSE_DIR)
ENDIF()
+MARK_AS_ADVANCED(SuiteSparse_config_LIBRARY rt_LIBRARY)
ENDIF()
ENDFOREACH()
-#
-# Deduplicate entries in *_INCLUDE_DIRS and *_LIBRARIES
-#
-FOREACH(_feature DEAL_II ${DEAL_II_FEATURES})
- FOREACH(_suffix INCLUDE_DIRS USER_INCLUDE_DIRS BUNDLED_INCLUDE_DIRS)
- REMOVE_DUPLICATES(${_feature}_${_suffix})
- ENDFOREACH()
- FOREACH(_suffix LIBRARIES LIBRARIES_RELEASE LIBRARIES_DEBUG)
- REMOVE_DUPLICATES(${_feature}_${_suffix} REVERSE)
- ENDFOREACH()
-ENDFOREACH()
-
#
# Save base configuration into variables BASE_* for later use in
# setup_write_config.cmake:
FOREACH(_suffix INCLUDE_DIRS USER_INCLUDE_DIRS BUNDLED_INCLUDE_DIRS)
REMOVE_DUPLICATES(DEAL_II_${_suffix})
ENDFOREACH()
-FOREACH(_suffix LIBRARIES LIBRARIES_RELEASE LIBRARIES_DEBUG)
+FOREACH(_suffix
+ LIBRARIES LIBRARIES_RELEASE LIBRARIES_DEBUG
+ USER_DEFINITIONS USER_DEFINITIONS_DEBUG USER_DEFINITIONS_RELEASE
+ DEFINITIONS DEFINITIONS_DEBUG DEFINITIONS_RELEASE
+ )
REMOVE_DUPLICATES(DEAL_II_${_suffix} REVERSE)
ENDFOREACH()