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)