···59 # Required in addition to ccRoot as otherwise bin/gcc is looked up
60 # when building CMakeCUDACompilerId.cu
61 substitutions.ccFullPath = "${backendStdenv.cc}/bin/${backendStdenv.cc.targetPrefix}c++";
62-63- # Required by cmake's enable_language(CUDA) to build a test program
64- substitutions.cudartRoot = prev.lib.getDev (final.cuda_cudart or final.cudatoolkit);
65 }
66 ./hooks/setup-cuda-hook.sh)
67 { });
···59 # Required in addition to ccRoot as otherwise bin/gcc is looked up
60 # when building CMakeCUDACompilerId.cu
61 substitutions.ccFullPath = "${backendStdenv.cc}/bin/${backendStdenv.cc.targetPrefix}c++";
00062 }
63 ./hooks/setup-cuda-hook.sh)
64 { });
···1+# shellcheck shell=bash
2+3+# CMake's enable_language(CUDA) runs a compiler test and it doesn't account for
4+# CUDAToolkit_ROOT. We have to help it locate libcudart
5+export NVCC_APPEND_FLAGS+=" -L@cudartRoot@/lib -I@cudartRoot@/include"
···27 inherit (prev.backendStdenv) cc;
28 in
29 {
0000030 # Point NVCC at a compatible compiler
3132 # Desiredata: whenever a package (e.g. magma) adds cuda_nvcc to
···27 inherit (prev.backendStdenv) cc;
28 in
29 {
30+ # Required by cmake's enable_language(CUDA) to build a test program
31+ # When implementing cross-compilation support: this is
32+ # final.pkgs.targetPackages.cudaPackages.cuda_cudart
33+ env.cudartRoot = "${prev.lib.getDev final.cuda_cudart}";
34+35 # Point NVCC at a compatible compiler
3637 # Desiredata: whenever a package (e.g. magma) adds cuda_nvcc to