diff options
author | 2021-08-01 16:56:15 +0200 | |
---|---|---|
committer | 2021-08-02 16:49:46 -0400 | |
commit | 582031cbf749c6a79ba6b0b6f09b6754857c5915 (patch) | |
tree | db51219c2277a4d7d2fc5b13e64e5d846e3ce3fb /sci-libs | |
parent | www-plugins/chrome-binary-plugins: automated update (92.0.4515.131) (diff) | |
download | gentoo-582031cbf749c6a79ba6b0b6f09b6754857c5915.tar.gz gentoo-582031cbf749c6a79ba6b0b6f09b6754857c5915.tar.bz2 gentoo-582031cbf749c6a79ba6b0b6f09b6754857c5915.zip |
sci-libs/vtk: fix auto-detection of CUDA arch
In some cases, the CUDA architecture is not successfully detected,
when 'native' is passed to the build system. For this, check for the
environment variable VTK_CUDA_ARCH to be exported and pass that
value from the environment instead, if it's a valid CUDA architecture
name.
This ignores the 'fermi' architecture, as it's no longer supported by
current dev-util/nvidia-cuda-toolkit-11* versions.
Closes: https://bugs.gentoo.org/803818
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/21855
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/vtk/vtk-9.0.1.ebuild | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/sci-libs/vtk/vtk-9.0.1.ebuild b/sci-libs/vtk/vtk-9.0.1.ebuild index 6e0717f814c3..a38e3f1c3270 100644 --- a/sci-libs/vtk/vtk-9.0.1.ebuild +++ b/sci-libs/vtk/vtk-9.0.1.ebuild @@ -41,7 +41,7 @@ RESTRICT="!test? ( test )" REQUIRED_USE=" all-modules? ( boost ffmpeg gdal imaging mysql odbc postgres qt5 rendering theora views ) - cuda? ( X ) + cuda? ( X video_cards_nvidia ) java? ( rendering ) python? ( ${PYTHON_REQUIRED_USE} ) qt5? ( X rendering ) @@ -294,7 +294,28 @@ src_configure() { fi if use cuda; then - mycmakeargs+=( -DVTKm_CUDA_Architecture="native" ) + local cuda_arch= + case ${VTK_CUDA_ARCH:-native} in + # we ignore fermi arch, because current nvidia-cuda-toolkit-11* + # no longer supports it + kepler|maxwell|pascal|volta|turing|ampere|all) + cuda_arch=${VTK_CUDA_ARCH} + ;; + native) + ewarn "If auto detection fails for you, please try and export the" + ewarn "VTK_CUDA_ARCH environment variable to one of the common arch" + ewarn "names: kepler, maxwell, pascal, volta, turing, ampere or all." + cuda_arch=native + ;; + *) + eerror "Please properly set the VTK_CUDA_ARCH environment variable to" + eerror "one of: kepler, maxwell, pascal, volta, turing, ampere, all" + die "Invalid CUDA architecture given: '${VTK_CUDA_ARCH}'!" + ;; + esac + ewarn "Using CUDA architecture '${cuda_arch}'" + + mycmakeargs+=( -DVTKm_CUDA_Architecture=${cuda_arch} ) fi if use ffmpeg; then |