]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: remove CMAKE_MODULE_PATH workarounds 14472/head
authorMatthias Maier <tamiko@43-1.org>
Fri, 25 Nov 2022 13:21:20 +0000 (07:21 -0600)
committerMatthias Maier <tamiko@43-1.org>
Fri, 25 Nov 2022 21:40:35 +0000 (15:40 -0600)
cmake/modules/FindDEAL_II_BOOST.cmake
cmake/modules/FindDEAL_II_CGAL.cmake
cmake/modules/FindDEAL_II_CUDA.cmake
cmake/modules/FindDEAL_II_HDF5.cmake
cmake/modules/FindDEAL_II_KOKKOS.cmake
cmake/modules/FindDEAL_II_LAPACK.cmake
cmake/modules/FindDEAL_II_MPI.cmake
cmake/modules/FindDEAL_II_SYMENGINE.cmake
cmake/modules/FindDEAL_II_ZLIB.cmake

index ebdfcd9a999cee85d7dbd90dcbf6eca3f739ee58..d65dc516c0419ba445b3fc395615457ca17bb780 100644 (file)
@@ -48,9 +48,6 @@ if(NOT BUILD_SHARED_LIBS)
   set(Boost_USE_STATIC_LIBS TRUE)
 endif()
 
-# temporarily disable ${CMAKE_SOURCE_DIR}/cmake/modules for module lookup
-list(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
-
 # Work around a CMake compatibility issue with boost-1.70.0
 # compare https://gitlab.kitware.com/cmake/cmake/issues/18865
 # and https://lists.boost.org/Archives/boost/2019/02/245016.php
@@ -65,7 +62,6 @@ else()
     serialization system thread
     )
 endif()
-list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
 
 #
 # Fall back to dynamic libraries if no static libraries could be found:
index 584d8531897acba4d0e94aba7d337f2fb7fdec0e..eb7635cdbf94cbc3e40a56f9d63702ad4c83f996 100644 (file)
@@ -37,8 +37,6 @@ endif()
 # fail cracefully:
 #
 if(DEAL_II_HAVE_CXX17 AND NOT FEATURE_BOOST_BUNDLED_CONFIGURED)
-  # temporarily disable ${CMAKE_SOURCE_DIR}/cmake/modules for module lookup
-  list(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
   set(CGAL_DO_NOT_WARN_ABOUT_CMAKE_BUILD_TYPE ON)
   find_package(CGAL QUIET)
 
@@ -50,8 +48,6 @@ if(DEAL_II_HAVE_CXX17 AND NOT FEATURE_BOOST_BUNDLED_CONFIGURED)
     message(STATUS "CGAL wrappers require CGAL version 5 and above.")
   endif()
 
-  list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
-
   if(CGAL_FOUND)
     get_target_property(CGAL_LIBRARIES CGAL::CGAL INTERFACE_LINK_LIBRARIES)
 
index 20efb60b71a4c2a5ed5708995441c9db9b29ffd9..2a9174fa6a7c222c076bcdde5620fd29815a65a0 100644 (file)
@@ -34,10 +34,7 @@ if(NOT "${CUDA_DIR}" STREQUAL "")
   set(CUDA_TOOLKIT_ROOT_DIR "${CUDA_DIR}")
 endif()
 
-# temporarily disable ${CMAKE_SOURCE_DIR}/cmake/modules for module lookup
-list(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
 find_package(CUDA)
-list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
 
 if(CUDA_FOUND)
   message(STATUS "Configured to use CUDA installation at ${CUDA_TOOLKIT_ROOT_DIR}")
index a40aed85300826055e2ff42767df8a74a30045f6..b8918cfe7a9b050dc75c3c78684072b3bf028c24 100644 (file)
@@ -26,9 +26,6 @@
 set(HDF5_DIR "" CACHE PATH "An optional hint to an hdf5 directory")
 set_if_empty(HDF5_DIR "$ENV{HDF5_DIR}")
 
-# temporarily disable ${CMAKE_SOURCE_DIR}/cmake/modules for module lookup
-list(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
-
 if(NOT "${HDF5_DIR}" STREQUAL "")
   set(HDF5_ROOT "${HDF5_DIR}")
 endif()
@@ -36,8 +33,6 @@ endif()
 set(HDF5_PREFER_PARALLEL TRUE)
 find_package(HDF5)
 
-list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
-
 set(_include_dirs "${HDF5_INCLUDE_DIRS}")
 set(_libraries "${HDF5_LIBRARIES};${HDF5_HL_LIBRARIES}")
 
index 6ef4b0115a0f89384df6565ded7a6a59350f5fc6..2c4ba337213596e371b2adb9f052e57efda08a52 100644 (file)
@@ -32,12 +32,9 @@ if(DEAL_II_TRILINOS_WITH_KOKKOS)
   # Let deal.II know that we have found Kokkos
   set(KOKKOS_FOUND ON)
 else()
-  # temporarily disable ${CMAKE_SOURCE_DIR}/cmake/modules for module lookup
-  list(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
   find_package(Kokkos 3.7.0 QUIET
     HINTS ${KOKKOS_DIR} ${Kokkos_DIR} $ENV{Kokkos_DIR}
     )
-  list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
 
   if(Kokkos_FOUND)
     # We are only interested in Kokkos if it is not part of Trilinos
index 6b39f3cb332088e37410aa10e124af7eb17886b9..aa60e6edf39e553d957ff11719cb20e1cc988d04 100644 (file)
@@ -44,9 +44,6 @@ set_if_empty(LAPACK_DIR "$ENV{LAPACK_DIR}")
 
 set(_cmake_prefix_path_backup "${CMAKE_PREFIX_PATH}")
 
-# temporarily disable ${CMAKE_SOURCE_DIR}/cmake/modules for module lookup
-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)
 
@@ -54,7 +51,6 @@ set(CMAKE_PREFIX_PATH ${LAPACK_DIR} ${_cmake_prefix_path_backup})
 find_package(LAPACK)
 
 set(CMAKE_PREFIX_PATH ${_cmake_prefix_path_backup})
-list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
 
 #
 # Filter out spurious "FALSE" in the library lists:
index bf31acf82b0bd164ac9aa4374adec59684a1bbd6..847ed364f545b9b49127242f45aa7bc4585d5a77 100644 (file)
@@ -50,10 +50,7 @@ if(DEFINED ENV{MPIEXEC})
   find_program(MPIEXEC $ENV{MPIEXEC})
 endif()
 
-# temporarily disable ${CMAKE_SOURCE_DIR}/cmake/modules for module lookup
-list(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
 find_package(MPI)
-list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
 
 #
 # Older versions of MPI may not have MPI_SEEK_SET, which we
index 0c7fdb611e1440df610a81d61f163831daa98d31..c7b49df206192866ba8738a30f5edf14101f1a41 100644 (file)
@@ -30,7 +30,7 @@ set_if_empty(SYMENGINE_DIR "$ENV{SYMENGINE_DIR}")
 # SymEngine overwrites the CMake module path, so we save
 # and restore it after this library is found and configured.
 #
-set (DEAL_II_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
+set(_cmake_module_path ${CMAKE_MODULE_PATH})
 
 #
 # Include the SymEngine:
@@ -45,7 +45,7 @@ find_package(SymEngine
 #
 # Reset the CMake module path
 #
-set (CMAKE_MODULE_PATH ${DEAL_II_CMAKE_MODULE_PATH})
+set(CMAKE_MODULE_PATH ${_cmake_module_path})
 
 
 #
index e6654a13a06c9c780a20baf863dba3db7ec6bbb1..7d6f01811cfa79d431c83cfac44b04729d917961 100644 (file)
@@ -29,10 +29,7 @@ set_if_empty(ZLIB_DIR "$ENV{ZLIB_DIR}")
 if(NOT "${ZLIB_DIR}" STREQUAL "")
   set(ZLIB_ROOT ${ZLIB_DIR})
 endif()
-# temporarily disable ${CMAKE_SOURCE_DIR}/cmake/modules for module lookup
-list(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
 find_package(ZLIB)
-list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
 
 set(ZLIB_VERSION ${ZLIB_VERSION_STRING})
 

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.