From ff2b61354d2f82797fc7da02906683a9cbef21b3 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Wed, 20 Dec 2017 03:13:08 -0500 Subject: [PATCH] Bugfix for building LAMMPS+KOKKOS+DPD with CMake Resolves issue #753, but there might be more work ahead. --- cmake/CMakeLists.txt | 8 ++++++++ cmake/Modules/StyleHeaderUtils.cmake | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 967f229759..ae1820fcbc 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -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}) diff --git a/cmake/Modules/StyleHeaderUtils.cmake b/cmake/Modules/StyleHeaderUtils.cmake index 32054c53ba..54c59fa238 100644 --- a/cmake/Modules/StyleHeaderUtils.cmake +++ b/cmake/Modules/StyleHeaderUtils.cmake @@ -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