INCLUDE(setup_compiler_flags)
-###########################################################################
+##########################################################################
#
# FAT NOTE:
#
# altered in the platform checks and features configuration
# (beside setting a lot of DEAL_II_* definitions...):
#
+#
# For internal use:
#
# CMAKE_SHARED_LINKER_FLAGS
# for setting necessary compiler flags, e.g. -std=c++11 (if
# available).
#
+# INCLUDE_DIRECTORIES()
+# For setting necessary include dirs for the compilation of the
+# deal.II library.
+#
ADD_CUSTOM_TARGET(deal_ii_target_dependencies)
# Used as a dummy target for all the stuff that has to be done
# before the library can be compiled.
# For internal and external use:
#
SET( DEAL_II_EXTERNAL_LIBRARIES)
-# Used to keep track of external libraries, the deal.II library and
-# user programs have to be linked against.
+# Used to keep track of external libraries, the deal.II library
+# and user programs have to be linked against.
#
#
# For external use:
# Used to keep track of external include dirs, necessary for the
# compilation of user programs.
#
-###########################################################################
+##########################################################################
#
* Implement cmake packaging
+* The Find modules under contrib/cmake/modules export <...>_LIBRARY and
+ <...>_INCLUDE_DIR, wheras the convention is nowadays _LIBRARIES and
+ _INCLUDE_DIRS, fix this.
* Make Make.global_options work...
MACRO(FEATURE_MPI_CONFIGURE_EXTERNAL var)
- INCLUDE_DIRECTORIES(${MPI_CXX_INCLUDE_PATH})
ADD_FLAGS(CMAKE_CXX_FLAGS "${MPI_CXX_COMPILE_FLAGS}")
ADD_FLAGS(CMAKE_SHARED_LINKER_FLAGS "${MPI_CXX_LINK_FLAGS}")
+
LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${MPI_CXX_LIBRARIES})
+ INCLUDE_DIRECTORIES(${MPI_CXX_INCLUDE_PATH})
- SET(DEAL_II_COMPILER_SUPPORTS_MPI TRUE)
+ # The user has to know the location of the mpi headers as well:
+ LIST(APPEND DEAL_II_EXTERNAL_INCLUDE_DIRS ${MPI_CXX_INCLUDE_PATH})
+
+ # TODO: Set up the rest:
- # TODO: (Maybe) set up the rest:
#MPI_CXX_COMPILER MPI Compiler wrapper for CXX
#MPIEXEC Executable for running MPI programs
#MPIEXEC_NUMPROC_FLAG Flag to pass to MPIEXEC before giving it the number of processors to run on
#MPIEXEC_PREFLAGS Flags to pass to MPIEXEC directly before the executable to run.
#MPIEXEC_POSTFLAGS Flags to pass to MPIEXEC after other flags
+ SET(DEAL_II_COMPILER_SUPPORTS_MPI TRUE)
+
SET(${var} TRUE)
ENDMACRO()
# configured with mpi. We use this as a check for the mpi configuration
# of Epetra.
#
- IF(EXISTS "${TRILINOS_INCLUDE_DIR}/Epetra_MpiComm.h")
+ IF(EXISTS "${TRILINOS_INCLUDE_DIRS}/Epetra_MpiComm.h")
SET(TRILINOS_WITH_MPI TRUE)
ENDIF()
# 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_DIR})
+ LIST(APPEND CMAKE_REQUIRED_INCLUDES ${TRILINOS_INCLUDE_DIRS})
ADD_FLAGS(CMAKE_REQUIRED_FLAGS "-std=c++0x")
CHECK_CXX_SOURCE_COMPILES(
"
ENDIF()
ENDIF()
STRIP_FLAG(CMAKE_REQUIRED_FLAGS "-std=c++0x")
- LIST(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES ${TRILINOS_INCLUDE_DIR})
+ LIST(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES ${TRILINOS_INCLUDE_DIRS})
ENDIF(TRILINOS_FOUND)
ENDMACRO()
MACRO(FEATURE_TRILINOS_CONFIGURE_EXTERNAL var)
- INCLUDE_DIRECTORIES(${TRILINOS_INCLUDE_DIR})
+ INCLUDE_DIRECTORIES(${TRILINOS_INCLUDE_DIRS})
+
+ # The user has to know the location of the trilinos headers as well:
+ LIST(APPEND DEAL_II_EXTERNAL_INCLUDE_DIRS ${TRILINOS_INCLUDE_DIRS})
+
LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES
${TRILINOS_LIBRARIES}
TRILINOS_SUBMINOR "${Trilinos_VERSION}")
-FIND_PATH(TRILINOS_INCLUDE_DIR Trilinos_version.h
- HINTS ${Trilinos_INCLUDE_DIRS}
- )
+SET(TRILINOS_INCLUDE_DIRS ${Trilinos_INCLUDE_DIRS})
#
# We'd like to have the full library names but the Trilinos package only
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TRILINOS DEFAULT_MSG
TRILINOS_DIR
- TRILINOS_INCLUDE_DIR
+ TRILINOS_INCLUDE_DIRS
TRILINOS_LIBRARIES
)
IF(TRILINOS_FOUND)
MARK_AS_ADVANCED(
TRILINOS_DIR
- TRILINOS_INCLUDE_DIR
+ TRILINOS_INCLUDE_DIRS
TRILINOS_LIBRARIES
)
ENDIF()