python3Packages.torch: gate CUDAToolkit_VERSION cmake flag on cudaSupport
Fix a cache miss when `cudaSupport = false` but `cudaPackages.cudaMajorMinorVersion` is not the default (as could be the case with an overlay like `cudaPackages = cudaPackages_13_1;`)
This commit is contained in:
@@ -493,9 +493,9 @@ buildPythonPackage.override { inherit stdenv; } (finalAttrs: {
|
||||
cmakeFlags = [
|
||||
(lib.cmakeFeature "PYTHON_SIX_SOURCE_DIR" "${six.src}")
|
||||
# (lib.cmakeBool "CMAKE_FIND_DEBUG_MODE" true)
|
||||
(lib.cmakeFeature "CUDAToolkit_VERSION" cudaPackages.cudaMajorMinorVersion)
|
||||
]
|
||||
++ lib.optionals cudaSupport [
|
||||
(lib.cmakeFeature "CUDAToolkit_VERSION" cudaPackages.cudaMajorMinorVersion)
|
||||
# Unbreaks version discovery in enable_language(CUDA) when wrapping nvcc with ccache
|
||||
# Cf. https://gitlab.kitware.com/cmake/cmake/-/issues/26363
|
||||
(lib.cmakeFeature "CMAKE_CUDA_COMPILER_TOOLKIT_VERSION" cudaPackages.cudaMajorMinorVersion)
|
||||
|
||||
Reference in New Issue
Block a user