-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
27 lines (19 loc) · 903 Bytes
/
CMakeLists.txt
File metadata and controls
27 lines (19 loc) · 903 Bytes
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
# Using the latest CMake is highly recommended, to ensure up-to-date CUDA language support.
cmake_minimum_required(VERSION 3.23 FATAL_ERROR)
project(cuModuleInvalidPTX LANGUAGES CXX CUDA)
set(CMAKE_CXX_STANDARD 11)
find_package( CUDAToolkit 11.7 REQUIRED )
set(CMAKE_CUDA_ARCHITECTURES "60-virtual")
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/CMake)
set( OTK_BUILD_TESTS OFF CACHE BOOL "Enable build of OptiXToolkit tests" )
add_subdirectory("DemandLoading")
add_library(kernelLib OBJECT)
target_sources(kernelLib PRIVATE kernel.cu)
target_link_libraries(kernelLib OptiXToolkit::DemandLoading)
set_property(TARGET kernelLib PROPERTY CUDA_PTX_COMPILATION ON)
add_executable(cuModuleInvalidPTX main.cpp)
target_compile_options(cuModuleInvalidPTX PRIVATE "-DPTX_FILENAME=\"$<TARGET_OBJECTS:kernelLib>\"")
target_link_libraries(cuModuleInvalidPTX
CUDA::cuda_driver
CUDA::cudart
)