xgboost: fix cmake for cuda>=11.4

This commit is contained in:
Someone Serge 2022-04-07 20:19:51 +03:00
parent a7bbda4271
commit 325adc9280
No known key found for this signature in database
GPG key ID: 7B0E3B1390D61DA4

View file

@ -33,6 +33,7 @@ stdenv.mkDerivation rec {
cmakeFlags = lib.optionals doCheck [ "-DGOOGLE_TEST=ON" ]
++ lib.optionals cudaSupport [ "-DUSE_CUDA=ON" "-DCUDA_HOST_COMPILER=${cudatoolkit.cc}/bin/cc" ]
++ lib.optionals (cudaSupport && lib.versionAtLeast cudatoolkit.version "11.4.0") [ "-DBUILD_WITH_CUDA_CUB=ON" ]
++ lib.optionals ncclSupport [ "-DUSE_NCCL=ON" ];
inherit doCheck;