From: Matthias Maier Date: Wed, 28 May 2014 15:10:48 +0000 (+0000) Subject: Revert "CMake: Bugfix, do not override internal CMake calls" X-Git-Tag: v8.2.0-rc1~445 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=853842c3ad113567c3996faf58a1cce2e4701037;p=dealii.git Revert "CMake: Bugfix, do not override internal CMake calls" So close, but yet completely wrong. git-svn-id: https://svn.dealii.org/trunk@32984 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/configure/configure_1_lapack.cmake b/deal.II/cmake/configure/configure_1_lapack.cmake index ca26b4c2ef..f8c3ff1a21 100644 --- a/deal.II/cmake/configure/configure_1_lapack.cmake +++ b/deal.II/cmake/configure/configure_1_lapack.cmake @@ -19,7 +19,7 @@ # MACRO(FEATURE_LAPACK_FIND_EXTERNAL var) - DEAL_II_FIND_PACKAGE(LAPACK) + FIND_PACKAGE(LAPACK) # # We do a check for availability of every single LAPACK function we use. diff --git a/deal.II/cmake/configure/configure_1_threads.cmake b/deal.II/cmake/configure/configure_1_threads.cmake index d91be04339..f07f29725d 100644 --- a/deal.II/cmake/configure/configure_1_threads.cmake +++ b/deal.II/cmake/configure/configure_1_threads.cmake @@ -34,7 +34,7 @@ MACRO(SETUP_THREADING) CLEAR_CMAKE_REQUIRED() SWITCH_LIBRARY_PREFERENCE() - DEAL_II_FIND_PACKAGE(Threads) + FIND_PACKAGE(Threads) SWITCH_LIBRARY_PREFERENCE() RESET_CMAKE_REQUIRED() @@ -134,7 +134,7 @@ ENDMACRO() # MACRO(FEATURE_THREADS_FIND_EXTERNAL var) - DEAL_II_FIND_PACKAGE(TBB) + FIND_PACKAGE(TBB) IF(TBB_FOUND) SET(${var} TRUE) diff --git a/deal.II/cmake/configure/configure_2_metis.cmake b/deal.II/cmake/configure/configure_2_metis.cmake index 247560d5e5..4d499c0d60 100644 --- a/deal.II/cmake/configure/configure_2_metis.cmake +++ b/deal.II/cmake/configure/configure_2_metis.cmake @@ -21,7 +21,7 @@ SET(FEATURE_METIS_AFTER MPI) # MACRO(FEATURE_METIS_FIND_EXTERNAL var) - DEAL_II_FIND_PACKAGE(METIS) + FIND_PACKAGE(METIS) IF(METIS_FOUND) SET(${var} TRUE) diff --git a/deal.II/cmake/configure/configure_2_trilinos.cmake b/deal.II/cmake/configure/configure_2_trilinos.cmake index e7366f0940..a79505384b 100644 --- a/deal.II/cmake/configure/configure_2_trilinos.cmake +++ b/deal.II/cmake/configure/configure_2_trilinos.cmake @@ -20,7 +20,7 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var) - DEAL_II_FIND_PACKAGE(TRILINOS) + FIND_PACKAGE(TRILINOS) IF(TRILINOS_FOUND) # diff --git a/deal.II/cmake/configure/configure_3_petsc.cmake b/deal.II/cmake/configure/configure_3_petsc.cmake index 0099a0e27d..662c30f8a3 100644 --- a/deal.II/cmake/configure/configure_3_petsc.cmake +++ b/deal.II/cmake/configure/configure_3_petsc.cmake @@ -22,7 +22,7 @@ SET(FEATURE_PETSC_AFTER MPI) MACRO(FEATURE_PETSC_FIND_EXTERNAL var) - DEAL_II_FIND_PACKAGE(PETSC) + FIND_PACKAGE(PETSC) IF(PETSC_FOUND) # diff --git a/deal.II/cmake/configure/configure_hdf5.cmake b/deal.II/cmake/configure/configure_hdf5.cmake index 57c653410f..6a335a232c 100644 --- a/deal.II/cmake/configure/configure_hdf5.cmake +++ b/deal.II/cmake/configure/configure_hdf5.cmake @@ -22,7 +22,7 @@ SET(FEATURE_HDF5_AFTER MPI) MACRO(FEATURE_HDF5_FIND_EXTERNAL var) - DEAL_II_FIND_PACKAGE(HDF5) + FIND_PACKAGE(HDF5) IF(HDF5_FOUND) SET(${var} TRUE) diff --git a/deal.II/cmake/configure/configure_mumps.cmake b/deal.II/cmake/configure/configure_mumps.cmake index 39b9a2037c..ce1d2652b1 100644 --- a/deal.II/cmake/configure/configure_mumps.cmake +++ b/deal.II/cmake/configure/configure_mumps.cmake @@ -22,7 +22,7 @@ SET(FEATURE_MUMPS_DEPENDS MPI LAPACK) MACRO(FEATURE_MUMPS_FIND_EXTERNAL var) - DEAL_II_FIND_PACKAGE(MUMPS) + FIND_PACKAGE(MUMPS) IF(MUMPS_FOUND) SET(${var} TRUE) diff --git a/deal.II/cmake/configure/configure_p4est.cmake b/deal.II/cmake/configure/configure_p4est.cmake index 3208c4a184..25acd30d86 100644 --- a/deal.II/cmake/configure/configure_p4est.cmake +++ b/deal.II/cmake/configure/configure_p4est.cmake @@ -22,7 +22,7 @@ SET(FEATURE_P4EST_DEPENDS MPI) MACRO(FEATURE_P4EST_FIND_EXTERNAL var) - DEAL_II_FIND_PACKAGE(P4EST) + FIND_PACKAGE(P4EST) IF(P4EST_FOUND) SET(${var} TRUE) diff --git a/deal.II/cmake/configure/configure_slepc.cmake b/deal.II/cmake/configure/configure_slepc.cmake index a2489ccfcb..c300f7ea7b 100644 --- a/deal.II/cmake/configure/configure_slepc.cmake +++ b/deal.II/cmake/configure/configure_slepc.cmake @@ -22,7 +22,7 @@ SET(FEATURE_SLEPC_DEPENDS PETSC) MACRO(FEATURE_SLEPC_FIND_EXTERNAL var) - DEAL_II_FIND_PACKAGE(SLEPC) + FIND_PACKAGE(SLEPC) IF(SLEPC_FOUND) # diff --git a/deal.II/cmake/macros/macro_configure_feature.cmake b/deal.II/cmake/macros/macro_configure_feature.cmake index 4be1806ce8..2c1277d6ae 100644 --- a/deal.II/cmake/macros/macro_configure_feature.cmake +++ b/deal.II/cmake/macros/macro_configure_feature.cmake @@ -133,7 +133,7 @@ ENDMACRO() # Default macro for finding an external library: # MACRO(FEATURE_FIND_EXTERNAL _feature _var) - DEAL_II_FIND_PACKAGE(${_feature}) + FIND_PACKAGE(${_feature}) IF(${_feature}_FOUND) SET(${_var} TRUE) ENDIF() diff --git a/deal.II/cmake/macros/macro_deal_ii_find_package.cmake b/deal.II/cmake/macros/macro_find_package.cmake similarity index 88% rename from deal.II/cmake/macros/macro_deal_ii_find_package.cmake rename to deal.II/cmake/macros/macro_find_package.cmake index 70f52d6c9a..c7e65fbe85 100644 --- a/deal.II/cmake/macros/macro_deal_ii_find_package.cmake +++ b/deal.II/cmake/macros/macro_find_package.cmake @@ -1,7 +1,7 @@ ## --------------------------------------------------------------------- ## $Id$ ## -## Copyright (C) 2013 - 2014 by the deal.II authors +## Copyright (C) 2013 by the deal.II authors ## ## This file is part of the deal.II library. ## @@ -20,12 +20,12 @@ # ${package}_FOUND and ${package}_LIBRARIES to allow easy custom overrides # -MACRO(DEAL_II_FIND_PACKAGE _package_name) +MACRO(FIND_PACKAGE _package_name) STRING(TOUPPER ${_package_name} _package_name_uppercase) IF( NOT DEFINED ${_package_name_uppercase}_FOUND AND NOT DEFINED ${_package_name_uppercase}_LIBRARIES ) - FIND_PACKAGE (${_package_name} ${ARGN}) + _FIND_PACKAGE (${_package_name} ${ARGN}) ELSE() IF(NOT DEFINED ${_package_name_uppercase}_FOUND) SET(${_package_name_uppercase}_FOUND TRUE) diff --git a/deal.II/cmake/modules/FindBOOST.cmake b/deal.II/cmake/modules/FindBOOST.cmake index 7fce37b311..b14b063f7c 100644 --- a/deal.II/cmake/modules/FindBOOST.cmake +++ b/deal.II/cmake/modules/FindBOOST.cmake @@ -42,14 +42,14 @@ IF(NOT BUILD_SHARED_LIBS) SET(Boost_USE_STATIC_LIBS TRUE) ENDIF() -DEAL_II_FIND_PACKAGE(Boost 1.44 COMPONENTS iostreams serialization system thread) +FIND_PACKAGE(Boost 1.44 COMPONENTS iostreams serialization system thread) # # Fall back to dynamic libraries if no static libraries could be found: # IF(NOT Boost_FOUND AND Boost_USE_STATIC_LIBS) SET(Boost_USE_STATIC_LIBS FALSE) - DEAL_II_FIND_PACKAGE(Boost 1.44 COMPONENTS iostreams serialization system thread) + FIND_PACKAGE(Boost 1.44 COMPONENTS iostreams serialization system thread) ENDIF() IF(Boost_FOUND) diff --git a/deal.II/cmake/modules/FindBZIP2.cmake b/deal.II/cmake/modules/FindBZIP2.cmake index eebd11b1ea..e6f7cbded2 100644 --- a/deal.II/cmake/modules/FindBZIP2.cmake +++ b/deal.II/cmake/modules/FindBZIP2.cmake @@ -31,7 +31,7 @@ # LIST(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/) -DEAL_II_FIND_PACKAGE(BZip2) +FIND_PACKAGE(BZip2) LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/) SET(BZIP2_VERSION ${BZIP2_VERSION_STRING}) diff --git a/deal.II/cmake/modules/FindLAPACK.cmake b/deal.II/cmake/modules/FindLAPACK.cmake index 39834d4157..20b996f377 100644 --- a/deal.II/cmake/modules/FindLAPACK.cmake +++ b/deal.II/cmake/modules/FindLAPACK.cmake @@ -41,10 +41,10 @@ SET(_cmake_prefix_path_backup "${CMAKE_PREFIX_PATH}") LIST(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/) SET(CMAKE_PREFIX_PATH ${BLAS_DIR} ${LAPACK_DIR} ${_cmake_prefix_path_backup}) -DEAL_II_FIND_PACKAGE(BLAS) +FIND_PACKAGE(BLAS) SET(CMAKE_PREFIX_PATH ${LAPACK_DIR} ${_cmake_prefix_path_backup}) -DEAL_II_FIND_PACKAGE(LAPACK) +FIND_PACKAGE(LAPACK) SET(CMAKE_PREFIX_PATH ${_cmake_prefix_path_backup}) LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/) diff --git a/deal.II/cmake/modules/FindMPI.cmake b/deal.II/cmake/modules/FindMPI.cmake index 352889eeb9..111c75a58e 100644 --- a/deal.II/cmake/modules/FindMPI.cmake +++ b/deal.II/cmake/modules/FindMPI.cmake @@ -64,7 +64,7 @@ ENDIF() # Call the system FindMPI.cmake module: # LIST(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/) -DEAL_II_FIND_PACKAGE(MPI) +FIND_PACKAGE(MPI) IF(NOT MPI_CXX_FOUND AND DEAL_II_WITH_MPI) # @@ -76,12 +76,12 @@ IF(NOT MPI_CXX_FOUND AND DEAL_II_WITH_MPI) "MPI not found but DEAL_II_WITH_MPI is set to TRUE." " Try again with more aggressive search paths:" ) - # Clear variables so that DEAL_II_FIND_PACKAGE runs again: + # Clear variables so that FIND_PACKAGE runs again: SET(MPI_FOUND) UNSET(MPI_CXX_COMPILER CACHE) UNSET(MPI_C_COMPILER CACHE) UNSET(MPI_Fortran_COMPILER CACHE) - DEAL_II_FIND_PACKAGE(MPI) + FIND_PACKAGE(MPI) ENDIF() LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/) diff --git a/deal.II/cmake/modules/FindTRILINOS.cmake b/deal.II/cmake/modules/FindTRILINOS.cmake index 4fb97c618f..6fc8c408d4 100644 --- a/deal.II/cmake/modules/FindTRILINOS.cmake +++ b/deal.II/cmake/modules/FindTRILINOS.cmake @@ -37,7 +37,7 @@ SET_IF_EMPTY(TRILINOS_DIR "$ENV{TRILINOS_DIR}") # # Include the trilinos package configuration: # -DEAL_II_FIND_PACKAGE(TRILINOS_CONFIG +FIND_PACKAGE(TRILINOS_CONFIG CONFIG QUIET NAMES Trilinos TRILINOS HINTS diff --git a/deal.II/cmake/modules/FindZLIB.cmake b/deal.II/cmake/modules/FindZLIB.cmake index 3378409601..a3ecfe357d 100644 --- a/deal.II/cmake/modules/FindZLIB.cmake +++ b/deal.II/cmake/modules/FindZLIB.cmake @@ -37,7 +37,7 @@ IF(NOT "${ZLIB_DIR}" STREQUAL "") SET(ZLIB_ROOT ${ZLIB_DIR}) ENDIF() LIST(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/) -DEAL_II_FIND_PACKAGE(ZLIB) +FIND_PACKAGE(ZLIB) LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/) SET(ZLIB_VERSION ${ZLIB_VERSION_STRING}) diff --git a/deal.II/doc/developers/cmake-internals.html b/deal.II/doc/developers/cmake-internals.html index 877c71dd94..dad7505cfb 100644 --- a/deal.II/doc/developers/cmake-internals.html +++ b/deal.II/doc/developers/cmake-internals.html @@ -461,7 +461,7 @@ FEATURE_<FEATURE>_FIND_EXTERNAL(var) (a macro) fulfilled. In this case all necessary variables for FEATURE_<FEATURE>_CONFIGURE_EXTERNAL must be set. Otherwise var should remain unset. - If this macro is undefined, DEAL_II_FIND_PACKAGE(<FEATURES>) is + If this macro is undefined, FIND_PACKAGE(<FEATURES>) is called directly instead. FEATURE_<FEATURE>_CONFIGURE_EXTERNAL() (a macro) diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 2089a1a57d..28bcd0d1e7 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -148,13 +148,6 @@ inconvenience this causes.

Specific improvements

    -
  1. Bugfix: CMake: Do not override external functions like FIND_PACKAGE - but use a different name DEAL_II_FIND_PACKAGE instead. This avoids a - deadlock (with final segfault) on some newer CMake versions. -
    - (Matthias Maier, 2014/05/28) -
  2. -
  3. Improved: CMake: Search results and error conditions for external libraries are now much more verbose. Added an MPI sanity check.