File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.24 )
22
3+ option (ENABLE_CUDA_DEVICE_DEBUG "Enable generating CUDA device code debug information." OFF )
4+
35set (_TARGET_NORMAL normal)
46
57add_executable (${_TARGET_NORMAL} )
@@ -9,6 +11,9 @@ target_sources(${_TARGET_NORMAL}
911set_target_properties (${_TARGET_NORMAL} PROPERTIES
1012 CUDA_CXX_STANDARD 17
1113)
14+ if (ENABLE_CUDA_DEVICE_DEBUG)
15+ target_compile_options (${_TARGET_NORMAL} PRIVATE "$<$<AND :$<CONFIG :Debug >,$<COMPILE_LANGUAGE :CUDA >>:-G ;-src -in -ptx >" )
16+ endif ()
1217
1318# add include path to the cuda_mav.cuh header
1419target_link_libraries (${_TARGET_NORMAL} PRIVATE CUDA_MAV_HEADER )
@@ -22,3 +27,6 @@ target_sources(${_TARGET_ANNOTATED}
2227set_target_properties (${_TARGET_ANNOTATED} PROPERTIES
2328 CUDA_CXX_STANDARD 17
2429)
30+ if (ENABLE_CUDA_DEVICE_DEBUG)
31+ target_compile_options (${_TARGET_ANNOTATED} PRIVATE "$<$<AND :$<CONFIG :Debug >,$<COMPILE_LANGUAGE :CUDA >>:-G ;-src -in -ptx >" )
32+ endif ()
You can’t perform that action at this time.
0 commit comments