From: M. Eric Irrgang Date: Mon, 26 Oct 2020 16:50:12 +0000 (+0100) Subject: Normalize FindMPI hints. X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=c13f0c774c251ce49729c69173bbc40618d7040c;p=alexxy%2Fgromacs.git Normalize FindMPI hints. Let gmxapi target use the MPI C component instead of CXX for consistency with gmxManageMPI.cmake. Refs #3671 Refs #3672 --- diff --git a/api/gmxapi/CMakeLists.txt b/api/gmxapi/CMakeLists.txt index e287816034..b5313c5a8d 100644 --- a/api/gmxapi/CMakeLists.txt +++ b/api/gmxapi/CMakeLists.txt @@ -67,9 +67,9 @@ if (GMX_LIB_MPI) # Clarification should be possible with resolution of #3672. set(_gmx_mpi_type "library") # Ref https://cmake.org/cmake/help/v3.13/module/FindMPI.html#variables-for-using-mpi - find_package(MPI COMPONENTS CXX) - if (MPI_CXX_FOUND) - target_link_libraries(gmxapi PUBLIC MPI::MPI_CXX) + find_package(MPI COMPONENTS C) + if (MPI_C_FOUND) + target_link_libraries(gmxapi PUBLIC MPI::MPI_C) else() message(FATAL_ERROR "Building gmxapi for MPI-enabled GROMACS, but no MPI toolchain found.") endif ()