Properly include Vec3
This commit is contained in:
parent
a65149a619
commit
dfd6f43e9b
@ -1,32 +1,46 @@
|
|||||||
cmake_minimum_required(VERSION 3.9)
|
cmake_minimum_required(VERSION 3.9)
|
||||||
project(MyProject LANGUAGES CUDA CXX)
|
project(cudaCAC LANGUAGES CUDA CXX)
|
||||||
|
|
||||||
|
enable_testing()
|
||||||
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
||||||
|
# Default settings
|
||||||
add_compile_options(-Wall -Wextra -Wpedantic)
|
add_compile_options(-Wall -Wextra -Wpedantic)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_CUDA_ARCHITECTURES 61)
|
set(CMAKE_CUDA_ARCHITECTURES 61)
|
||||||
set(CUDA_SEPARABLE_COMPILATION ON)
|
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
|
||||||
|
)
|
||||||
|
|
||||||
|
FetchContent_GetProperties(Vec3)
|
||||||
|
if(NOT Vec3_POPULATED)
|
||||||
|
FetchContent_MakeAvailable(Vec3)
|
||||||
|
include_directories(${Vec3_SOURCE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
include_directories(src)
|
include_directories(src)
|
||||||
include_directories(kernels)
|
include_directories(kernels)
|
||||||
include_directories(/usr/local/cuda-12.8/include)
|
include_directories(/usr/local/cuda-12.8/include)
|
||||||
|
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
add_subdirectory(kernels)
|
add_subdirectory(kernels)
|
||||||
add_subdirectory(tests)
|
|
||||||
|
|
||||||
add_executable(${CMAKE_PROJECT_NAME}_run main.cpp)
|
|
||||||
|
|
||||||
|
add_executable(${CMAKE_PROJECT_NAME} main.cpp)
|
||||||
|
install(DIRECTORY src/ DESTINATION src/)
|
||||||
|
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
${CMAKE_PROJECT_NAME}_run
|
${CMAKE_PROJECT_NAME}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_PROJECT_NAME}_lib
|
${CMAKE_PROJECT_NAME}_lib
|
||||||
${CMAKE_PROJECT_NAME}_cuda_lib
|
${CMAKE_PROJECT_NAME}_cuda_lib
|
||||||
|
|
||||||
${CUDA_LIBRARIES}
|
${CUDA_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user