Commit 22db0d5c authored by Brad King's avatar Brad King Committed by Kitware Robot

Merge topic 'FindCUDA-filter-compute-capabilities'

bfd93b73 FindCUDA: Filter unrelated content in compute capabilities output
Acked-by: Kitware Robot's avatarKitware Robot <>
Merge-request: !2400
parents 99648081 bfd93b73
......@@ -109,6 +109,9 @@ function(CUDA_DETECT_INSTALLED_GPUS OUT_VARIABLE)
RUN_OUTPUT_VARIABLE compute_capabilities)
# Filter unrelated content out of the output.
string(REGEX MATCHALL "[0-9]+\\.[0-9]+" compute_capabilities "${compute_capabilities}")
if(run_result EQUAL 0)
string(REPLACE "2.1" "2.1(2.0)" compute_capabilities "${compute_capabilities}")
set(CUDA_GPU_DETECT_OUTPUT ${compute_capabilities}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment