Unverified Commit bfb24acb authored by Someone Serge's avatar Someone Serge
Browse files

cudaPackages_10.cudatoolkit: fix infinite recursion in setupCudaHook

parent 9f46beb6
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -59,9 +59,6 @@ final: prev: let
          # Required in addition to ccRoot as otherwise bin/gcc is looked up
          # when building CMakeCUDACompilerId.cu
          substitutions.ccFullPath = "${backendStdenv.cc}/bin/${backendStdenv.cc.targetPrefix}c++";

          # Required by cmake's enable_language(CUDA) to build a test program
          substitutions.cudartRoot = prev.lib.getDev (final.cuda_cudart or final.cudatoolkit);
        }
        ./hooks/setup-cuda-hook.sh)
    { });
+5 −0
Original line number Diff line number Diff line
# shellcheck shell=bash

# CMake's enable_language(CUDA) runs a compiler test and it doesn't account for
# CUDAToolkit_ROOT. We have to help it locate libcudart
export NVCC_APPEND_FLAGS+=" -L@cudartRoot@/lib -I@cudartRoot@/include"
+5 −0
Original line number Diff line number Diff line
@@ -27,6 +27,11 @@ in
      inherit (prev.backendStdenv) cc;
    in
    {
      # Required by cmake's enable_language(CUDA) to build a test program
      # When implementing cross-compilation support: this is
      # final.pkgs.targetPackages.cudaPackages.cuda_cudart
      env.cudartRoot = "${prev.lib.getDev final.cuda_cudart}";

      # Point NVCC at a compatible compiler

      # Desiredata: whenever a package (e.g. magma) adds cuda_nvcc to