cmake: atc needs mpi itself

This commit is contained in:
Christoph Junghans 2020-03-24 11:07:45 -06:00
parent 51eb865d63
commit 4736402dd9
1 changed files with 2 additions and 1 deletions

View File

@ -202,6 +202,7 @@ else()
add_library(mpi_stubs STATIC ${MPI_SOURCES})
target_include_directories(mpi_stubs PUBLIC ${LAMMPS_SOURCE_DIR}/STUBS)
target_link_libraries(lammps PRIVATE mpi_stubs)
add_library(MPI::MPI_CXX ALIAS mpi_stubs)
endif()
set(LAMMPS_SIZES "smallbig" CACHE STRING "LAMMPS integer sizes (smallsmall: all 32-bit, smallbig: 64-bit #atoms #timesteps, bigbig: also 64-bit imageint, 64-bit atom ids)")
@ -464,7 +465,7 @@ if(PKG_USER-ATC)
if(LAMMPS_SIZES STREQUAL BIGBIG)
message(FATAL_ERROR "The USER-ATC Package is not compatible with -DLAMMPS_BIGBIG")
endif()
target_link_libraries(atc PRIVATE ${LAPACK_LIBRARIES})
target_link_libraries(atc PRIVATE ${LAPACK_LIBRARIES} MPI::MPI_CXX)
target_include_directories(atc PRIVATE ${LAMMPS_SOURCE_DIR})
endif()