blender: respect cudaCapabilities

this should speed up builds by not building binaries for unused cuda compute levels

see https://developer.nvidia.com/cuda/gpus
and https://github.com/blender/blender/blob/1f262d6832021d855a643c5c6afbb0ee60194356/CMakeLists.txt#L650-L653
This commit is contained in:
Willy Hille
2026-06-28 23:35:28 +02:00
committed by Willy
parent cb84925dc1
commit 6944c7c7f7
+2
View File
@@ -9,6 +9,7 @@
ceres-solver,
cmake,
config,
cudaArches ? cudaPackages.flags.realArches,
cudaPackages,
cudaSupport ? config.cudaSupport,
dbus,
@@ -201,6 +202,7 @@ stdenv'.mkDerivation (finalAttrs: {
(lib.cmakeFeature "ALEMBIC_LIBRARY" "${lib.getLib alembic}/lib/libAlembic${stdenv.hostPlatform.extensions.sharedLibrary}")
]
++ lib.optionals cudaSupport [
(lib.cmakeFeature "CYCLES_CUDA_BINARIES_ARCH" (lib.concatStringsSep ";" cudaArches))
(lib.cmakeFeature "OPTIX_ROOT_DIR" "${optix}")
(lib.cmakeBool "WITH_CYCLES_CUDA_BINARIES" true)
]