Skip to content

Commit

Permalink
Tidy MPI CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
rupertnash committed Dec 20, 2023
1 parent 4cc9e11 commit 2bf633b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
7 changes: 6 additions & 1 deletion Code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ include(platform_checks)
include(codesign)
include(HemeLbDependency)

# We do NOT want the removed MPI 2 C++ bindings
# Requesting MPI 3 should be enough, but some configurations of
# e.g. OpenMPI enable them for C++ by default to be "helpful".
set(MPI_CXX_SKIP_MPICXX ON)
find_package(MPI REQUIRED CXX)
find_package(MPI 3 REQUIRED CXX)

find_hemelb_dependency(Boost REQUIRED)
find_hemelb_dependency(tinyxml2 REQUIRED)
Expand All @@ -65,6 +68,8 @@ find_hemelb_dependency(CTemplate REQUIRED)
find_hemelb_dependency(ZLIB REQUIRED)

# MPI and boost should always be available
# Note this is NOT the C++ bindings, this is the C bindings from C++
# (ensures helpful MPI implementations do not sneak the MPI 2 C++ bindings back in)
link_libraries(MPI::MPI_CXX)
link_libraries(Boost::headers)

Expand Down
12 changes: 0 additions & 12 deletions Code/cmake/mpi.cmake

This file was deleted.

0 comments on commit 2bf633b

Please sign in to comment.