]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Bugfix in configure_trilinos.cmake
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 21 Sep 2012 10:21:30 +0000 (10:21 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 21 Sep 2012 10:21:30 +0000 (10:21 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@26587 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/CMakeLists.txt
deal.II/cmake-TODO
deal.II/contrib/cmake/configure/configure_1_mpi.cmake
deal.II/contrib/cmake/configure/configure_trilinos.cmake
deal.II/contrib/cmake/modules/FindTRILINOS.cmake

index 714a682084daf92d0e7efc2cf12e94051e396217..7e472f695c91a0817dfc64a9718714156dacd83e 100644 (file)
@@ -283,7 +283,7 @@ INCLUDE(setup_deal_ii)
 INCLUDE(setup_compiler_flags)
 
 
-###########################################################################
+##########################################################################
 #
 #                             FAT NOTE:
 #
@@ -291,6 +291,7 @@ INCLUDE(setup_compiler_flags)
 # altered in the platform checks and features configuration
 # (beside setting a lot of DEAL_II_* definitions...):
 #
+#
 # For internal use:
 #
 #     CMAKE_SHARED_LINKER_FLAGS
@@ -300,6 +301,10 @@ INCLUDE(setup_compiler_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.
@@ -308,8 +313,8 @@ ADD_CUSTOM_TARGET(deal_ii_target_dependencies)
 # 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:
@@ -318,7 +323,7 @@ SET(  DEAL_II_EXTERNAL_LIBRARIES)
 #         Used to keep track of external include dirs, necessary for the
 #         compilation of user programs.
 #
-###########################################################################
+##########################################################################
 
 
 #
index b83451d2b2038411e54f78f93ce690564f219c44..c490306c82f13b88aee444504cfd6fba2c3d375c 100644 (file)
@@ -2,6 +2,9 @@ TODO:
 
 * 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...
 
index 2ec0c64d68d6fa5029e19c46dce1442b4f2e42bc..d2cc849ba531f2204e97cbdcfdbbf939191c623e 100644 (file)
@@ -13,20 +13,25 @@ ENDMACRO()
 
 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()
 
index bd710f492b5e9ed3f3c11725fa941f7b4409d8cb..02db58dd7554275341c47302c0d0fedcd0e621ce 100644 (file)
@@ -83,7 +83,7 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
     # 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()
 
@@ -102,7 +102,7 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
     # 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(
       "
@@ -135,14 +135,18 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
       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}
index 78b6895dd8dc01fda2f4b9c90402548f54d11061..08adb21346c8519b0372f3dc74859531cddbd0df 100644 (file)
@@ -30,9 +30,7 @@ STRING(REGEX REPLACE
   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
@@ -52,14 +50,14 @@ ENDFOREACH()
 
 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()

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.