From: Markus Blatt Date: Fri, 18 Mar 2022 21:03:05 +0000 (+0100) Subject: Also search for libscotchmetisv5 and libscotchmetisv3. X-Git-Tag: archive/raspbian/2.8.0-4+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f3a6202cec9ea2b8912787565ccab6cfbf6f792f;p=dune-common.git Also search for libscotchmetisv5 and libscotchmetisv3. On Debian these might be present instead of libscotchmetis, Gbp-Pq: Name findmetis_scotch7.patch --- diff --git a/cmake/modules/FindMETIS.cmake b/cmake/modules/FindMETIS.cmake index 338b09e..068b121 100644 --- a/cmake/modules/FindMETIS.cmake +++ b/cmake/modules/FindMETIS.cmake @@ -87,12 +87,19 @@ if(METIS_HEADER_FILE) set(IS_SCOTCH_METIS_HEADER FALSE) else() set(IS_SCOTCH_METIS_HEADER TRUE) + string(REGEX REPLACE ".*#define SCOTCH_METIS_VERSION[ ]+([0-9]+).*" "\\1" + SCOTCH_METIS_VERSION "${metisheader}") endif() endif() unset(METIS_HEADER_FILE CACHE) # search for the METIS library or for the scotch-metis wrapper library if(IS_SCOTCH_METIS_HEADER) + # Debian bookworm has no scotchmetis library only scotchmetisv3 + # and scotchmetisv5. + if(SCOTCH_METIS_VERSION) + find_library(METIS_LIBRARY scotchmetisv${SCOTCH_METIS_VERSION}) + endif() find_library(METIS_LIBRARY scotchmetis) else() find_library(METIS_LIBRARY metis)