cmake_minimum_required(VERSION 3.16)

project(gpucache CXX CUDA)

<<<<<<< HEAD
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED on)
=======
>>>>>>> e50b9ce9f75b7f0d73eff96d54906b351df6985e

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})

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

<<<<<<< HEAD
# add_subdirectory(test)
=======
#include(FetchContent)
#FetchContent_Declare(
#        googletest
#        URL https://github.com/google/googletest/archive/refs/tags/v1.14.0.zip
#)
## For Windows: Prevent overriding the parent project's compiler/linker settings
#set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
#FetchContent_MakeAvailable(googletest)
#
#enable_testing()
#
#add_executable(
#        cache_test
#        src/cache_test.cpp
#)
#target_link_libraries(
#        cache_test
#        GTest::gtest_main
#)
#
#include(GoogleTest)
#gtest_discover_tests(cache_test)
>>>>>>> e50b9ce9f75b7f0d73eff96d54906b351df6985e
