-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
38 lines (30 loc) · 961 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
cmake_minimum_required(VERSION 3.12)
include(FetchContent)
project(optx_nerf LANGUAGES CXX CUDA)
set(CMAKE_CXX_STANDARD 14)
enable_language(CUDA)
if(NOT DEFINED CMAKE_CUDA_STANDARD)
set(CMAKE_CUDA_STANDARD 14)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
endif()
set(CMAKE_CUDA_RUNTIME_LIBRARY SHARED)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake")
set(CMAKE_CUDA_ARCHITECTURES 70)
find_package(OptiX8 REQUIRED)
include_directories(
${OptiX8_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}
${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})
include(PTXUtilities)
set(SOURCES
main.cu
saxpy.cu)
add_executable(optx_splat ${SOURCES})
set_target_properties(optx_splat PROPERTIES
CUDA_SEPARABLE_COMPILATION ON)
set_target_properties(optx_splat PROPERTIES CUDA_ARCHITECTURES 70)
target_link_libraries(optx_splat cuda
${OptiX_LIBRARY}
${CUDA_LIBRARIES}
${CMAKE_DL_LIBS})
add_ptx_targets(optx_splat kernels)