MACRO(FEATURE_METIS_FIND_EXTERNAL var)
FIND_PACKAGE(METIS)
- IF(METIS_FOUND)
- IF(METIS_VERSION_MAJOR GREATER 4)
- SET(${var} TRUE)
- ELSE()
- MESSAGE(STATUS "Insufficient metis installation found: "
- "Version 5.x required!"
- )
- SET(METIS_ADDITIONAL_ERROR_STRING
- "Could not find a sufficient modern metis installation: "
- "Version 5.x required!\n"
- )
-
- UNSET(METIS_LIBRARY CACHE)
- UNSET(METIS_INCLUDE_DIR CACHE)
- SET(METIS_DIR "" CACHE PATH
- "An optional hint to a metis directory"
- )
- MARK_AS_ADVANCED(CLEAR METIS_DIR)
- ENDIF()
+ IF(METIS_FOUND AND METIS_VERSION_MAJOR GREATER 4)
+ SET(${var} TRUE)
+ ELSE()
+ MESSAGE(STATUS "Insufficient metis installation found: "
+ "Version 5.x required!"
+ )
+ SET(METIS_ADDITIONAL_ERROR_STRING
+ "Could not find a sufficient modern metis installation: "
+ "Version 5.x required!\n"
+ )
ENDIF()
ENDMACRO()
SET(${var} FALSE)
ENDIF()
ENDIF()
-
- ENDIF(TRILINOS_FOUND)
-
- IF(NOT ${var})
- UNSET(TRILINOS_CONFIG CACHE)
- SET(TRILINOS_DIR "" CACHE STRING
- "An optional hint to a Trilinos installation"
- )
- MARK_AS_ADVANCED(CLEAR TRILINOS_DIR)
ENDIF()
-
ENDMACRO()
MACRO(FEATURE_TRILINOS_CONFIGURE_EXTERNAL)
-
- SET(TRILINOS_USER_INCLUDE_DIRS ${TRILINOS_INCLUDE_DIRS})
-
SET(DEAL_II_EXPAND_TRILINOS_VECTOR "TrilinosWrappers::Vector")
SET(DEAL_II_EXPAND_TRILINOS_BLOCKVECTOR "TrilinosWrappers::BlockVector")
SET(DEAL_II_EXPAND_TRILINOS_SPARSITY_PATTERN "TrilinosWrappers::SparsityPattern")
ENABLE_IF_SUPPORTED(TRILINOS_CXX_FLAGS "-Wno-unused")
ENABLE_IF_SUPPORTED(TRILINOS_CXX_FLAGS "-Wno-extra")
ENABLE_IF_SUPPORTED(TRILINOS_CXX_FLAGS "-Wno-overloaded-virtual")
-
ENDMACRO()
)
SET(${var} FALSE)
ENDIF()
-
- IF(NOT ${var})
- UNSET(PETSC_INCLUDE_DIR_ARCH CACHE)
- UNSET(PETSC_INCLUDE_DIR_COMMON CACHE)
- UNSET(PETSC_LIBRARY CACHE)
- UNSET(PETSC_PETSCVARIABLES CACHE)
- SET(PETSC_DIR "" CACHE PATH
- "An optional hint to a PETSc directory"
- )
- SET(PETSC_ARCH "" CACHE STRING
- "An optional hint to a PETSc arch"
- )
- MARK_AS_ADVANCED(CLEAR PETSC_DIR PETSC_ARCH)
- ENDIF()
ENDIF()
ENDMACRO()
MACRO(FEATURE_PETSC_CONFIGURE_EXTERNAL)
-
- SET(PETSC_USER_INCLUDE_DIRS ${PETSC_INCLUDE_DIRS})
+ SET(DEAL_II_EXPAND_PETSC_VECTOR "PETScWrappers::Vector")
+ SET(DEAL_II_EXPAND_PETSC_BLOCKVECTOR "PETScWrappers::BlockVector")
+ SET(DEAL_II_EXPAND_PETSC_MPI_VECTOR "PETScWrappers::MPI::Vector")
+ SET(DEAL_II_EXPAND_PETSC_MPI_BLOCKVECTOR "PETScWrappers::MPI::BlockVector")
#
# Disable a bunch of warnings when compiling with petsc:
#
ENABLE_IF_SUPPORTED(PETSC_CXX_FLAGS "-Wno-long-long")
-
- SET(DEAL_II_EXPAND_PETSC_VECTOR "PETScWrappers::Vector")
- SET(DEAL_II_EXPAND_PETSC_BLOCKVECTOR "PETScWrappers::BlockVector")
- SET(DEAL_II_EXPAND_PETSC_MPI_VECTOR "PETScWrappers::MPI::Vector")
- SET(DEAL_II_EXPAND_PETSC_MPI_BLOCKVECTOR "PETScWrappers::MPI::BlockVector")
ENDMACRO()
FIND_PACKAGE(HDF5)
IF(HDF5_FOUND)
-
IF( (HDF5_WITH_MPI AND DEAL_II_WITH_MPI) OR
(NOT HDF5_WITH_MPI AND NOT DEAL_II_WITH_MPI) )
SET(${var} TRUE)
" DEAL_II_WITH_MPI = ${DEAL_II_WITH_MPI}\n"
" HDF5_WITH_MPI = ${HDF5_WITH_MPI}\n"
)
- UNSET(HDF5_HL_LIBRARY CACHE)
- UNSET(HDF5_INCLUDE_DIR CACHE)
- UNSET(HDF5_LIBRARY CACHE)
- UNSET(HDF5_PUBCONF CACHE)
ENDIF()
ENDIF()
ENDMACRO()
-
CONFIGURE_FEATURE(HDF5)
-
-
-#
-# The user has to know the location of the hdf5 headers as well:
-#
-SET(HDF5_USER_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS})
SET(FEATURE_MUMPS_DEPENDS DEAL_II_WITH_MPI DEAL_II_WITH_LAPACK)
-
CONFIGURE_FEATURE(MUMPS)
-
-#
-# The user has to know the location of the MUMPS headers as well:
-#
-SET(MUMPS_USER_INCLUDE_DIRS ${MUMPS_INCLUDE_DIRS})
)
SET(${var} FALSE)
ENDIF()
-
- #
- # Reset configuration:
- #
- IF(NOT ${var})
- UNSET(P4EST_LIBRARY_OPTIMIZED CACHE)
- UNSET(P4EST_LIBRARY_DEBUG CACHE)
- UNSET(P4EST_INCLUDE_DIR CACHE)
- UNSET(SC_LIBRARY_OPTIMIZED CACHE)
- UNSET(SC_LIBRARY_DEBUG CACHE)
- UNSET(SC_INCLUDE_DIR CACHE)
- SET(P4EST_DIR "" CACHE PATH
- "An optional hint to a p4est installation/directory"
- )
- MARK_AS_ADVANCED(CLEAR P4EST_DIR)
- ENDIF()
-
ENDIF()
ENDMACRO()
CONFIGURE_FEATURE(P4EST)
-
-#
-# The user has to know the location of the P4est headers as well:
-#
-SET(P4EST_USER_INCLUDE_DIRS ${P4EST_INCLUDE_DIRS})
CONFIGURE_FEATURE(SLEPC)
-
-#
-# The user has to know the location of the SLEPC headers as well:
-#
-SET(SLEPC_USER_INCLUDE_DIRS ${SLEPC_INCLUDE_DIRS})
"DEAL_II_WITH_${_feature} has unmet configuration requirements: "
"${_dependency} has to be set to \"ON\"."
)
+ PURGE_FEATURE(${_feature})
SET_CACHED_OPTION(${_feature} OFF)
ENDIF()
SET(_dependencies_ok FALSE)
#
# First case: DEAL_II_FORCE_BUNDLED_${_feature} is defined:
#
+
+ PURGE_FEATURE(${_feature})
+
IF(FEATURE_${_feature}_HAVE_BUNDLED)
RUN_COMMAND("FEATURE_${_feature}_CONFIGURE_BUNDLED()")
MESSAGE(STATUS "DEAL_II_WITH_${_feature} successfully set up with bundled packages.")
ELSE(FEATURE_${_feature}_EXTERNAL_FOUND)
+ PURGE_FEATURE(${_feature})
+
MESSAGE(STATUS "DEAL_II_WITH_${_feature} has unmet external dependencies.")
IF(FEATURE_${_feature}_HAVE_BUNDLED AND DEAL_II_ALLOW_BUNDLED)
# DEAL_II_WITH_${_feature} is defined and set to OFF, promote it to
# cache nevertheless:
#
+ PURGE_FEATURE(${_feature})
SET_CACHED_OPTION(${_feature} OFF)
ENDIF()
SET(${_feature}_FOUND TRUE)
SET(_variable ${_var})
- SET(_cleanup ${_var})
SET(${_feature}_${_variable} "")
SET(_required TRUE)
SET(_fine TRUE)
# *Yay* a new keyword.
#
SET(_variable ${_arg})
- LIST(APPEND _cleanup ${_var})
SET(${_feature}_${_variable} "")
SET(_required TRUE)
SET(_fine TRUE)
IF(${_feature}_FOUND)
#
- # Deduplicate entries in *_INCLUDE_DIRS and *_LIBRARIES
+ # Deduplicate entries:
#
- 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)
+ FOREACH(_suffix ${DEAL_II_LIST_SUFFIXES})
+ IF(_suffix MATCHES "INCLUDE_DIRS$")
+ REMOVE_DUPLICATES(${_feature}_${_suffix})
+ ELSE()
+ REMOVE_DUPLICATES(${_feature}_${_suffix} REVERSE)
+ ENDIF()
ENDFOREACH()
MESSAGE(STATUS "Found ${_feature}")
- MARK_AS_ADVANCED(${_feature}_DIR)
+
+ MARK_AS_ADVANCED(${_feature}_DIR ${_feature}_ARCH)
ELSE()
- FOREACH(_v _cleanup)
- SET(${_feature}_${_v})
- ENDFOREACH()
MESSAGE(STATUS "Could NOT find ${_feature}")
ENDIF()
ENDMACRO()
--- /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.
+##
+## ---------------------------------------------------------------------
+
+#
+# Remove all cached and non cached variables associated with a feature.
+#
+# Usage:
+# PURGE_FEATURE(feature)
+#
+
+MACRO(PURGE_FEATURE _feature)
+ #
+ # uncached:
+ #
+ FOREACH(_var ${DEAL_II_LIST_SUFFIXES} ${DEAL_II_STRING_SUFFIXES})
+ IF(NOT _var MATCHES BUNDLED)
+ SET(${_feature}_${_var})
+ ENDIF()
+ ENDFOREACH()
+
+ #
+ # cached:
+ #
+ FOREACH(_var ${${_feature}_CLEAR_VARIABLES})
+ SET(${_var})
+ UNSET(${_var} CACHE)
+ ENDFOREACH()
+
+ UNSET(${_feature}_CLEAR_VARIABLES CACHE)
+
+ MARK_AS_ADVANCED(CLEAR ${_feature}_DIR ${_feature}_ARCH)
+ENDMACRO()
# This macro will add
#
# <FEATURE>_LIBRARIES (respecting general, optimized, debug keyword)
-# <FEATURE>_LIBRARIES(_DEBUG|_RELEASE)
-# <FEATURE>_(|BUNDLED_|USER_)INCLUDE_DIRS
-# <FEATURE>_DEFINITIONS(|_DEBUG|_RELEASE)
-# <FEATURE>_USER_DEFINITIONS(|_DEBUG|_RELEASE)
-# <FEATURE>_CXX_FLAGS(|_DEBUG|_RELEASE)
-# <FEATURE>_LINKER_FLAGS(|_DEBUG|_RELEASE)
#
-# to the corresponding DEAL_II_* variables
+# and all other suffixes defined in DEAL_II_LIST_SUFFIXES and
+# DEAL_II_STRING_SUFFIXES to the corresponding DEAL_II_* variables
#
MACRO(REGISTER_FEATURE _feature)
ENDFOREACH()
ENDIF()
- FOREACH(_var
- LIBRARIES_DEBUG LIBRARIES_RELEASE
- INCLUDE_DIRS BUNDLED_INCLUDE_DIRS USER_INCLUDE_DIRS
- DEFINITIONS DEFINITIONS_DEBUG DEFINITIONS_RELEASE
- USER_DEFINITIONS USER_DEFINITIONS_DEBUG USER_DEFINITIONS_RELEASE
- )
- IF(DEFINED ${_feature}_${_var})
+ FOREACH(_var ${DEAL_II_LIST_SUFFIXES})
+ IF(NOT "${_var}" STREQUAL "LIBRARIES" AND DEFINED ${_feature}_${_var})
LIST(APPEND DEAL_II_${_var} ${${_feature}_${_var}})
ENDIF()
ENDFOREACH()
- FOREACH(_var
- CXX_FLAGS CXX_FLAGS_DEBUG CXX_FLAGS_RELEASE
- LINKER_FLAGS LINKER_FLAGS_DEBUG LINKER_FLAGS_RELEASE
- )
+ FOREACH(_var ${DEAL_II_STRING_SUFFIXES})
IF(DEFINED ${_feature}_${_var})
ADD_FLAGS(DEAL_II_${_var} "${${_feature}_${_var}}")
ENDIF()
OPTIONAL MPI_C_LIBRARIES
INCLUDE_DIRS
REQUIRED HDF5_INCLUDE_DIR
+ USER_INCLUDE_DIRS
+ REQUIRED HDF5_INCLUDE_DIR
CLEAR HDF5_HL_LIBRARY HDF5_LIBRARY HDF5_INCLUDE_DIR HDF5_PUBCONF
)
HINTS ${BLACS_DIR} ${SCALAPACK_DIR} ${SCALAPACK_DIR}/../blacs/
PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib LIB
)
- MARK_AS_ADVANCED(${_lib_upper}_LIBRARY)
ENDFOREACH()
#
HINTS ${MUMPS_DIR}
PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
)
-MARK_AS_ADVANCED(PORD_LIBRARY)
-IF(PORD_LIBRARY MATCHES "-NOTFOUND")
- SET(PORD_LIBRARY "")
- UNSET(PORD_LIBRARY CACHE)
-ENDIF()
IF(EXISTS ${MUMPS_INCLUDE_DIR}/dmumps_c.h)
FILE(STRINGS "${MUMPS_INCLUDE_DIR}/dmumps_c.h" MUMPS_VERSION_STRING
OPTIONAL METIS_LIBRARIES MPI_Fortran_LIBRARIES
INCLUDE_DIRS
REQUIRED MUMPS_INCLUDE_DIR
+ USER_INCLUDE_DIRS
+ REQUIRED MUMPS_INCLUDE_DIR
LINKER_FLAGS
OPTIONAL LAPACK_LINKER_FLAGS
CLEAR
# P4EST_VERSION_PATCH
#
-INCLUDE(FindPackageHandleStandardArgs)
-
SET(P4EST_DIR "" CACHE PATH
"An optional hint to a p4est installation/directory"
)
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}" )
OPTIONAL LAPACK_LIBRARIES MPI_C_LIBRARIES
INCLUDE_DIRS
REQUIRED P4EST_INCLUDE_DIR SC_INCLUDE_DIR
+ USER_INCLUDE_DIRS
+ REQUIRED P4EST_INCLUDE_DIR SC_INCLUDE_DIR
CLEAR
SC_INCLUDE_DIR P4EST_LIBRARY_OPTIMIZED SC_LIBRARY_OPTIMIZED
P4EST_LIBRARY_DEBUG SC_LIBRARY_DEBUG P4EST_INCLUDE_DIR
INCLUDE_DIRS
REQUIRED PETSC_INCLUDE_DIR_COMMON PETSC_INCLUDE_DIR_ARCH
OPTIONAL _petsc_includes
+ USER_INCLUDE_DIRS
+ REQUIRED PETSC_INCLUDE_DIR_COMMON PETSC_INCLUDE_DIR_ARCH
+ OPTIONAL _petsc_includes
CLEAR
PETSC_LIBRARY PETSC_INCLUDE_DIR_COMMON PETSC_INCLUDE_DIR_ARCH
- ${_cleanup_variables}
+ PETSC_PETSCVARIABLES ${_cleanup_variables}
)
IF(PETSC_FOUND)
MARK_AS_ADVANCED(PETSC_ARCH)
+ELSE()
+ MARK_AS_ADVANCED(CLEAR PETSC_ARCH)
ENDIF()
REQUIRED SLEPC_LIBRARY PETSC_LIBRARIES
INCLUDE_DIRS
REQUIRED SLEPC_INCLUDE_DIR_ARCH SLEPC_INCLUDE_DIR_COMMON
+ USER_INCLUDE_DIRS
+ REQUIRED SLEPC_INCLUDE_DIR_ARCH SLEPC_INCLUDE_DIR_COMMON
CLEAR SLEPC_LIBRARY SLEPC_INCLUDE_DIR_ARCH SLEPC_INCLUDE_DIR_COMMON
)
# TBB_VERSION_MINOR
#
-INCLUDE(FindPackageHandleStandardArgs)
-
SET(TBB_DIR "" CACHE PATH "An optional hint to a TBB installation")
SET_IF_EMPTY(TBB_DIR "$ENV{TBB_DIR}")
# TRILINOS_HAS_C99_TR1_WORKAROUND
#
-INCLUDE(FindPackageHandleStandardArgs)
-
SET(TRILINOS_DIR "" CACHE PATH "An optional hint to a Trilinos installation")
SET_IF_EMPTY(TRILINOS_DIR "$ENV{TRILINOS_DIR}")
NO_SYSTEM_ENVIRONMENT_PATH
)
-IF(NOT "${TRILINOS_CONFIG_DIR}" STREQUAL "${TRILINOS_CONFIG_DIR_SAVED}")
- SET(_new_trilinos_config TRUE)
+IF( DEFINED TRILINOS_CONFIG_DIR_SAVED AND
+ NOT "${TRILINOS_CONFIG_DIR}" STREQUAL "${TRILINOS_CONFIG_DIR_SAVED}" )
+ SET(_backup ${TRILINOS_CONFIG_DIR})
+ PURGE_FEATURE(TRILINOS)
+ SET(TRILINOS_CONFIG_DIR ${_backup} CACHE INTERNAL "")
ENDIF()
SET(TRILINOS_CONFIG_DIR_SAVED "${TRILINOS_CONFIG_DIR}" CACHE INTERNAL "" FORCE)
+
IF(DEFINED Trilinos_VERSION)
#
# Extract version numbers:
#
# Look for the one include file that we'll query for further information:
#
-# TODO:
-IF(_new_trilinos_config)
- UNSET(EPETRA_CONFIG_H CACHE)
-ENDIF()
FIND_FILE(EPETRA_CONFIG_H Epetra_config.h
HINTS ${Trilinos_INCLUDE_DIRS}
- NO_DEFAULT_PATH
- NO_CMAKE_ENVIRONMENT_PATH
- NO_CMAKE_PATH
- NO_SYSTEM_ENVIRONMENT_PATH
- NO_CMAKE_SYSTEM_PATH
- NO_CMAKE_FIND_ROOT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH
)
IF(EXISTS ${EPETRA_CONFIG_H})
ENDIF()
ENDIF()
+#
+# Some versions of Sacado_cmath.hpp do things that aren't compatible
+# with the -std=c++0x flag of GCC, see deal.II FAQ.
+# Test whether that is indeed the case:
+#
+
+FIND_FILE(SACADO_CMATH_HPP Sacado_cmath.hpp
+ HINTS ${Trilinos_INCLUDE_DIRS}
+ NO_DEFAULT_PATH NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH
+ )
+
+IF(EXISTS ${SACADO_CMATH_HPP})
+ LIST(APPEND CMAKE_REQUIRED_INCLUDES ${Trilinos_INCLUDE_DIRS})
+ PUSH_CMAKE_REQUIRED("${DEAL_II_CXX11_FLAG}")
+
+ CHECK_CXX_SOURCE_COMPILES(
+ "
+ #include <Sacado_cmath.hpp>
+ int main(){ return 0; }
+ "
+ TRILINOS_SUPPORTS_CPP11
+ )
+
+ #
+ # Try whether exporting HAS_C99_TR1_CMATH helps:
+ #
+ PUSH_CMAKE_REQUIRED("-DHAS_C99_TR1_CMATH")
+ CHECK_CXX_SOURCE_COMPILES(
+ "
+ #include <Sacado_cmath.hpp>
+ int main(){ return 0; }
+ "
+ TRILINOS_HAS_C99_TR1_WORKAROUND
+ )
+ RESET_CMAKE_REQUIRED()
+ENDIF()
+
#
# *Boy* Sanitize the include paths given by TrilinosConfig.cmake...
#
#
SET(_libraries "")
FOREACH(_library ${Trilinos_LIBRARIES})
- IF(_new_trilinos_config)
- UNSET(TRILINOS_LIBRARY_${_library} CACHE)
- ENDIF()
-
+ LIST(APPEND _libraries TRILINOS_LIBRARY_${_library})
FIND_LIBRARY(TRILINOS_LIBRARY_${_library}
NAMES ${_library}
HINTS ${Trilinos_LIBRARY_DIRS}
NO_CMAKE_SYSTEM_PATH
NO_CMAKE_FIND_ROOT_PATH
)
-
- LIST(APPEND _libraries TRILINOS_LIBRARY_${_library})
ENDFOREACH()
+
DEAL_II_PACKAGE_HANDLE(TRILINOS
LIBRARIES
REQUIRED ${_libraries} Trilinos_TPL_LIBRARIES
OPTIONAL MPI_CXX_LIBRARIES
INCLUDE_DIRS
REQUIRED Trilinos_INCLUDE_DIRS
- CLEAR TRILINOS_CONFIG EPETRA_CONFIG_H ${_libraries}
+ USER_INCLUDE_DIRS
+ REQUIRED Trilinos_INCLUDE_DIRS
+ CLEAR
+ TRILINOS_CONFIG_DIR EPETRA_CONFIG_H SACADO_CMATH_HPP ${_libraries}
+ TRILINOS_SUPPORTS_CPP11 TRILINOS_HAS_C99_TR1_WORKAROUND
)
-
-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.
- # Test whether that is indeed the case:
- #
- IF(_new_trilinos_config)
- UNSET(TRILINOS_SUPPORTS_CPP11 CACHE)
- UNSET(TRILINOS_HAS_C99_TR1_WORKAROUND CACHE)
- ENDIF()
-
- LIST(APPEND CMAKE_REQUIRED_INCLUDES ${TRILINOS_INCLUDE_DIRS})
- PUSH_CMAKE_REQUIRED("${DEAL_II_CXX11_FLAG}")
-
- CHECK_CXX_SOURCE_COMPILES(
- "
- #include <Sacado_cmath.hpp>
- int main(){ return 0; }
- "
- TRILINOS_SUPPORTS_CPP11
- )
-
- #
- # Try whether exporting HAS_C99_TR1_CMATH helps:
- #
- PUSH_CMAKE_REQUIRED("-DHAS_C99_TR1_CMATH")
- CHECK_CXX_SOURCE_COMPILES(
- "
- #include <Sacado_cmath.hpp>
- int main(){ return 0; }
- "
- TRILINOS_HAS_C99_TR1_WORKAROUND
- )
- RESET_CMAKE_REQUIRED()
-
-ELSE()
-
- UNSET(TRILINOS_CONFIG_DIR_SAVED CACHE)
-ENDIF()
# UMFPACK_VERSION_SUBMINOR
#
-INCLUDE(FindPackageHandleStandardArgs)
-
SET(UMFPACK_DIR "" CACHE PATH "An optional hint to an UMFPACK directory")
SET(SUITESPARSE_DIR "" CACHE PATH
"An optional hint to a SUITESPARSE directory"
# by ldd :-( ):
#
FIND_SYSTEM_LIBRARY(rt_LIBRARY NAMES rt)
+MARK_AS_ADVANCED(rt_LIBRARY)
DEAL_II_PACKAGE_HANDLE(UMFPACK
LIBRARIES
OPTIONAL LAPACK_LINKER_FLAGS
CLEAR
UMFPACK_LIBRARY CHOLMOD_LIBRARY CCOLAMD_LIBRARY COLAMD_LIBRARY
- CAMD_LIBRARY SuiteSparse_config_LIBRARY AMD_LIBRARY METIS_LIBRARIES
- LAPACK_LIBRARIES UMFPACK_INCLUDE_DIR AMD_INCLUDE_DIR
- SuiteSparse_config_INCLUDE_DIR
+ CAMD_LIBRARY SuiteSparse_config_LIBRARY AMD_LIBRARY UMFPACK_INCLUDE_DIR
+ AMD_INCLUDE_DIR SuiteSparse_config_INCLUDE_DIR
)
IF(UMFPACK_FOUND)
MARK_AS_ADVANCED(SUITESPARSE_DIR)
+ELSE()
+ MARK_AS_ADVANCED(CLEAR SUITESPARSE_DIR)
ENDIF()
-MARK_AS_ADVANCED(SuiteSparse_config_LIBRARY rt_LIBRARY)
# DEAL_II_PROJECT_CONFIG_RELDIR *)
#
# DEAL_II_BUILD_TYPES
+# DEAL_II_LIST_SUFFIXES
+# DEAL_II_STRING_SUFFIXES
#
# *) Can be overwritten by the command line via -D<...>
#
LIST(APPEND DEAL_II_BUILD_TYPES "RELEASE")
ENDIF()
+SET(DEAL_II_LIST_SUFFIXES
+ DEFINITIONS DEFINITIONS_RELEASE DEFINITIONS_DEBUG
+ USER_DEFINITIONS USER_DEFINITIONS_RELEASE USER_DEFINITIONS_DEBUG
+ INCLUDE_DIRS USER_INCLUDE_DIRS BUNDLED_INCLUDE_DIRS
+ LIBRARIES LIBRARIES_RELEASE LIBRARIES_DEBUG
+ )
+
+SET(DEAL_II_STRING_SUFFIXES
+ CXX_FLAGS CXX_FLAGS_RELEASE CXX_FLAGS_DEBUG
+ LINKER_FLAGS LINKER_FLAGS_RELEASE LINKER_FLAGS_DEBUG
+ )
+
########################################################################
# #
# Save base configuration into variables BASE_* for later use in
# setup_write_config.cmake:
#
-FOREACH(_suffix
- CXX_FLAGS CXX_FLAGS_RELEASE CXX_FLAGS_DEBUG
- DEFINITIONS DEFINITIONS_RELEASE DEFINITIONS_DEBUG
- USER_DEFINITIONS USER_DEFINITIONS_RELEASE USER_DEFINITIONS_DEBUG
- LINKER_FLAGS LINKER_FLAGS_RELEASE LINKER_FLAGS_DEBUG
- INCLUDE_DIRS USER_INCLUDE_DIRS BUNDLED_INCLUDE_DIRS
- LIBRARIES LIBRARIES_RELEASE LIBRARIES_DEBUG
- )
+FOREACH(_suffix ${DEAL_II_STRING_SUFFIXES} ${DEAL_II_LIST_SUFFIXES})
SET(BASE_${_suffix} ${DEAL_II_${_suffix}})
ENDFOREACH()
# Register features:
#
FOREACH(_feature ${DEAL_II_FEATURES})
- FILTER_SYSTEM_LIBRARIES(${_feature})
+ FILTER_SYSTEM_LIBRARIES(${_feature}) # TODO, remove here
REGISTER_FEATURE(${_feature})
ENDFOREACH()
#
# Deduplicate entries one more time :-]
#
-FOREACH(_suffix INCLUDE_DIRS USER_INCLUDE_DIRS BUNDLED_INCLUDE_DIRS)
- REMOVE_DUPLICATES(DEAL_II_${_suffix})
-ENDFOREACH()
-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)
+FOREACH(_suffix ${DEAL_II_LIST_SUFFIXES})
+ IF(_suffix MATCHES "INCLUDE_DIRS$")
+ REMOVE_DUPLICATES(DEAL_II_${_suffix})
+ ELSE()
+ REMOVE_DUPLICATES(DEAL_II_${_suffix} REVERSE)
+ ENDIF()
ENDFOREACH()
#
# Print the feature configuration:
#
FOREACH(_var2
- C_COMPILER CXX_COMPILER Fortran_COMPILER
- CXX_FLAGS CXX_FLAGS_RELEASE CXX_FLAGS_DEBUG
- DEFINITIONS DEFINITIONS_RELEASE DEFINITIONS_DEBUG
- USER_DEFINITIONS USER_DEFINITIONS_RELEASE USER_DEFINITIONS_DEBUG
- LINKER_FLAGS LINKER_FLAGS_RELEASE LINKER_FLAGS_DEBUG
- INCLUDE_DIRS USER_INCLUDE_DIRS BUNDLED_INCLUDE_DIRS
- LIBRARIES LIBRARIES_RELEASE LIBRARIES_DEBUG
+ C_COMPILER CXX_COMPILER Fortran_COMPILER
+ ${DEAL_II_STRING_SUFFIXES} ${DEAL_II_LIST_SUFFIXES}
)
IF(DEFINED ${_feature}_${_var2})
_detailed("# ${_feature}_${_var2} = ${${_feature}_${_var2}}\n")