set using C++11 w/o extensions globally. move KOKKOS only checks to KOKKOS.cmake
This commit is contained in:
@ -1,3 +1,15 @@
|
||||
########################################################################
|
||||
# consistency checks and Kokkos options/settings required by LAMMPS
|
||||
if(Kokkos_ENABLE_CUDA)
|
||||
set(Kokkos_ENABLE_CUDA_LAMBDA ON)
|
||||
endif()
|
||||
# Adding OpenMP compiler flags without the checks done for
|
||||
# BUILD_OMP can result in compile failures. Enforce consistency.
|
||||
if(Kokkos_ENABLE_OPENMP AND NOT BUILD_OMP)
|
||||
message(FATAL_ERROR "Must enable BUILD_OMP with Kokkos_ENABLE_OPENMP")
|
||||
endif()
|
||||
########################################################################
|
||||
|
||||
option(EXTERNAL_KOKKOS "Build against external kokkos library" OFF)
|
||||
option(DOWNLOAD_KOKKOS "Download the KOKKOS library instead of using the bundled one" OFF)
|
||||
if(DOWNLOAD_KOKKOS)
|
||||
@ -31,10 +43,6 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user