From 65105f78fc90943d0f2f41c3ff8a06674ac41963 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Tue, 22 Dec 2020 20:15:09 -0600 Subject: [PATCH] CMake: findGINKGO.cmake: restore CMAKE_MODULE_PATH, unset variable --- cmake/modules/FindGINKGO.cmake | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/cmake/modules/FindGINKGO.cmake b/cmake/modules/FindGINKGO.cmake index a81b5cfbd6..37648a26fe 100644 --- a/cmake/modules/FindGINKGO.cmake +++ b/cmake/modules/FindGINKGO.cmake @@ -25,17 +25,31 @@ SET(GINKGO_DIR "" CACHE PATH "An optional hint to a GINKGO installation") SET_IF_EMPTY(GINKGO_DIR "$ENV{GINKGO_DIR}") -find_package(Ginkgo +# +# Save and restore the ${CMAKE_MODULE_PATH} variable. The Ginkgo project +# configuration unfortunately overrides the variable which causes +# subsequent configuration to fail. +# +SET(_cmake_module_path ${CMAKE_MODULE_PATH}) +FIND_PACKAGE(Ginkgo HINTS ${GINKGO_DIR} ${Ginkgo_DIR} $ENV{Ginkgo_DIR} ) +SET(CMAKE_MODULE_PATH ${_cmake_module_path}) + +# +# Cosmetic clean up: Let's remove all variables beginning with "GINKGO_" +# that are actually not used during configuration but show up in +# detailed.log +# +unset(GINKGO_CXX_COMPILER) DEAL_II_PACKAGE_HANDLE(GINKGO LIBRARIES - REQUIRED GINKGO_INTERFACE_LINK_FLAGS + REQUIRED GINKGO_INTERFACE_LINK_LIBRARIES INCLUDE_DIRS REQUIRED GINKGO_INSTALL_INCLUDE_DIR USER_INCLUDE_DIRS REQUIRED GINKGO_INSTALL_INCLUDE_DIR CLEAR - GINKGO_INSTALL_INCLUDE_DIR GINKGO_INTERFACE_LINK_FLAGS + Ginkgo_DIR ) -- 2.39.5