From 1f108441b72e9031f635056bcc371b641c68aab7 Mon Sep 17 00:00:00 2001 From: zwx19961130 Date: Tue, 8 Sep 2026 07:23:35 +0800 Subject: [PATCH] Fix HypreDrive linking with static HYPRE --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ab7fe24a..56033f04 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1066,6 +1066,12 @@ if( ENABLE_HYPREDRV ) set( HYPREDRV_HYPRE_LIBRARY "${HYPRE_DIR}/lib/libHYPRE.a" ) set( HYPREDRV_HYPRE_LIBRARIES "${HYPREDRV_HYPRE_LIBRARY}" ) list( APPEND HYPREDRV_HYPRE_LIBRARIES ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES} ) + if( ENABLE_MPI AND ENABLE_SUPERLU_DIST ) + list( APPEND HYPREDRV_HYPRE_LIBRARIES + ${SUPERLU_DIR}/lib/libsuperlu_dist.a + ${PARMETIS_LIBRARIES} + ${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES} ) + endif() string( REPLACE ";" "^" HYPREDRV_HYPRE_LIBRARIES_ARG "${HYPREDRV_HYPRE_LIBRARIES}" ) set( HYPREDRV_MPI_ARGS ) set( HYPREDRV_ACCELERATOR_ARGS )