lapack: enable shared libraries, cblas, and tests

This commit is contained in:
Matthew Bauer 2020-03-26 20:03:02 -04:00
parent 10100a97c8
commit 90326ba624

View file

@ -4,7 +4,7 @@
gfortran,
cmake,
python2,
shared ? false
shared ? true
}:
let
inherit (stdenv.lib) optional;
@ -22,16 +22,16 @@ stdenv.mkDerivation {
sha256 = "0sxnc97z67i7phdmcnq8f8lmxgw10wdwvr8ami0w3pb179cgrbpb";
};
buildInputs = [ gfortran ];
nativeBuildInputs = [ python2 cmake ];
nativeBuildInputs = [ gfortran python2 cmake ];
cmakeFlags = [
"-DCMAKE_Fortran_FLAGS=-fPIC"
"-DLAPACKE=ON"
"-DCBLAS=ON"
]
++ (optional shared "-DBUILD_SHARED_LIBS=ON");
++ optional shared "-DBUILD_SHARED_LIBS=ON";
doCheck = ! shared;
doCheck = true;
enableParallelBuilding = true;
@ -42,4 +42,7 @@ stdenv.mkDerivation {
license = licenses.bsd3;
platforms = platforms.all;
};
passthru.libblasName = "libblas";
passthru.libcblasName = "libcblas";
}