forked from lijiext/lammps
Add special KOKKOS styles individually
This avoids unnecessary dependencies
This commit is contained in:
parent
ff2b61354d
commit
b9184ef441
|
@ -481,9 +481,7 @@ if(ENABLE_KOKKOS)
|
|||
${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}")
|
||||
|
@ -492,8 +490,15 @@ if(ENABLE_KOKKOS)
|
|||
RegisterStylesExt(${KOKKOS_PKG_SOURCES_DIR} kokkos KOKKOS_PKG_SOURCES)
|
||||
|
||||
# register kokkos-only styles
|
||||
RegisterNBinStyles(${KOKKOS_PKG_SOURCES_DIR})
|
||||
RegisterNPairStyles(${KOKKOS_PKG_SOURCES_DIR})
|
||||
RegisterNBinStyle(${KOKKOS_PKG_SOURCES_DIR}/nbin_kokkos.h)
|
||||
RegisterNPairStyle(${KOKKOS_PKG_SOURCES_DIR}/npair_kokkos.h)
|
||||
|
||||
if(ENABLE_USER-DPD)
|
||||
get_property(KOKKOS_PKG_SOURCES GLOBAL PROPERTY KOKKOS_PKG_SOURCES)
|
||||
list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/npair_ssa_kokkos.cpp)
|
||||
RegisterNPairStyle(${KOKKOS_PKG_SOURCES_DIR}/npair_ssa_kokkos.h)
|
||||
set_property(GLOBAL PROPERTY "KOKKOS_PKG_SOURCES" "${KOKKOS_PKG_SOURCES}")
|
||||
endif()
|
||||
|
||||
get_property(KOKKOS_PKG_SOURCES GLOBAL PROPERTY KOKKOS_PKG_SOURCES)
|
||||
|
||||
|
|
|
@ -11,6 +11,12 @@ function(FindStyleHeaders path style_class file_pattern headers)
|
|||
set_property(GLOBAL PROPERTY ${headers} "${hlist}")
|
||||
endfunction(FindStyleHeaders)
|
||||
|
||||
function(AddStyleHeader path headers)
|
||||
get_property(hlist GLOBAL PROPERTY ${headers})
|
||||
list(APPEND hlist ${path})
|
||||
set_property(GLOBAL PROPERTY ${headers} "${hlist}")
|
||||
endfunction(AddStyleHeader)
|
||||
|
||||
function(FindStyleHeadersExt path style_class extension headers sources)
|
||||
get_property(hlist GLOBAL PROPERTY ${headers})
|
||||
get_property(slist GLOBAL PROPERTY ${sources})
|
||||
|
@ -70,6 +76,14 @@ function(RegisterNPairStyles search_path)
|
|||
FindStyleHeaders(${search_path} NPAIR_CLASS npair_ NPAIR ) # npair ) # neighbor
|
||||
endfunction(RegisterNPairStyles)
|
||||
|
||||
function(RegisterNBinStyle path)
|
||||
AddStyleHeader(${path} NBIN)
|
||||
endfunction(RegisterNBinStyle)
|
||||
|
||||
function(RegisterNPairStyle path)
|
||||
AddStyleHeader(${path} NPAIR)
|
||||
endfunction(RegisterNPairStyle)
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue