forked from lijiext/lammps
cmake: bump kokkos to v3.1.01
This commit is contained in:
parent
260e6bafd5
commit
66994562e6
|
@ -35,8 +35,8 @@ if(DOWNLOAD_KOKKOS)
|
|||
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(kokkos_build
|
||||
URL https://github.com/kokkos/kokkos/archive/3.1.00.tar.gz
|
||||
URL_MD5 f638a6c786f748a602b26faa0e96ebab
|
||||
URL https://github.com/kokkos/kokkos/archive/3.1.01.tar.gz
|
||||
URL_MD5 3ccb2100f7fc316891e7dad3bc33fa37
|
||||
CMAKE_ARGS ${KOKKOS_LIB_BUILD_ARGS}
|
||||
BUILD_BYPRODUCTS <INSTALL_DIR>/lib/libkokkoscore.a
|
||||
)
|
||||
|
@ -50,10 +50,7 @@ if(DOWNLOAD_KOKKOS)
|
|||
target_link_libraries(lammps PRIVATE LAMMPS::KOKKOS)
|
||||
add_dependencies(LAMMPS::KOKKOS kokkos_build)
|
||||
elseif(EXTERNAL_KOKKOS)
|
||||
find_package(Kokkos 3.1)
|
||||
if(NOT Kokkos_FOUND)
|
||||
message(FATAL_ERROR "KOKKOS library version 3.1 or later not found, help CMake to find it by setting KOKKOS_LIBRARY, or set DOWNLOAD_KOKKOS=ON to download it")
|
||||
endif()
|
||||
find_package(Kokkos 3.1.01 REQUIRED CONFIG)
|
||||
target_link_libraries(lammps PRIVATE Kokkos::kokkos)
|
||||
else()
|
||||
set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos)
|
||||
|
|
Loading…
Reference in New Issue