opencv3: fix compilation with CUDA support

This commit is contained in:
Nikolay Amiantov 2018-02-25 20:06:20 +03:00
parent 8711763d42
commit a10c91d5ae
2 changed files with 8 additions and 9 deletions

View File

@ -242,9 +242,9 @@ stdenv.mkDerivation rec {
(opencvFlag "CUBLAS" enableCuda)
] ++ lib.optionals enableCuda [
"-DCUDA_FAST_MATH=ON"
"-DCUDA_HOST_COMPILER=${cudatoolkit.cc}/bin/gcc"
]
++ lib.optionals stdenv.isDarwin [
"-DCUDA_HOST_COMPILER=${cudatoolkit.cc}/bin/cc"
"-DCUDA_NVCC_FLAGS=--expt-relaxed-constexpr"
] ++ lib.optionals stdenv.isDarwin [
"-DWITH_OPENCL=OFF"
"-DWITH_LAPACK=OFF"

View File

@ -10623,7 +10623,6 @@ with pkgs;
opencv3 = callPackage ../development/libraries/opencv/3.x.nix {
enableCuda = config.cudaSupport or false;
cudatoolkit = cudatoolkit8;
inherit (darwin.apple_sdk.frameworks) AVFoundation Cocoa QTKit VideoDecodeAcceleration;
};