diff options
author | 2021-11-07 02:14:33 +0300 | |
---|---|---|
committer | 2021-11-22 16:10:19 +0200 | |
commit | fc0a2d9cd04c458e48543abea41bba7882913e93 (patch) | |
tree | b0cdaa6d244317d86caddc243642699935a97673 /media-libs/opensubdiv/files | |
parent | dev-lang/elixir: drop keywords to ~ on 1.11.4-r1 (diff) | |
download | gentoo-fc0a2d9cd04c458e48543abea41bba7882913e93.tar.gz gentoo-fc0a2d9cd04c458e48543abea41bba7882913e93.tar.bz2 gentoo-fc0a2d9cd04c458e48543abea41bba7882913e93.zip |
media-libs/opensubdiv: use cuda eclass
* Utilize cuda eclass and let it handle gcc selection instead of forcing
an outdated version.
* Add a fix to provide sane defaults when compiling against a recent
enough CUDA versions.
* Add an option to pass user-specified NVCCFLAGS and prevent cmake from
overriding them.
Closes: https://bugs.gentoo.org/744517
Closes: https://bugs.gentoo.org/751382
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/22852
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'media-libs/opensubdiv/files')
-rw-r--r-- | media-libs/opensubdiv/files/opensubdiv-3.4.4-add-CUDA11-compatibility.patch | 19 |
1 files changed, 19 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..8f5bfab43a92 --- /dev/null +++ b/media-libs/opensubdiv/files/opensubdiv-3.4.4-add-CUDA11-compatibility.patch @@ -0,0 +1,19 @@ +From: "Alexander Golubev" <fatzer2@gmail.com> + +Set correct default minimal -arch for CUDA 9 and 11 +--- OpenSubdiv-3_4_4/CMakeLists.txt 2021-11-07 02:01:07.899484952 +0300 ++++ OpenSubdiv-3_4_4/CMakeLists.txt.new 2021-11-07 02:01:23.402764409 +0300 +@@ -587,8 +587,12 @@ + 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 ) ++ else() ++ set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_35 ) + endif() + endif() + endif() |