Major:
-* Bug: Unset some cached tests variables. Notably:
- - A Trilinos test
- - the LAPACK routine checks
-
* Implement the documentation component. (I don't grok what's going on in
this makefiles. There is a rudimentary doxygen call, though.)
* Add the rest of the Bug tests
-* Enable in source FindModules for P4est and Trilinos.
-
* The following features have to be written:
* HDF5
* MUMPS
IF(METIS_FOUND AND METIS_MAJOR GREATER 4)
SET(${var} TRUE)
ELSE()
- MESSAGE(WARNING
+ MESSAGE(WARNING "\n"
"Could not find a sufficient modern metis installation: "
- "Version 5.x required!"
+ "Version 5.x required!\n\n"
)
ENDIF()
ENDMACRO()
SET(${var} TRUE)
ENDIF()
+ #
+ # Remove the variable from the cache to force a recheck:
+ #
+ UNSET(P4EST_WITH_MPI CACHE)
+
ENDIF()
ENDMACRO()
LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${P4EST_INCLUDE_DIR} ${SC_INCLUDE_DIR})
IF (CMAKE_BUILD_TYPE MATCHES "Debug")
- IF(P4EST_DEBUG_FOUND AND SC_DEBUG_FOUND)
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_DEBUG
- ${P4EST_DEBUG_LIBRARY} ${SC_DEBUG_LIBRARY}
- )
- ELSE()
- MESSAGE(STATUS
- "No debug p4est and sc libraries were found. "
- "The regular p4est and sc libs will be used for the debug target instead."
- )
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_DEBUG
- ${P4EST_LIBRARY} ${SC_LIBRARY}
- )
- ENDIF()
+ LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_DEBUG
+ ${P4EST_LIBRARY} ${SC_LIBRARY}
+ )
ENDIF()
IF (CMAKE_BUILD_TYPE MATCHES "Release")
"Could not find the p4est and sc libraries!\n\n"
"Please ensure that the libraries are installed on your computer.\n"
"If the libraries are not at a default location, either provide some hints\n"
- "for the autodetection, or set the relevant variables by hand in ccmake.\n\n"
+ "for the autodetection:\n"
+ " $ P4EST_DIR=\"...\" cmake <...>\n"
+ " $ ccmake -DP4EST_DIR=\"...\" cmake <...>\n"
+ "or set the relevant variables by hand in ccmake.\n"
)
ENDMACRO()
STRIP_FLAG(CMAKE_REQUIRED_FLAGS "-std=c++0x")
LIST(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES ${TRILINOS_INCLUDE_DIRS})
+ #
+ # Remove the following variables from the cache to force a recheck:
+ #
+ UNSET(TRILINOS_SUPPORTS_CPP11 CACHE)
+ UNSET(TRILINOS_HAS_C99_TR1_WORKAROUND CACHE)
+
ENDIF(TRILINOS_FOUND)
ENDMACRO()
"An optional hint to an AMD directory"
)
ENDIF()
+
INCLUDE(FindPackageHandleStandardArgs)
+SET_IF_EMPTY(P4EST_DIR "$ENV{P4EST_DIR}")
+
FIND_PATH(P4EST_INCLUDE_DIR p4est.h
HINTS
- ${P4EST_DIR}/include
- $ENV{P4EST_DIR}/include
+ ${P4EST_DIR}
+ PATH_SUFFIXES
+ p4est include/p4est include src p4est/src
)
FIND_LIBRARY(P4EST_LIBRARY
NAMES p4est
HINTS
${P4EST_DIR}
- $ENV{P4EST_DIR}
- PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
- )
-
-FIND_LIBRARY(P4EST_DEBUG_LIBRARY
- NAMES p4est_debug p4est.g
- HINTS
- ${P4EST_DIR}
- $ENV{P4EST_DIR}
- PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
+ PATH_SUFFIXES
+ lib${LIB_SUFFIX} lib64 lib src
)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(P4EST DEFAULT_MSG P4EST_LIBRARY P4EST_INCLUDE_DIR)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(P4EST_DEBUG DEFAULT_MSG P4EST_DEBUG_LIBRARY P4EST_INCLUDE_DIR)
IF(P4EST_FOUND)
MARK_AS_ADVANCED(
P4EST_LIBRARY
- P4EST_DEBUG_LIBRARY
P4EST_INCLUDE_DIR
+ P4EST_DIR
)
+ELSE()
+ SET(P4EST_DIR "" CACHE STRING
+ "An optional hint to a p4est installation/directory"
+ )
ENDIF()
UNSET(PETSC_INCLUDE_DIR_ARCH CACHE)
UNSET(PETSC_PETSCCONF_H CACHE)
UNSET(PETSC_PETSCVERSION_H CACHE)
+
INCLUDE(FindPackageHandleStandardArgs)
+SET_IF_EMPTY(P4EST_DIR "$ENV{P4EST_DIR}")
+SET_IF_EMPTY(SC_DIR "$ENV{SC_DIR}")
+
FIND_PATH(SC_INCLUDE_DIR sc.h
HINTS
- ${SC_DIR}/include
- $ENV{SC_DIR}/include
- ${P4EST_DIR}/include
- $ENV{P4EST_DIR}/include
+ ${SC_DIR}
+ ${P4EST_DIR}
+ PATH_SUFFIXES
+ sc include/p4est include src sc/src p4est/sc/src
)
NAMES sc
HINTS
${SC_DIR}
- $ENV{SC_DIR}
${P4EST_DIR}
- $ENV{P4EST_DIR}
- PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
- )
-
-FIND_LIBRARY(SC_DEBUG_LIBRARY
- NAMES sc_debug sc.g
- HINTS
- ${SC_DIR}
- $ENV{SC_DIR}
- ${P4EST_DIR}
- $ENV{P4EST_DIR}
- PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
+ PATH_SUFFIXES
+ lib${LIB_SUFFIX} lib64 lib src
)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SC DEFAULT_MSG SC_LIBRARY SC_INCLUDE_DIR)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(SC_DEBUG DEFAULT_MSG SC_DEBUG_LIBRARY SC_INCLUDE_DIR)
IF(SC_FOUND)
MARK_AS_ADVANCED(
SC_LIBRARY
- SC_DEBUG_LIBRARY
SC_INCLUDE_DIR
+ SC_DIR
)
+ELSE()
+ SET(SC_DIR "" CACHE STRING
+ "An optional hint to an sc installation/directory"
+ )
ENDIF()
+
INCLUDE(FindPackageHandleStandardArgs)
+SET_IF_EMPTY(TRILINOS_DIR "$ENV{TRILINOS_DIR}")
+
#
# Include the trilinos package configuration:
#
NAMES Trilinos TRILINOS
HINTS
${TRILINOS_DIR}
- $ENV{TRILINOS_DIR}
PATH_SUFFIXES
lib${LIB_SUFFIX}/cmake/Trilinos
lib64/cmake/Trilinos
NAMES ${library}
HINTS ${Trilinos_LIBRARY_DIRS}
)
- MARK_AS_ADVANCED(TRILINOS_LIBRARY_${library})
LIST(APPEND TRILINOS_LIBRARIES ${TRILINOS_LIBRARY_${library}})
+
+ #
+ # Remove the variables from the cache, so that updating TRILINOS_DIR will
+ # find the new libraries..
+ #
+ UNSET(TRILINOS_LIBRARY_${library} CACHE)
ENDFOREACH()
TRILINOS_INCLUDE_DIRS
TRILINOS_LIBRARIES
)
+ELSE()
+ IF(TRILINOS_DIR MATCHES "-NOTFOUND")
+ SET(TRILINOS_DIR "" CACHE STRING
+ "A hint to a Trilinos installation"
+ FORCE
+ )
+ ENDIF()
ENDIF()