Skip to content

Commit b036145

Browse files
[arccore,message_passing_mpi] Allow adding explicit libraries to 'arccore_message_passing_mpi'.
This will be used for example to add libraries to handle specific features like GPU aware. This is needed with Cray Mpich.
1 parent c1df86b commit b036145

File tree

1 file changed

+9
-4
lines changed
  • arccore/src/message_passing_mpi/arccore/message_passing_mpi

1 file changed

+9
-4
lines changed

arccore/src/message_passing_mpi/arccore/message_passing_mpi/CMakeLists.txt

+9-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ endif()
88

99
# On a besoin du support de MPI 3.1
1010
if (NOT WIN32)
11-
if (MPI_CXX_VERSION VERSION_LESS "3.1")
12-
message(FATAL_ERROR "MPI Version (${MPI_CXX_VERSION}) is too old. Version 3.1 is required."
13-
" Add -DARCCORE_USE_MPI=NO to cmake configuration to compile without MPI."
14-
)
11+
if (MPI_CXX_VERSION)
12+
if (MPI_CXX_VERSION VERSION_LESS "3.1")
13+
message(FATAL_ERROR "MPI Version (${MPI_CXX_VERSION}) is too old. Version 3.1 is required."
14+
" Add -DARCCORE_USE_MPI=NO to cmake configuration to compile without MPI."
15+
)
16+
endif()
1517
endif()
1618
endif()
1719

@@ -50,3 +52,6 @@ arccore_add_component_library(message_passing_mpi
5052

5153
target_link_libraries(arccore_message_passing_mpi PUBLIC arccore_trace arccore_message_passing arccore_collections arccore_concurrency)
5254
target_link_libraries(arccore_message_passing_mpi PUBLIC arcconpkg_MPI)
55+
if (ARCCORE_ADDITIONAL_MPI_LIBRARIES)
56+
target_link_libraries(arccore_message_passing_mpi PUBLIC ${ARCCORE_ADDITIONAL_MPI_LIBRARIES})
57+
endif()

0 commit comments

Comments
 (0)