forked from lijiext/lammps
cmake: mark MPI::MPI_CXX global
This commit is contained in:
parent
099880e91b
commit
b645800537
|
@ -188,9 +188,10 @@ if(BUILD_MPI)
|
|||
include(MPI4WIN)
|
||||
target_link_libraries(lammps PUBLIC LAMMPS::MPI)
|
||||
else()
|
||||
set(MPI_CXX_SKIP_MPICXX ON)
|
||||
find_package(MPI REQUIRED)
|
||||
target_compile_definitions(lammps PRIVATE -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1)
|
||||
target_link_libraries(lammps PUBLIC MPI::MPI_CXX)
|
||||
set_target_properties(MPI::MPI_CXX PROPERTIES IMPORTED_GLOBAL TRUE)
|
||||
add_library(LAMMPS::MPI ALIAS MPI::MPI_CXX)
|
||||
option(LAMMPS_LONGLONG_TO_LONG "Workaround if your system or MPI version does not recognize 'long long' data types" OFF)
|
||||
if(LAMMPS_LONGLONG_TO_LONG)
|
||||
|
|
Loading…
Reference in New Issue