From: Matthias Maier Date: Wed, 5 Aug 2015 18:58:14 +0000 (-0500) Subject: CMake: Add comments for cmake find-module trickery X-Git-Tag: v8.4.0-rc2~673^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1264%2Fhead;p=dealii.git CMake: Add comments for cmake find-module trickery --- diff --git a/cmake/modules/FindBOOST.cmake b/cmake/modules/FindBOOST.cmake index 827c5cb8cd..059466d723 100644 --- a/cmake/modules/FindBOOST.cmake +++ b/cmake/modules/FindBOOST.cmake @@ -41,6 +41,7 @@ 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/) FIND_PACKAGE(Boost 1.48 COMPONENTS iostreams serialization system thread) LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/) @@ -50,6 +51,8 @@ LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/) # IF(NOT Boost_FOUND AND Boost_USE_STATIC_LIBS) SET(Boost_USE_STATIC_LIBS FALSE) + + # temporarily disable ${CMAKE_SOURCE_DIR}/cmake/modules for module lookup LIST(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/) FIND_PACKAGE(Boost 1.48 COMPONENTS iostreams serialization system thread) LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/) diff --git a/cmake/modules/FindBZIP2.cmake b/cmake/modules/FindBZIP2.cmake index e8f0cf5c5a..fa8cee7938 100644 --- a/cmake/modules/FindBZIP2.cmake +++ b/cmake/modules/FindBZIP2.cmake @@ -29,6 +29,7 @@ # original find module and do a dummy call to DEAL_II_PACKAGE_HANDLE: # +# temporarily disable ${CMAKE_SOURCE_DIR}/cmake/modules for module lookup LIST(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/) FIND_PACKAGE(BZip2) LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/) diff --git a/cmake/modules/FindLAPACK.cmake b/cmake/modules/FindLAPACK.cmake index 97642f1fe3..001e5ce948 100644 --- a/cmake/modules/FindLAPACK.cmake +++ b/cmake/modules/FindLAPACK.cmake @@ -1,6 +1,6 @@ ## --------------------------------------------------------------------- ## -## Copyright (C) 2013 - 2014 by the deal.II authors +## Copyright (C) 2013 - 2015 by the deal.II authors ## ## This file is part of the deal.II library. ## @@ -37,6 +37,8 @@ SET_IF_EMPTY(BLAS_DIR "$ENV{BLAS_DIR}") 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}) diff --git a/cmake/modules/FindMPI.cmake b/cmake/modules/FindMPI.cmake index f37820d582..cbdf0e08b8 100644 --- a/cmake/modules/FindMPI.cmake +++ b/cmake/modules/FindMPI.cmake @@ -1,6 +1,6 @@ ## --------------------------------------------------------------------- ## -## Copyright (C) 2012 - 2014 by the deal.II authors +## Copyright (C) 2012 - 2015 by the deal.II authors ## ## This file is part of the deal.II library. ## @@ -62,6 +62,8 @@ ENDIF() # # Call the system FindMPI.cmake module: # + +# temporarily disable ${CMAKE_SOURCE_DIR}/cmake/modules for module lookup LIST(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/) FIND_PACKAGE(MPI) diff --git a/cmake/modules/FindZLIB.cmake b/cmake/modules/FindZLIB.cmake index 0ae272ffca..7c239f525b 100644 --- a/cmake/modules/FindZLIB.cmake +++ b/cmake/modules/FindZLIB.cmake @@ -26,15 +26,10 @@ SET(ZLIB_DIR "" CACHE PATH "An optional hint to a ZLIB installation") SET_IF_EMPTY(ZLIB_DIR "$ENV{ZLIB_DIR}") -# -# Houston, we have a problem: CMake ships its own FindZLIB.cmake module. -# Unfortunately we want to call DEAL_II_PACKAGE_HANDLE. Therefore, use the -# original find module and do a dummy call to DEAL_II_PACKAGE_HANDLE: -# - 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/)