]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
CMake: Bugfix, do not override internal CMake calls
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 28 May 2014 14:23:05 +0000 (14:23 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 28 May 2014 14:23:05 +0000 (14:23 +0000)
I turns out that overriding FIND_PACKAGE and calling into _FIND_PACKAGE is
not really stable

git-svn-id: https://svn.dealii.org/trunk@32982 0785d39b-7218-0410-832d-ea1e28bc413d

18 files changed:
deal.II/cmake/configure/configure_1_lapack.cmake
deal.II/cmake/configure/configure_1_threads.cmake
deal.II/cmake/configure/configure_2_metis.cmake
deal.II/cmake/configure/configure_2_trilinos.cmake
deal.II/cmake/configure/configure_3_petsc.cmake
deal.II/cmake/configure/configure_hdf5.cmake
deal.II/cmake/configure/configure_mumps.cmake
deal.II/cmake/configure/configure_p4est.cmake
deal.II/cmake/configure/configure_slepc.cmake
deal.II/cmake/macros/macro_configure_feature.cmake
deal.II/cmake/macros/macro_deal_ii_find_package.cmake [moved from deal.II/cmake/macros/macro_find_package.cmake with 88% similarity]
deal.II/cmake/modules/FindBOOST.cmake
deal.II/cmake/modules/FindBZIP2.cmake
deal.II/cmake/modules/FindLAPACK.cmake
deal.II/cmake/modules/FindMPI.cmake
deal.II/cmake/modules/FindTRILINOS.cmake
deal.II/cmake/modules/FindZLIB.cmake
deal.II/doc/developers/cmake-internals.html

index f8c3ff1a21a2d5a52e8eede16f4add15d2c22340..ca26b4c2ef65b48169cc70594a7034706d98cc65 100644 (file)
@@ -19,7 +19,7 @@
 #
 
 MACRO(FEATURE_LAPACK_FIND_EXTERNAL var)
-  FIND_PACKAGE(LAPACK)
+  DEAL_II_FIND_PACKAGE(LAPACK)
 
   #
   # We do a check for availability of every single LAPACK function we use.
index f07f29725d8aa4363fea328d759795aec48c00fd..d91be043392b78f5428b6e45b0248e6b7794edf3 100644 (file)
@@ -34,7 +34,7 @@ MACRO(SETUP_THREADING)
     CLEAR_CMAKE_REQUIRED()
 
     SWITCH_LIBRARY_PREFERENCE()
-    FIND_PACKAGE(Threads)
+    DEAL_II_FIND_PACKAGE(Threads)
     SWITCH_LIBRARY_PREFERENCE()
 
     RESET_CMAKE_REQUIRED()
@@ -134,7 +134,7 @@ ENDMACRO()
 #
 
 MACRO(FEATURE_THREADS_FIND_EXTERNAL var)
-  FIND_PACKAGE(TBB)
+  DEAL_II_FIND_PACKAGE(TBB)
 
   IF(TBB_FOUND)
     SET(${var} TRUE)
index 4d499c0d6088064e99511a187073137fe3165e46..247560d5e554ac9104679c83fab6a099b030912a 100644 (file)
@@ -21,7 +21,7 @@ SET(FEATURE_METIS_AFTER MPI)
 #
 
 MACRO(FEATURE_METIS_FIND_EXTERNAL var)
-  FIND_PACKAGE(METIS)
+  DEAL_II_FIND_PACKAGE(METIS)
 
   IF(METIS_FOUND)
     SET(${var} TRUE)
index a79505384bc7ae189fac33c7cf157d202b6b9629..e7366f094058a7c6eb0a15376b38ddd469ecc6a3 100644 (file)
@@ -20,7 +20,7 @@
 
 
 MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
-  FIND_PACKAGE(TRILINOS)
+  DEAL_II_FIND_PACKAGE(TRILINOS)
 
   IF(TRILINOS_FOUND)
     #
index 662c30f8a348b6ebbcd1dff457fb09a25a0fac53..0099a0e27d4099cb710eea4586ab0d330fbfdbda 100644 (file)
@@ -22,7 +22,7 @@ SET(FEATURE_PETSC_AFTER MPI)
 
 
 MACRO(FEATURE_PETSC_FIND_EXTERNAL var)
-  FIND_PACKAGE(PETSC)
+  DEAL_II_FIND_PACKAGE(PETSC)
 
   IF(PETSC_FOUND)
     #
index 6a335a232c20aaa0304d02fbf4f87c00f817955f..57c653410ff7055f58bde8e7f3173b8cc3563264 100644 (file)
@@ -22,7 +22,7 @@ SET(FEATURE_HDF5_AFTER MPI)
 
 
 MACRO(FEATURE_HDF5_FIND_EXTERNAL var)
-  FIND_PACKAGE(HDF5)
+  DEAL_II_FIND_PACKAGE(HDF5)
 
   IF(HDF5_FOUND)
     SET(${var} TRUE)
index ce1d2652b10b4a50073bda70e578a6c716b66136..39b9a2037cb3ec740ab183df92030277979de8c5 100644 (file)
@@ -22,7 +22,7 @@ SET(FEATURE_MUMPS_DEPENDS MPI LAPACK)
 
 
 MACRO(FEATURE_MUMPS_FIND_EXTERNAL var)
-  FIND_PACKAGE(MUMPS)
+  DEAL_II_FIND_PACKAGE(MUMPS)
 
   IF(MUMPS_FOUND)
     SET(${var} TRUE)
index 25acd30d862478b6cf1b3f01d4eb761aee7bf7e9..3208c4a184bb4c0b1c87d4e17791272eabe9690a 100644 (file)
@@ -22,7 +22,7 @@ SET(FEATURE_P4EST_DEPENDS MPI)
 
 
 MACRO(FEATURE_P4EST_FIND_EXTERNAL var)
-  FIND_PACKAGE(P4EST)
+  DEAL_II_FIND_PACKAGE(P4EST)
 
   IF(P4EST_FOUND)
     SET(${var} TRUE)
index c300f7ea7bfd6fc3269e1038154c6ca218f06b8e..a2489ccfcb384e1a35377e4399b1ba0c2c7255b8 100644 (file)
@@ -22,7 +22,7 @@ SET(FEATURE_SLEPC_DEPENDS PETSC)
 
 
 MACRO(FEATURE_SLEPC_FIND_EXTERNAL var)
-  FIND_PACKAGE(SLEPC)
+  DEAL_II_FIND_PACKAGE(SLEPC)
 
   IF(SLEPC_FOUND)
     #
index 2c1277d6ae439d7846b0b56e9f31e97c4af3a28f..4be1806ce87b26c46f9bc14dfd693ed24af17ce7 100644 (file)
@@ -133,7 +133,7 @@ ENDMACRO()
 # Default macro for finding an external library:
 #
 MACRO(FEATURE_FIND_EXTERNAL _feature _var)
-  FIND_PACKAGE(${_feature})
+  DEAL_II_FIND_PACKAGE(${_feature})
   IF(${_feature}_FOUND)
     SET(${_var} TRUE)
   ENDIF()
similarity index 88%
rename from deal.II/cmake/macros/macro_find_package.cmake
rename to deal.II/cmake/macros/macro_deal_ii_find_package.cmake
index c7e65fbe8502710984a63f24177871637cadc52a..70f52d6c9a0c60d07d1e5cd9eae0603a734f22e3 100644 (file)
@@ -1,7 +1,7 @@
 ## ---------------------------------------------------------------------
 ## $Id$
 ##
-## Copyright (C) 2013 by the deal.II authors
+## Copyright (C) 2013 - 2014 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
 # ${package}_FOUND and ${package}_LIBRARIES to allow easy custom overrides
 #
 
-MACRO(FIND_PACKAGE _package_name)
+MACRO(DEAL_II_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)
index b14b063f7ca6d1079ff848b23f6341fce8ca93a9..7fce37b311fa09b641de42eb6f17481667767b46 100644 (file)
@@ -42,14 +42,14 @@ IF(NOT BUILD_SHARED_LIBS)
   SET(Boost_USE_STATIC_LIBS TRUE)
 ENDIF()
 
-FIND_PACKAGE(Boost 1.44 COMPONENTS iostreams serialization system thread)
+DEAL_II_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)
-  FIND_PACKAGE(Boost 1.44 COMPONENTS iostreams serialization system thread)
+  DEAL_II_FIND_PACKAGE(Boost 1.44 COMPONENTS iostreams serialization system thread)
 ENDIF()
 
 IF(Boost_FOUND)
index e6f7cbded276184a28c360e22371c0fa3720c5d2..eebd11b1ea3bc4b9fe8409b7bc96d3fa3a7a53d1 100644 (file)
@@ -31,7 +31,7 @@
 #
 
 LIST(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
-FIND_PACKAGE(BZip2)
+DEAL_II_FIND_PACKAGE(BZip2)
 LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
 
 SET(BZIP2_VERSION ${BZIP2_VERSION_STRING})
index 20b996f377c547478084ce683c104d809d015407..39834d41572394bed6da2175f9c2e6c0cdf774ed 100644 (file)
@@ -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})
-FIND_PACKAGE(BLAS)
+DEAL_II_FIND_PACKAGE(BLAS)
 
 SET(CMAKE_PREFIX_PATH ${LAPACK_DIR} ${_cmake_prefix_path_backup})
-FIND_PACKAGE(LAPACK)
+DEAL_II_FIND_PACKAGE(LAPACK)
 
 SET(CMAKE_PREFIX_PATH ${_cmake_prefix_path_backup})
 LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
index 111c75a58e869ba6af75e249a610afddf399269b..352889eeb93cbfeebe08c1c5a10c38ecc3161c67 100644 (file)
@@ -64,7 +64,7 @@ ENDIF()
 # Call the system FindMPI.cmake module:
 #
 LIST(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
-FIND_PACKAGE(MPI)
+DEAL_II_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 FIND_PACKAGE runs again:
+  # Clear variables so that DEAL_II_FIND_PACKAGE runs again:
   SET(MPI_FOUND)
   UNSET(MPI_CXX_COMPILER CACHE)
   UNSET(MPI_C_COMPILER CACHE)
   UNSET(MPI_Fortran_COMPILER CACHE)
-  FIND_PACKAGE(MPI)
+  DEAL_II_FIND_PACKAGE(MPI)
 ENDIF()
 LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
 
index 6fc8c408d4db01e6504bc4399b486a9e5357ef63..4fb97c618f79048cd60c190d1a62845d6b518ea9 100644 (file)
@@ -37,7 +37,7 @@ SET_IF_EMPTY(TRILINOS_DIR "$ENV{TRILINOS_DIR}")
 #
 # Include the trilinos package configuration:
 #
-FIND_PACKAGE(TRILINOS_CONFIG
+DEAL_II_FIND_PACKAGE(TRILINOS_CONFIG
   CONFIG QUIET
   NAMES Trilinos TRILINOS
   HINTS
index a3ecfe357da8c21eae87a2fa8f40972df042fe0b..3378409601940f70c0eff6303105c0a21f36edde 100644 (file)
@@ -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/)
-FIND_PACKAGE(ZLIB)
+DEAL_II_FIND_PACKAGE(ZLIB)
 LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
 
 SET(ZLIB_VERSION ${ZLIB_VERSION_STRING})
index dad7505cfb3a4f6e6e08c098ee77d32b44513af7..877c71dd94095600e775a6d5d7c3f6126e37dc6e 100644 (file)
@@ -461,7 +461,7 @@ FEATURE_&lt;FEATURE&gt;_FIND_EXTERNAL(var)   (a macro)
     fulfilled. In this case all necessary variables for
     FEATURE_&lt;FEATURE&gt;_CONFIGURE_EXTERNAL must be set.
     Otherwise var should remain unset.
-    If this macro is undefined, FIND_PACKAGE(&lt;FEATURES&gt;) is
+    If this macro is undefined, DEAL_II_FIND_PACKAGE(&lt;FEATURES&gt;) is
     called directly instead.
 
 FEATURE_&lt;FEATURE&gt;_CONFIGURE_EXTERNAL()  (a macro)

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.