From 880d2355bb0bafa9e5eee26b7ac59f4f0921f41a Mon Sep 17 00:00:00 2001 From: scivision Date: Thu, 16 May 2024 20:05:17 -0400 Subject: [PATCH] mpiseq: C,Fortran objects for compiler compatibility Co-authored-by: Dario Mangoni --- CMakeLists.txt | 2 +- cmake/libseq.cmake | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ab82b48..e5759a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,8 +130,8 @@ message(VERBOSE "MUMPS ${MUMPS_UPSTREAM_VERSION} source directory: ${mumps_SOURC # --- mpiseq (No MPI) if(NOT parallel) + set(NUMERIC_LIBS LAPACK::LAPACK) include(cmake/libseq.cmake) - set(NUMERIC_LIBS mpiseq LAPACK::LAPACK) endif() list(APPEND NUMERIC_LIBS ${CMAKE_THREAD_LIBS_INIT}) diff --git a/cmake/libseq.cmake b/cmake/libseq.cmake index 1bd1d9d..80faf0d 100644 --- a/cmake/libseq.cmake +++ b/cmake/libseq.cmake @@ -1,6 +1,18 @@ set(_l "${mumps_SOURCE_DIR}/libseq/") -add_library(mpiseq ${_l}elapse.c ${_l}mpi.f ${_l}mpic.c) +add_library(mpiseq_C OBJECT ${_l}elapse.c ${_l}mpic.c) +target_include_directories(mpiseq_C PUBLIC +"$" +$ +) + +add_library(mpiseq_FORTRAN OBJECT ${_l}mpi.f) +target_include_directories(mpiseq_FORTRAN PUBLIC +"$" +$ +) + +add_library(mpiseq $ $) target_include_directories(mpiseq PUBLIC "$" @@ -12,3 +24,6 @@ set_property(TARGET mpiseq PROPERTY EXPORT_NAME MPISEQ) install(TARGETS mpiseq EXPORT ${PROJECT_NAME}-targets) install(FILES ${_l}elapse.h ${_l}mpi.h ${_l}mpif.h TYPE INCLUDE) + +set(NUMERIC_INC ${_l}) +list(APPEND NUMERIC_LIBS mpiseq)