some tweaks to simplify building the KOKKOS package and to enforce consistent behavior

This commit is contained in:
Axel Kohlmeyer
2020-04-09 22:51:52 -04:00
parent e39faf4f48
commit 469a4f15b7
2 changed files with 12 additions and 0 deletions

View File

@ -31,6 +31,10 @@ elseif(EXTERNAL_KOKKOS)
else()
set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos)
set(LAMMPS_LIB_KOKKOS_BIN_DIR ${LAMMPS_LIB_BINARY_DIR}/kokkos)
# enforce using nvcc_wrapper as compiler wrapper
if(Kokkos_ENABLE_CUDA)
set(CMAKE_CXX_COMPILER ${LAMMPS_LIB_KOKKOS_SRC_DIR}/bin/nvcc_wrapper CACHE FILEPATH "Path to nvcc wrapper for Kokkos with CUDA" FORCE)
endif()
add_subdirectory(${LAMMPS_LIB_KOKKOS_SRC_DIR} ${LAMMPS_LIB_KOKKOS_BIN_DIR})
set(Kokkos_INCLUDE_DIRS ${LAMMPS_LIB_KOKKOS_SRC_DIR}/core/src