added cuda cmake flags (allows GPU acceleration of some of the libraries functions)

This commit is contained in:
alexanderWatanabe 2020-04-13 01:22:45 +09:00
parent 35d8514a91
commit c45155d6b7

View File

@ -3,6 +3,7 @@
# see http://dlib.net/compile.html
, avxSupport ? true
, cudaSupport ? true
}:
stdenv.mkDerivation rec {
@ -20,7 +21,9 @@ stdenv.mkDerivation rec {
rm -rf dlib/external
'';
cmakeFlags = [ "-DUSE_AVX_INSTRUCTIONS=${if avxSupport then "yes" else "no"}" ];
cmakeFlags = [
"-DUSE_DLIB_USE_CUDA=${if cudaSupport then "1" else "0"}"
"-DUSE_AVX_INSTRUCTIONS=${if avxSupport then "yes" else "no"}" ];
enableParallelBuilding = true;
nativeBuildInputs = [ cmake pkgconfig ];