ENDIF()
IF(FEATURE_${_feature}_EXTERNAL_FOUND)
- MESSAGE(STATUS "All external dependencies for DEAL_II_WITH_${_feature} are fullfilled.")
-
IF(COMMAND FEATURE_${_feature}_CONFIGURE_EXTERNAL)
RUN_COMMAND("FEATURE_${_feature}_CONFIGURE_EXTERNAL()")
ENDIF()
## ---------------------------------------------------------------------
## $Id$
##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
##
## This file is part of the deal.II library.
##
## ---------------------------------------------------------------------
## $Id$
##
-## Copyright (C) 2013 by the deal.II authors
+## Copyright (C) 2013 - 2014 by the deal.II authors
##
## This file is part of the deal.II library.
##
## ---------------------------------------------------------------------
## $Id$
##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
##
## This file is part of the deal.II library.
##
## ---------------------------------------------------------------------
## $Id$
##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
##
## This file is part of the deal.II library.
##
# Link in MPI unconditionally (if found).
#
-FIND_PATH(METIS_INCLUDE_DIR metis.h
- HINTS
- ${METIS_DIR}
- PATH_SUFFIXES
- metis include/metis include
- )
-
FIND_LIBRARY(METIS_LIBRARY
NAMES metis
HINTS
build/${CMAKE_CXX_PLATFORM_ID}-${CMAKE_SYSTEM_PROCESSOR}/libmetis
)
+#
+# Sanity check: Only search the parmetis library in the same directory as
+# the metis library...
+#
+GET_FILENAME_COMPONENT(_path "${METIS_LIBRARY}" PATH)
FIND_LIBRARY(PARMETIS_LIBRARY
NAMES parmetis
+ HINTS ${_path}
+ NO_DEFAULT_PATH
+ NO_CMAKE_ENVIRONMENT_PATH
+ NO_CMAKE_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ NO_CMAKE_SYSTEM_PATH
+ NO_CMAKE_FIND_ROOT_PATH
+ )
+
+FIND_PATH(METIS_INCLUDE_DIR metis.h
HINTS
${METIS_DIR}
PATH_SUFFIXES
- lib${LIB_SUFFIX} lib64 lib
- # This is a hint, isn't it?
- build/${CMAKE_CXX_PLATFORM_ID}-${CMAKE_SYSTEM_PROCESSOR}/libmetis
- )
-
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(METIS DEFAULT_MSG
- METIS_LIBRARY
- METIS_INCLUDE_DIR
- )
-
-MARK_AS_ADVANCED(
- METIS_LIBRARY
- PARMETIS_LIBRARY
- METIS_INCLUDE_DIR
+ metis include/metis include
)
-IF(METIS_FOUND)
- #
- # Sanity check: Only include parmetis library if it is in the same
- # directory as the metis library...
- #
- GET_FILENAME_COMPONENT(_path1 "${PARMETIS_LIBRARY}" PATH)
- GET_FILENAME_COMPONENT(_path2 "${ETIS_LIBRARY}" PATH)
- IF( NOT PARMETIS_LIBRARY MATCHES "-NOTFOUND"
- AND "${_path1}" STREQUAL "${_path2}" )
- 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})
-
+IF(EXISTS ${METIS_INCLUDE_DIR}/metis.h)
#
# Extract the version number out of metis.h
#
SET(METIS_VERSION
"${METIS_VERSION_MAJOR}.${METIS_VERSION_MINOR}.${METIS_VERSION_SUBMINOR}"
)
+ENDIF()
+
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(METIS DEFAULT_MSG
+ METIS_LIBRARY
+ 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()
## ---------------------------------------------------------------------
## $Id$
##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
##
## This file is part of the deal.II library.
##
## ---------------------------------------------------------------------
## $Id$
##
-## Copyright (C) 2013 by the deal.II authors
+## Copyright (C) 2013 - 2014 by the deal.II authors
##
## This file is part of the deal.II library.
##
PATH_SUFFIXES include
)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(MUPARSER DEFAULT_MSG
- MUPARSER_LIBRARY
- MUPARSER_INCLUDE_DIR
- )
-
-IF(MUPARSER_FOUND)
- SET(MUPARSER_LIBRARIES ${MUPARSER_LIBRARY})
- SET(MUPARSER_INCLUDE_DIRS ${MUPARSER_INCLUDE_DIR})
-
+IF(EXISTS ${MUPARSER_INCLUDE_DIR}/muParserDef.h)
FILE(STRINGS "${MUPARSER_INCLUDE_DIR}/muParserDef.h" MUPARSER_VERSION_STRING
REGEX "#define MUP_VERSION _T"
)
SET(MUPARSER_VERSION
"${MUPARSER_VERSION_MAJOR}.${MUPARSER_VERSION_MINOR}.${MUPARSER_VERSION_SUBMINOR}"
)
+ENDIF()
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(MUPARSER DEFAULT_MSG
+ MUPARSER_LIBRARY
+ MUPARSER_INCLUDE_DIR
+ )
+
+IF(MUPARSER_FOUND)
+ SET(MUPARSER_LIBRARIES ${MUPARSER_LIBRARY})
+ SET(MUPARSER_INCLUDE_DIRS ${MUPARSER_INCLUDE_DIR})
MARK_AS_ADVANCED(MUPARSER_DIR)
ENDIF()
## ---------------------------------------------------------------------
## $Id$
##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
##
## This file is part of the deal.II library.
##
## ---------------------------------------------------------------------
## $Id$
##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
##
## This file is part of the deal.II library.
##
# given, take what we chose for p4est.
#
-FIND_PATH(P4EST_INCLUDE_DIR p4est_config.h
- HINTS
- ${P4EST_DIR}/FAST
- ${P4EST_DIR}/DEBUG
- ${P4EST_DIR}
- PATH_SUFFIXES
- p4est include/p4est include src
- )
-
FIND_PATH(SC_INCLUDE_DIR sc.h
HINTS
${SC_DIR}/FAST
lib${LIB_SUFFIX} lib64 lib src sc/src
)
+FIND_PATH(P4EST_INCLUDE_DIR p4est_config.h
+ HINTS
+ ${P4EST_DIR}/FAST
+ ${P4EST_DIR}/DEBUG
+ ${P4EST_DIR}
+ PATH_SUFFIXES
+ p4est include/p4est include src
+ )
+
+IF(EXISTS ${P4EST_INCLUDE_DIR}/p4est_config.h)
+ #
+ # Determine mpi support of p4est:
+ #
+ FILE(STRINGS "${P4EST_INCLUDE_DIR}/p4est_config.h" P4EST_MPI_STRING
+ REGEX "#define.*P4EST_MPI 1")
+ IF("${P4EST_MPI_STRING}" STREQUAL "")
+ SET(P4EST_WITH_MPI FALSE)
+ ELSE()
+ SET(P4EST_WITH_MPI TRUE)
+ ENDIF()
+
+ #
+ # Extract version numbers:
+ #
+ FILE(STRINGS "${P4EST_INCLUDE_DIR}/p4est_config.h" P4EST_VERSION
+ REGEX "#define P4EST_VERSION \"")
+ STRING(REGEX REPLACE "^.*P4EST_VERSION.*\"([0-9]+.*)\".*" "\\1"
+ P4EST_VERSION "${P4EST_VERSION}"
+ )
+ STRING(REGEX REPLACE
+ "^([0-9]+).*$" "\\1"
+ P4EST_VERSION_MAJOR "${P4EST_VERSION}")
+ STRING(REGEX REPLACE
+ "^[0-9]+\\.([0-9]+).*$" "\\1"
+ P4EST_VERSION_MINOR "${P4EST_VERSION}")
+ STRING(REGEX REPLACE
+ "^[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1"
+ P4EST_VERSION_SUBMINOR "${P4EST_VERSION}")
+
+ # Now for the patch number such as in 0.3.4.1. If there
+ # is no patch number, then the REGEX REPLACE will fail,
+ # setting P4EST_VERSION_PATCH to P4EST_VERSION. If that
+ # is the case, then set the patch number to zero
+ STRING(REGEX REPLACE
+ "^[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+)?.*$" "\\1"
+ P4EST_VERSION_PATCH "${P4EST_VERSION}")
+ IF(${P4EST_VERSION_PATCH} STREQUAL "${P4EST_VERSION}")
+ SET(P4EST_VERSION_PATCH "0")
+ ENDIF()
+ENDIF()
+
+
SET(_output ${P4EST_LIBRARY_OPTMIZED} ${SC_LIBRARY_OPTIMIZED})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(P4EST DEFAULT_MSG
_output # Cosmetic: Gives nice output
${SC_INCLUDE_DIR}
)
- #
- # Determine mpi support of p4est:
- #
- FILE(STRINGS "${P4EST_INCLUDE_DIR}/p4est_config.h" P4EST_MPI_STRING
- REGEX "#define.*P4EST_MPI 1")
- IF("${P4EST_MPI_STRING}" STREQUAL "")
- SET(P4EST_WITH_MPI FALSE)
- ELSE()
- SET(P4EST_WITH_MPI TRUE)
- ENDIF()
-
- #
- # Extract version numbers:
- #
- FILE(STRINGS "${P4EST_INCLUDE_DIR}/p4est_config.h" P4EST_VERSION
- REGEX "#define P4EST_VERSION \"")
- STRING(REGEX REPLACE "^.*P4EST_VERSION.*\"([0-9]+.*)\".*" "\\1"
- P4EST_VERSION "${P4EST_VERSION}"
- )
- STRING(REGEX REPLACE
- "^([0-9]+).*$" "\\1"
- P4EST_VERSION_MAJOR "${P4EST_VERSION}")
- STRING(REGEX REPLACE
- "^[0-9]+\\.([0-9]+).*$" "\\1"
- P4EST_VERSION_MINOR "${P4EST_VERSION}")
- STRING(REGEX REPLACE
- "^[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1"
- P4EST_VERSION_SUBMINOR "${P4EST_VERSION}")
-
- # Now for the patch number such as in 0.3.4.1. If there
- # is no patch number, then the REGEX REPLACE will fail,
- # setting P4EST_VERSION_PATCH to P4EST_VERSION. If that
- # is the case, then set the patch number to zero
- STRING(REGEX REPLACE
- "^[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+)?.*$" "\\1"
- P4EST_VERSION_PATCH "${P4EST_VERSION}")
- IF(${P4EST_VERSION_PATCH} STREQUAL "${P4EST_VERSION}")
- SET(P4EST_VERSION_PATCH "0")
- ENDIF()
-
MARK_AS_ADVANCED(P4EST_DIR)
ENDIF()
## ---------------------------------------------------------------------
## $Id$
##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
##
## This file is part of the deal.II library.
##
PATH_SUFFIXES petsc include include/petsc
)
+SET(PETSC_PETSCCONF_H "${PETSC_INCLUDE_DIR_ARCH}/petscconf.h")
+IF(EXISTS ${PETSC_PETSCCONF_H})
+ #
+ # Is petsc compiled with support for MPIUNI?
+ #
+ FILE(STRINGS "${PETSC_PETSCCONF_H}" PETSC_MPIUNI_STRING
+ REGEX "#define.*PETSC_HAVE_MPIUNI 1")
+ IF("${PETSC_MPIUNI_STRING}" STREQUAL "")
+ SET(PETSC_WITH_MPIUNI FALSE)
+ ELSE()
+ SET(PETSC_WITH_MPIUNI TRUE)
+ ENDIF()
+
+ #
+ # Is petsc compiled with support for 64BIT_INDICES?
+ #
+ FILE(STRINGS "${PETSC_PETSCCONF_H}" PETSC_64BIT_INDICES_STRING
+ REGEX "#define.*PETSC_USE_64BIT_INDICES 1")
+ IF("${PETSC_64BIT_INDICES_STRING}" STREQUAL "")
+ SET(PETSC_WITH_64BIT_INDICES FALSE)
+ ELSE()
+ SET(PETSC_WITH_64BIT_INDICES TRUE)
+ ENDIF()
+
+ #
+ # Is petsc compiled with support for COMPLEX numbers?
+ #
+ FILE(STRINGS "${PETSC_PETSCCONF_H}" PETSC_COMPLEX_STRING
+ REGEX "#define.*PETSC_USE_COMPLEX 1")
+ IF("${PETSC_COMPLEX_STRING}" STREQUAL "")
+ SET(PETSC_WITH_COMPLEX FALSE)
+ ELSE()
+ SET(PETSC_WITH_COMPLEX TRUE)
+ ENDIF()
+ENDIF()
+
#
# Sometimes, this is not enough...
# If petsc is not installed but in source tree layout, there will be
PATH_SUFFIXES petsc include include/petsc
)
+SET(PETSC_PETSCVERSION_H "${PETSC_INCLUDE_DIR_COMMON}/petscversion.h")
+IF(EXISTS ${PETSC_PETSCVERSION_H})
+ FILE(STRINGS "${PETSC_PETSCVERSION_H}" PETSC_VERSION_MAJOR_STRING
+ REGEX "#define.*PETSC_VERSION_MAJOR")
+ STRING(REGEX REPLACE "^.*PETSC_VERSION_MAJOR.*([0-9]+).*" "\\1"
+ PETSC_VERSION_MAJOR "${PETSC_VERSION_MAJOR_STRING}"
+ )
+ FILE(STRINGS "${PETSC_PETSCVERSION_H}" PETSC_VERSION_MINOR_STRING
+ REGEX "#define.*PETSC_VERSION_MINOR")
+ STRING(REGEX REPLACE "^.*PETSC_VERSION_MINOR.*([0-9]+).*" "\\1"
+ PETSC_VERSION_MINOR "${PETSC_VERSION_MINOR_STRING}"
+ )
+ FILE(STRINGS "${PETSC_PETSCVERSION_H}" PETSC_VERSION_SUBMINOR_STRING
+ REGEX "#define.*PETSC_VERSION_SUBMINOR")
+ STRING(REGEX REPLACE "^.*PETSC_VERSION_SUBMINOR.*([0-9]+).*" "\\1"
+ PETSC_VERSION_SUBMINOR "${PETSC_VERSION_SUBMINOR_STRING}"
+ )
+ FILE(STRINGS "${PETSC_PETSCVERSION_H}" PETSC_VERSION_PATCH_STRING
+ REGEX "#define.*PETSC_VERSION_PATCH")
+ STRING(REGEX REPLACE "^.*PETSC_VERSION_PATCH.*([0-9]+).*" "\\1"
+ PETSC_VERSION_PATCH "${PETSC_VERSION_PATCH_STRING}"
+ )
+ SET(PETSC_VERSION
+ "${PETSC_VERSION_MAJOR}.${PETSC_VERSION_MINOR}.${PETSC_VERSION_SUBMINOR}.${PETSC_VERSION_PATCH}"
+ )
+ENDIF()
+
#
# So, up to this point it was easy. Now, the tricky part. Search for
# petscvariables and determine the includes and the link interface from
)
IF(NOT PETSC_PETSCVARIABLES MATCHES "-NOTFOUND")
-
#
# Includes:
#
${_petsc_includes}
)
- SET(PETSC_PETSCCONF_H "${PETSC_INCLUDE_DIR_ARCH}/petscconf.h")
- SET(PETSC_PETSCVERSION_H "${PETSC_INCLUDE_DIR_COMMON}/petscversion.h")
-
- #
- # Is petsc compiled with support for MPIUNI?
- #
- FILE(STRINGS "${PETSC_PETSCCONF_H}" PETSC_MPIUNI_STRING
- REGEX "#define.*PETSC_HAVE_MPIUNI 1")
- IF("${PETSC_MPIUNI_STRING}" STREQUAL "")
- SET(PETSC_WITH_MPIUNI FALSE)
- ELSE()
- SET(PETSC_WITH_MPIUNI TRUE)
- ENDIF()
-
- #
- # Is petsc compiled with support for 64BIT_INDICES?
- #
- FILE(STRINGS "${PETSC_PETSCCONF_H}" PETSC_64BIT_INDICES_STRING
- REGEX "#define.*PETSC_USE_64BIT_INDICES 1")
- IF("${PETSC_64BIT_INDICES_STRING}" STREQUAL "")
- SET(PETSC_WITH_64BIT_INDICES FALSE)
- ELSE()
- SET(PETSC_WITH_64BIT_INDICES TRUE)
- ENDIF()
-
- #
- # Is petsc compiled with support for COMPLEX numbers?
- #
- FILE(STRINGS "${PETSC_PETSCCONF_H}" PETSC_COMPLEX_STRING
- REGEX "#define.*PETSC_USE_COMPLEX 1")
- IF("${PETSC_COMPLEX_STRING}" STREQUAL "")
- SET(PETSC_WITH_COMPLEX FALSE)
- ELSE()
- SET(PETSC_WITH_COMPLEX TRUE)
- ENDIF()
-
- FILE(STRINGS "${PETSC_PETSCVERSION_H}" PETSC_VERSION_MAJOR_STRING
- REGEX "#define.*PETSC_VERSION_MAJOR")
- STRING(REGEX REPLACE "^.*PETSC_VERSION_MAJOR.*([0-9]+).*" "\\1"
- PETSC_VERSION_MAJOR "${PETSC_VERSION_MAJOR_STRING}"
- )
-
- FILE(STRINGS "${PETSC_PETSCVERSION_H}" PETSC_VERSION_MINOR_STRING
- REGEX "#define.*PETSC_VERSION_MINOR")
- STRING(REGEX REPLACE "^.*PETSC_VERSION_MINOR.*([0-9]+).*" "\\1"
- PETSC_VERSION_MINOR "${PETSC_VERSION_MINOR_STRING}"
- )
-
- FILE(STRINGS "${PETSC_PETSCVERSION_H}" PETSC_VERSION_SUBMINOR_STRING
- REGEX "#define.*PETSC_VERSION_SUBMINOR")
- STRING(REGEX REPLACE "^.*PETSC_VERSION_SUBMINOR.*([0-9]+).*" "\\1"
- PETSC_VERSION_SUBMINOR "${PETSC_VERSION_SUBMINOR_STRING}"
- )
-
- FILE(STRINGS "${PETSC_PETSCVERSION_H}" PETSC_VERSION_PATCH_STRING
- REGEX "#define.*PETSC_VERSION_PATCH")
- STRING(REGEX REPLACE "^.*PETSC_VERSION_PATCH.*([0-9]+).*" "\\1"
- PETSC_VERSION_PATCH "${PETSC_VERSION_PATCH_STRING}"
- )
-
- SET(PETSC_VERSION
- "${PETSC_VERSION_MAJOR}.${PETSC_VERSION_MINOR}.${PETSC_VERSION_SUBMINOR}.${PETSC_VERSION_PATCH}"
- )
-
MARK_AS_ADVANCED(PETSC_ARCH PETSC_DIR)
ENDIF()
## ---------------------------------------------------------------------
## $Id$
##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
##
## This file is part of the deal.II library.
##
## ---------------------------------------------------------------------
## $Id$
##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
##
## This file is part of the deal.II library.
##
PATH_SUFFIXES slepc include include/slepc
)
-
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(SLEPC DEFAULT_MSG
- SLEPC_LIBRARY
- SLEPC_INCLUDE_DIR_ARCH
- SLEPC_INCLUDE_DIR_COMMON
- PETSC_FOUND
- )
-
-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}
- )
-
- SET(SLEPC_SLEPCVERSION_H "${SLEPC_INCLUDE_DIR_COMMON}/slepcversion.h")
-
+SET(SLEPC_SLEPCVERSION_H "${SLEPC_INCLUDE_DIR_COMMON}/slepcversion.h")
+IF(EXISTS ${SLEPC_SLEPCVERSION_H})
FILE(STRINGS "${SLEPC_SLEPCVERSION_H}" SLEPC_VERSION_MAJOR_STRING
REGEX "#define.*SLEPC_VERSION_MAJOR")
STRING(REGEX REPLACE "^.*SLEPC_VERSION_MAJOR.*([0-9]+).*" "\\1"
SLEPC_VERSION_MAJOR "${SLEPC_VERSION_MAJOR_STRING}"
)
-
FILE(STRINGS "${SLEPC_SLEPCVERSION_H}" SLEPC_VERSION_MINOR_STRING
REGEX "#define.*SLEPC_VERSION_MINOR")
STRING(REGEX REPLACE "^.*SLEPC_VERSION_MINOR.*([0-9]+).*" "\\1"
STRING(REGEX REPLACE "^.*SLEPC_VERSION_PATCH.*([0-9]+).*" "\\1"
SLEPC_VERSION_PATCH "${SLEPC_VERSION_PATCH_STRING}"
)
-
SET(SLEPC_VERSION
"${SLEPC_VERSION_MAJOR}.${SLEPC_VERSION_MINOR}.${SLEPC_VERSION_SUBMINOR}.${SLEPC_VERSION_PATCH}"
)
+ENDIF()
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(SLEPC DEFAULT_MSG
+ SLEPC_LIBRARY
+ SLEPC_INCLUDE_DIR_ARCH
+ SLEPC_INCLUDE_DIR_COMMON
+ PETSC_FOUND
+ )
+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()
## ---------------------------------------------------------------------
## $Id$
##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
##
## This file is part of the deal.II library.
##
SET(TBB_DIR "" CACHE PATH "An optional hint to a TBB installation")
SET_IF_EMPTY(TBB_DIR "$ENV{TBB_DIR}")
-FIND_PATH(TBB_INCLUDE_DIR tbb/tbb_stddef.h
- HINTS
- ${TBB_DIR}
- PATH_SUFFIXES include include/tbb tbb
- )
-
FILE(GLOB _path ${TBB_DIR}/build/*_release)
-
FIND_LIBRARY(TBB_LIBRARY
NAMES tbb
HINTS
)
FILE(GLOB _path ${TBB_DIR}/build/*_debug)
-
FIND_LIBRARY(TBB_DEBUG_LIBRARY
NAMES tbb_debug
HINTS
PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(TBB DEFAULT_MSG
- TBB_LIBRARY
- TBB_INCLUDE_DIR
+FIND_PATH(TBB_INCLUDE_DIR tbb/tbb_stddef.h
+ HINTS
+ ${TBB_DIR}
+ PATH_SUFFIXES include include/tbb tbb
)
-IF(NOT TBB_INCLUDE_DIR MATCHES "-NOTFOUND")
+IF(EXISTS ${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h)
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()
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(TBB DEFAULT_MSG
+ TBB_LIBRARY
+ TBB_INCLUDE_DIR
+ )
+
MARK_AS_ADVANCED(
TBB_LIBRARY
TBB_DEBUG_LIBRARY
## ---------------------------------------------------------------------
## $Id$
##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
##
## This file is part of the deal.II library.
##
ENDIF()
SET(TRILINOS_CONFIG_DIR_SAVED "${TRILINOS_CONFIG_DIR}" CACHE INTERNAL "" FORCE)
+IF(DEFINED Trilinos_VERSION)
+ #
+ # Extract version numbers:
+ #
+ SET(TRILINOS_VERSION "${Trilinos_VERSION}")
+
+ STRING(REGEX REPLACE
+ "^([0-9]+).*$" "\\1"
+ TRILINOS_VERSION_MAJOR "${Trilinos_VERSION}")
+
+ STRING(REGEX REPLACE
+ "^[0-9]+\\.([0-9]+).*$" "\\1"
+ TRILINOS_VERSION_MINOR "${Trilinos_VERSION}")
+
+ STRING(REGEX REPLACE
+ "^[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1"
+ TRILINOS_VERSION_SUBMINOR "${Trilinos_VERSION}")
+ENDIF()
#
# Look for the one include file that we'll query for further information:
NO_CMAKE_FIND_ROOT_PATH
)
+IF(EXISTS ${EPETRA_CONFIG_H})
+ #
+ # Determine whether Trilinos was configured with MPI and 64bit indices:
+ #
+ FILE(STRINGS "${EPETRA_CONFIG_H}" EPETRA_MPI_STRING
+ REGEX "#define HAVE_MPI")
+ IF("${EPETRA_MPI_STRING}" STREQUAL "")
+ SET(TRILINOS_WITH_MPI FALSE)
+ ELSE()
+ SET(TRILINOS_WITH_MPI TRUE)
+ ENDIF()
+ FILE(STRINGS "${EPETRA_CONFIG_H}" EPETRA_32BIT_STRING
+ REGEX "#define EPETRA_NO_32BIT_GLOBAL_INDICES")
+ IF("${EPETRA_64BIT_STRING}" STREQUAL "")
+ SET(TRILINOS_WITH_NO_32BITS_INDICES TRUE)
+ ELSE()
+ SET(TRILINOS_WITH_NO_32BITS_INDICES FALSE)
+ ENDIF()
+ FILE(STRINGS "${EPETRA_CONFIG_H}" EPETRA_64BIT_STRING
+ REGEX "#define EPETRA_NO_64BIT_GLOBAL_INDICES")
+ IF("${EPETRA_64BIT_STRING}" STREQUAL "")
+ SET(TRILINOS_WITH_NO_64BITS_INDICES TRUE)
+ ELSE()
+ SET(TRILINOS_WITH_NO_64BITS_INDICES FALSE)
+ ENDIF()
+ENDIF()
#
# *Boy* Sanitize the include paths given by TrilinosConfig.cmake...
MARK_AS_ADVANCED(TRILINOS_CONFIG_DIR EPETRA_CONFIG_H)
IF(TRILINOS_FOUND)
- #
- # Extract version numbers:
- #
- SET(TRILINOS_VERSION "${Trilinos_VERSION}")
-
- STRING(REGEX REPLACE
- "^([0-9]+).*$" "\\1"
- TRILINOS_VERSION_MAJOR "${Trilinos_VERSION}")
-
- STRING(REGEX REPLACE
- "^[0-9]+\\.([0-9]+).*$" "\\1"
- TRILINOS_VERSION_MINOR "${Trilinos_VERSION}")
-
- STRING(REGEX REPLACE
- "^[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1"
- TRILINOS_VERSION_SUBMINOR "${Trilinos_VERSION}")
-
- #
- # Determine whether Trilinos was configured with MPI and 64bit indices:
- #
- FILE(STRINGS "${EPETRA_CONFIG_H}" EPETRA_MPI_STRING
- REGEX "#define HAVE_MPI")
- IF("${EPETRA_MPI_STRING}" STREQUAL "")
- SET(TRILINOS_WITH_MPI FALSE)
- ELSE()
- SET(TRILINOS_WITH_MPI TRUE)
- ENDIF()
- FILE(STRINGS "${EPETRA_CONFIG_H}" EPETRA_32BIT_STRING
- REGEX "#define EPETRA_NO_32BIT_GLOBAL_INDICES")
- IF("${EPETRA_64BIT_STRING}" STREQUAL "")
- SET(TRILINOS_WITH_NO_32BITS_INDICES TRUE)
- ELSE()
- SET(TRILINOS_WITH_NO_32BITS_INDICES FALSE)
- ENDIF()
- FILE(STRINGS "${EPETRA_CONFIG_H}" EPETRA_64BIT_STRING
- REGEX "#define EPETRA_NO_64BIT_GLOBAL_INDICES")
- IF("${EPETRA_64BIT_STRING}" STREQUAL "")
- SET(TRILINOS_WITH_NO_64BITS_INDICES TRUE)
- ELSE()
- SET(TRILINOS_WITH_NO_64BITS_INDICES FALSE)
- ENDIF()
#
# Some versions of Sacado_cmath.hpp do things that aren't compatible
## ---------------------------------------------------------------------
## $Id$
##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
##
## This file is part of the deal.II library.
##