From 9fc4d8e0c077464d90e4a8e2a47249cade9bf22c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20R=C3=B6hling?= Date: Tue, 2 Nov 2021 14:03:14 +0100 Subject: [PATCH] Backport upstream fix for MPI patch --- debian/patches/0001-Fix-cross-compilation-with-MPI.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/patches/0001-Fix-cross-compilation-with-MPI.patch b/debian/patches/0001-Fix-cross-compilation-with-MPI.patch index b6bc3a928..bca38daf9 100644 --- a/debian/patches/0001-Fix-cross-compilation-with-MPI.patch +++ b/debian/patches/0001-Fix-cross-compilation-with-MPI.patch @@ -8,14 +8,14 @@ Forwarded: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/6537 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake -index d8f0334..f7faa54 100644 +index d8f0334..1aaba43 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -267,6 +267,7 @@ cmake_policy(PUSH) cmake_policy(SET CMP0057 NEW) # if IN_LIST include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) -+include(${CMAKE_CURRENT_LIST_DIR}/FindPkgConfig.cmake) ++find_package(PkgConfig QUIET) # Generic compiler names set(_MPI_C_GENERIC_COMPILER_NAMES mpicc mpcc mpicc_r mpcc_r) @@ -34,7 +34,7 @@ index d8f0334..f7faa54 100644 + else() + set(_MPI_PKG "") + endif() -+ if(_MPI_PKG) ++ if(_MPI_PKG AND PKG_CONFIG_FOUND) + pkg_check_modules("MPI_${LANG}_PKG" "${_MPI_PKG}") + if("${MPI_${LANG}_PKG_FOUND}") + set(MPI_${LANG}_COMPILE_OPTIONS ${MPI_${LANG}_PKG_CFLAGS} CACHE STRING "MPI ${LANG} compilation options" FORCE)