Unverified Commit f5be3cca authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

add the check for MPI in USER-ATC at the correct location

parent 863b5050
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
@@ -411,13 +411,6 @@ foreach(SIMPLE_LIB POEMS USER-ATC USER-AWPMD USER-H5MD)
      target_include_directories(awpmd PUBLIC ${LAMMPS_LIB_SOURCE_DIR}/awpmd/systems/interact ${LAMMPS_LIB_SOURCE_DIR}/awpmd/ivutils/include)
    elseif(PKG_LIB STREQUAL h5md)
      target_include_directories(h5md PUBLIC ${LAMMPS_LIB_SOURCE_DIR}/h5md/include ${HDF5_INCLUDE_DIRS})
    elseif(PKG_LIB STREQUAL atc)
      target_include_directories(atc PUBLIC ${LAMMPS_LIB_SOURCE_DIR}/atc)
      if(NOT BUILD_MPI)
        target_link_libraries(atc PRIVATE mpi_stubs)
      else()
        target_link_libraries(atc PRIVATE MPI::CXX)
      endif()
    else()
      target_include_directories(${PKG_LIB} PUBLIC ${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB})
    endif()
@@ -432,7 +425,11 @@ if(PKG_USER-ATC)
  if(LAMMPS_SIZES STREQUAL BIGBIG)
    message(FATAL_ERROR "The USER-ATC Package is not compatible with -DLAMMPS_BIGBIG")
  endif()
  if(BUILD_MPI)
    target_link_libraries(atc PRIVATE ${LAPACK_LIBRARIES} MPI::MPI_CXX)
  else()
    target_link_libraries(atc PRIVATE ${LAPACK_LIBARAIES} mpi_stubs)
  endif()
  target_include_directories(atc PRIVATE ${LAMMPS_SOURCE_DIR})
  target_compile_definitions(atc PRIVATE -DLAMMPS_${LAMMPS_SIZES})
endif()