Bugfix for building LAMMPS+KOKKOS+DPD with CMake

Resolves issue #753, but there might be more work ahead.
This commit is contained in:
Richard Berger 2017-12-20 03:13:08 -05:00
parent d029cb9002
commit ff2b61354d
2 changed files with 16 additions and 0 deletions

View File

@ -480,6 +480,10 @@ if(ENABLE_KOKKOS)
${KOKKOS_PKG_SOURCES_DIR}/neigh_list_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/neigh_bond_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/fix_nh_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/nbin_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/nbin_ssa_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/npair_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/npair_ssa_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/domain_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/modify_kokkos.cpp)
set_property(GLOBAL PROPERTY "KOKKOS_PKG_SOURCES" "${KOKKOS_PKG_SOURCES}")
@ -487,6 +491,10 @@ if(ENABLE_KOKKOS)
# detects styles which have KOKKOS version
RegisterStylesExt(${KOKKOS_PKG_SOURCES_DIR} kokkos KOKKOS_PKG_SOURCES)
# register kokkos-only styles
RegisterNBinStyles(${KOKKOS_PKG_SOURCES_DIR})
RegisterNPairStyles(${KOKKOS_PKG_SOURCES_DIR})
get_property(KOKKOS_PKG_SOURCES GLOBAL PROPERTY KOKKOS_PKG_SOURCES)
list(APPEND LIB_SOURCES ${KOKKOS_PKG_SOURCES})

View File

@ -62,6 +62,14 @@ function(GenerateStyleHeader path property style)
CreateStyleHeader("${path}" "style_${style}.h" ${files})
endfunction(GenerateStyleHeader)
function(RegisterNBinStyles search_path)
FindStyleHeaders(${search_path} NBIN_CLASS nbin_ NBIN ) # nbin ) # neighbor
endfunction(RegisterNBinStyles)
function(RegisterNPairStyles search_path)
FindStyleHeaders(${search_path} NPAIR_CLASS npair_ NPAIR ) # npair ) # neighbor
endfunction(RegisterNPairStyles)
function(RegisterStyles search_path)
FindStyleHeaders(${search_path} ANGLE_CLASS angle_ ANGLE ) # angle ) # force
FindStyleHeaders(${search_path} ATOM_CLASS atom_vec_ ATOM_VEC ) # atom ) # atom atom_vec_hybrid