scotch: make ptscotch optional
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
assert withParmetis -> mpiSupport;
|
||||
assert withPtScotch -> mpiSupport;
|
||||
let
|
||||
scotch' = scotch.override { inherit withPtScotch; };
|
||||
profile = if mpiSupport then "debian.PAR" else "debian.SEQ";
|
||||
LMETIS = toString ([ "-lmetis" ] ++ lib.optional withParmetis "-lparmetis");
|
||||
LSCOTCH = toString (
|
||||
@@ -78,7 +79,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"LIBEXT_SHARED=.dylib"
|
||||
]
|
||||
++ [
|
||||
"ISCOTCH=-I${lib.getDev scotch}/include"
|
||||
"ISCOTCH=-I${lib.getDev scotch'}/include"
|
||||
"LMETIS=${LMETIS}"
|
||||
"LSCOTCH=${LSCOTCH}"
|
||||
"ORDERINGSF=${ORDERINGSF}"
|
||||
@@ -115,7 +116,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
blas
|
||||
lapack
|
||||
metis
|
||||
scotch
|
||||
scotch'
|
||||
];
|
||||
|
||||
doInstallCheck = true;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
xz,
|
||||
zlib,
|
||||
mpi,
|
||||
withPtScotch ? false,
|
||||
testers,
|
||||
}:
|
||||
|
||||
@@ -33,6 +34,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
|
||||
(lib.cmakeBool "BUILD_PTSCOTCH" withPtScotch)
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -48,7 +50,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
zlib
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
propagatedBuildInputs = lib.optionals withPtScotch [
|
||||
mpi
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user