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