summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/opensubdiv/files/opensubdiv-3.4.4-add-CUDA11-compatibility.patch')
-rw-r--r--media-libs/opensubdiv/files/opensubdiv-3.4.4-add-CUDA11-compatibility.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/media-libs/opensubdiv/files/opensubdiv-3.4.4-add-CUDA11-compatibility.patch b/media-libs/opensubdiv/files/opensubdiv-3.4.4-add-CUDA11-compatibility.patch
new file mode 100644
index 000000000000..c1cf2981e2ea
--- /dev/null
+++ b/media-libs/opensubdiv/files/opensubdiv-3.4.4-add-CUDA11-compatibility.patch
@@ -0,0 +1,18 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -590,8 +590,14 @@ if(CUDA_FOUND)
+ if (NOT DEFINED OSD_CUDA_NVCC_FLAGS)
+ if (CUDA_VERSION_MAJOR LESS 6)
+ set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_11 )
+- else()
++ elseif (CUDA_VERSION_MAJOR LESS 9)
+ set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_20 )
++ elseif (CUDA_VERSION_MAJOR LESS 11)
++ set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_30 )
++ elseif (CUDA_VERSION_MAJOR LESS 12)
++ set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_35 )
++ else()
++ set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_50 )
+ endif()
+ endif()
+ endif()