cudaPackages_10.cudatoolkit: fix infinite recursion in setupCudaHook
This commit is contained in:
parent
9f46beb6a7
commit
bfb24acbd0
|
@ -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)
|
||||
{ });
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
# 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"
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue