Update CMakeFiles, add initial pair potential implementation and tests

This commit is contained in:
Alex Selimov 2025-04-16 23:06:50 -04:00
parent 6162b27a89
commit f15eb0cf51
9 changed files with 67 additions and 55 deletions

View file

@ -1,5 +1,6 @@
cmake_minimum_required(VERSION 3.9)
project(cudaCAC LANGUAGES CUDA CXX)
set(NAME "cudaCAC")
project(${NAME} LANGUAGES CUDA CXX)
enable_testing()
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
@ -12,7 +13,6 @@ set(CMAKE_CUDA_ARCHITECTURES 61)
set(CUDA_SEPARABLE_COMPILATION ON)
# Add Vec3 as a dependency
add_subdirectory(tests)
include(FetchContent)
FetchContent_Declare(Vec3
GIT_REPOSITORY https://www.alexselimov.com/git/aselimov/Vec3.git
@ -30,16 +30,17 @@ include_directories(/usr/local/cuda-12.8/include)
add_subdirectory(src)
add_subdirectory(kernels)
add_subdirectory(tests)
add_executable(${CMAKE_PROJECT_NAME} main.cpp)
add_executable(${NAME} main.cpp)
install(DIRECTORY src/ DESTINATION src/)
target_link_libraries(
${CMAKE_PROJECT_NAME}
${NAME}
PRIVATE
${CMAKE_PROJECT_NAME}_lib
${CMAKE_PROJECT_NAME}_cuda_lib
${NAME}_lib
${NAME}_cuda_lib
${CUDA_LIBRARIES}
)