From c45155d6b7dcda450016a548fd399628efd5063b Mon Sep 17 00:00:00 2001 From: alexanderWatanabe Date: Mon, 13 Apr 2020 01:22:45 +0900 Subject: [PATCH] added cuda cmake flags (allows GPU acceleration of some of the libraries functions) --- pkgs/development/libraries/dlib/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/dlib/default.nix b/pkgs/development/libraries/dlib/default.nix index e4259e1686c8..e7cc12e0db51 100644 --- a/pkgs/development/libraries/dlib/default.nix +++ b/pkgs/development/libraries/dlib/default.nix @@ -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 ];