]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Cleanup
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 3 Oct 2012 13:11:23 +0000 (13:11 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 3 Oct 2012 13:11:23 +0000 (13:11 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@26935 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/bundled/CMakeLists.txt
deal.II/cmake/configure/configure_1_mpi.cmake
deal.II/cmake/configure/configure_arpack.cmake
deal.II/cmake/configure/configure_lapack.cmake [moved from deal.II/cmake/configure/configure_1_lapack.cmake with 100% similarity]
deal.II/cmake/configure/configure_umfpack.cmake
deal.II/cmake/setup_compiler_flags.cmake

index abb821f7ee57d7ba17a365381588c93ebaf459e8..b80033cf9dc16cecff75bd3f9e3b19a1c08ad87b 100644 (file)
@@ -81,11 +81,32 @@ ENDIF()
 #
 # UMFPACK, AMD and UFCONFIG:
 #
-SET(FEATURE_UMFPACK_HAVE_BUNDLED TRUE)
-SET(UMFPACK_FOLDER "${CMAKE_SOURCE_DIR}/bundled/umfpack")
-OPTION(DEAL_II_FORCE_BUNDLED_UMFPACK
-  "Always use the bundled umfpack library instead of an external one."
-  OFF)
+
+#
+# We need BLAS as an external dependency. So only define the bundled
+# umfpack library as usable if we actually have blas available...
+# TODO: Cleanup this hack.
+#
+IF(NOT FEATURE_UMFPACK_HAVE_BUNDLED)
+  FIND_PACKAGE(BLAS)
+ENDIF()
+
+IF(BLAS_FOUND)
+  SET(FEATURE_UMFPACK_HAVE_BUNDLED TRUE)
+  SET(UMFPACK_FOLDER "${CMAKE_SOURCE_DIR}/bundled/umfpack")
+  OPTION(DEAL_II_FORCE_BUNDLED_UMFPACK
+    "Always use the bundled umfpack library instead of an external one."
+    OFF)
+  MARK_AS_ADVANCED(
+    atlas_LIBRARY
+    blas_LIBRARY
+    )
+ELSE()
+  MESSAGE(WARNING "\n"
+    "Could not find the BLAS library: "
+    "Disabling bundled UMFPACK\n\n"
+    )
+ENDIF()
 
 IF(FEATURE_UMFPACK_BUNDLED_CONFIGURED)
   ADD_SUBDIRECTORY(${UMFPACK_FOLDER}/UMFPACK/Source)
index c12a77ab5d9069bfbe36d729b72e5e16090e2bd1..ff934f4a9c08b13a03308cd9fec7716176c8d481 100644 (file)
@@ -48,12 +48,11 @@ MACRO(FEATURE_MPI_CONFIGURE_EXTERNAL var)
   LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${MPI_CXX_INCLUDE_PATH})
 
 
-  SET(DEAL_II_SET_MPI_COMPILER ON CACHE BOOL
-    "Set compiler to the detected mpi wrapper"
+  SET(DEAL_II_USE_MPICXX OFF CACHE BOOL
+    "Set the compiler to the detected mpi wrapper"
     )
-  MARK_AS_ADVANCED(DEAL_II_SET_MPI_COMPILER)
 
-  IF(DEAL_II_SET_MPI_COMPILER)
+  IF(DEAL_II_MPICXX)
     SET(CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER})
     SET(CMAKE_C_COMPILER   ${MPI_C_COMPILER})
   ENDIF()
index 8d8f817a343bb21b0674f6e4f1343cbf7152b8f0..8fb96d8a8dfc093f90d92ee4ad0c3c8e108ea9ae 100644 (file)
 #
 
 OPTION(DEAL_II_WITH_ARPACK
-  "Build deal.II with support for doxygen and dot."
+  "Build deal.II with support for arpack."
   OFF)
 
 
-SET(FEATURE_ARPACK_DEPENDS
-  # Currently, with enabled arpack support, we also need to setup
-  # LAPACK support in deal.II:
-  DEAL_II_WITH_LAPACK
-  )
-
 MACRO(FEATURE_ARPACK_FIND_EXTERNAL var)
   FIND_PACKAGE(ARPACK)
 
index 048b33dfd31a23f4d8a1cce508bf273591403179..719aebb1662f27fc0bb685fe710201a29a30c137 100644 (file)
@@ -21,13 +21,6 @@ OPTION(DEAL_II_WITH_UMFPACK
   OFF)
 
 
-SET(FEATURE_UMFPACK_DEPENDS
-  # Currently, with enabled umfpack support, we also need to setup
-  # LAPACK support in deal.II:
-  DEAL_II_WITH_LAPACK
-  )
-
-
 MACRO(FEATURE_UMFPACK_FIND_EXTERNAL var)
   FIND_PACKAGE(UMFPACK)
 
@@ -50,10 +43,9 @@ ENDMACRO()
 
 
 MACRO(FEATURE_UMFPACK_CONFIGURE_BUNDLED var)
-  #
-  # DEAL_II_WITH_LAPACK will pull in an external BLAS library. So no need
-  # to setup something more than bundled UMFPACK here.
-  #
+
+  LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${BLAS_LIBRARIES})
+  ADD_FLAGS(CMAKE_SHARED_LINKER_FLAGS "${BLAS_LINKER_FLAGS}")
 
   INCLUDE_DIRECTORIES(
     ${UMFPACK_FOLDER}/UMFPACK/Include
index 6a9d3c8f72965f2450fe4dc87364cf4f47f68326..d009c30554b821b8ca82546a37a3bb93cbc11473 100644 (file)
@@ -56,8 +56,8 @@
 #
 # So, give a prominent error message in case CC and CXX differ:
 #
-IF(NOT ( ${CMAKE_C_COMPILER_ID} STREQUAL ${CMAKE_CXX_COMPILER_ID} AND
-         ${CMAKE_C_COMPILER_VERSION} STREQUAL ${CMAKE_CXX_COMPILER_VERSION} ) )
+IF(NOT ( "${CMAKE_C_COMPILER_ID}" STREQUAL "${CMAKE_CXX_COMPILER_ID}" AND
+         "${CMAKE_C_COMPILER_VERSION}" STREQUAL "${CMAKE_CXX_COMPILER_VERSION}" ) )
     MESSAGE(SEND_ERROR "\n"
       "Configuration error: The specified C and CXX compiler have to be the "
       "same, but found:\n"

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.