cmake_minimum_required(VERSION 3.16)

project(gpucache CXX CUDA)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED on)

file(GLOB SOURCE_FILES
        # ${CMAKE_CURRENT_SOURCE_DIR}/src/cuda/*
        ${CMAKE_CURRENT_SOURCE_DIR}/src/hash/*.cuh
        ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp
        ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cu
)
message(STATUS "source files:" ${SOURCE_FILES})

#include_directories(${CMAKE_SOURCE_DIR}/include)
#link_directories(${CMAKE_SOURCE_DIR}/libs)
add_library(gpucache SHARED ${SOURCE_FILES})
set_target_properties(gpucache PROPERTIES
        CUDA_SEPARABLE_COMPILATION ON
        CUDA_ARCHITECTURES "86"
)

# add_subdirectory(test)