Skip to content

Commit dcf8afe

Browse files
authored
Make CUDA lineinfo optional. (#11606)
1 parent e4406da commit dcf8afe

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cmake/Utils.cmake

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,11 @@ function(xgboost_set_cuda_flags target)
112112
if(USE_DEVICE_DEBUG)
113113
target_compile_options(${target} PRIVATE
114114
$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANGUAGE:CUDA>>:-G;-src-in-ptx>)
115-
else()
116-
target_compile_options(${target} PRIVATE
117-
$<$<COMPILE_LANGUAGE:CUDA>:-lineinfo>)
118115
endif()
119116

120117
if(USE_NVTX)
121118
target_compile_definitions(${target} PRIVATE -DXGBOOST_USE_NVTX=1)
119+
target_compile_options(${target} PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:-lineinfo>)
122120
endif()
123121

124122
# Use CCCL we find before CUDA Toolkit to make sure we get newer headers as intended

0 commit comments

Comments
 (0)