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,15 +242,15 @@ stdenv.mkDerivation rec {
(opencvFlag "CUBLAS" enableCuda)
] ++ lib.optionals enableCuda [
"-DCUDA_FAST_MATH=ON"
"-DCUDA_HOST_COMPILER=${cudatoolkit.cc}/bin/gcc"
]
++ lib.optionals stdenv.isDarwin [
"-DWITH_OPENCL=OFF"
"-DWITH_LAPACK=OFF"
"-DCUDA_HOST_COMPILER=${cudatoolkit.cc}/bin/cc"
"-DCUDA_NVCC_FLAGS=--expt-relaxed-constexpr"
] ++ lib.optionals stdenv.isDarwin [
"-DWITH_OPENCL=OFF"
"-DWITH_LAPACK=OFF"
# On OS X the tiny-dnn-1.0.0a3 dependency of dnn_modern fails to build.
"-DBUILD_opencv_dnn_modern=OFF"
];
# On OS X the tiny-dnn-1.0.0a3 dependency of dnn_modern fails to build.
"-DBUILD_opencv_dnn_modern=OFF"
];
enableParallelBuilding = true;

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;
};