srsran: fix CPU option selection, split output (#376963)
This commit is contained in:
commit
d5d087e0c6
@ -14,6 +14,10 @@
|
||||
soapysdr-with-plugins,
|
||||
libbladeRF,
|
||||
zeromq,
|
||||
enableAvx ? stdenv.hostPlatform.avxSupport,
|
||||
enableAvx2 ? stdenv.hostPlatform.avx2Support,
|
||||
enableFma ? stdenv.hostPlatform.fmaSupport,
|
||||
enableAvx512 ? stdenv.hostPlatform.avx512Support,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -27,6 +31,11 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-3cQMZ75I4cyHpik2d/eBuzw7M4OgbKqroCddycw4uW8=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
@ -45,7 +54,17 @@ stdenv.mkDerivation rec {
|
||||
zeromq
|
||||
];
|
||||
|
||||
cmakeFlags = [ "-DENABLE_WERROR=OFF" ];
|
||||
cmakeFlags = [
|
||||
"-DENABLE_WERROR=OFF"
|
||||
(lib.cmakeBool "ENABLE_AVX" enableAvx)
|
||||
(lib.cmakeBool "ENABLE_AVX2" enableAvx2)
|
||||
(lib.cmakeBool "ENABLE_FMA" enableFma)
|
||||
(lib.cmakeBool "ENABLE_AVX512" enableAvx512)
|
||||
];
|
||||
|
||||
postInstall = lib.optionalString (!stdenv.hostPlatform.isStatic) ''
|
||||
rm $out/lib/*.a
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.srslte.com/";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user