Merge pull request #56095 from asymmetric/solc-z4-opt
solc: make z3 dependency optional
This commit is contained in:
commit
51005baa3a
@ -1,4 +1,8 @@
|
|||||||
{ stdenv, fetchzip, fetchFromGitHub, boost, cmake, z3 }:
|
{ stdenv, fetchzip, fetchFromGitHub, boost, cmake
|
||||||
|
, z3Support ? true, z3 ? null
|
||||||
|
}:
|
||||||
|
|
||||||
|
assert z3Support -> z3 != null;
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "0.5.3";
|
version = "0.5.3";
|
||||||
@ -33,6 +37,8 @@ stdenv.mkDerivation {
|
|||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DBoost_USE_STATIC_LIBS=OFF"
|
"-DBoost_USE_STATIC_LIBS=OFF"
|
||||||
"-DBUILD_SHARED_LIBS=ON"
|
"-DBUILD_SHARED_LIBS=ON"
|
||||||
|
] ++ stdenv.lib.optionals (!z3Support) [
|
||||||
|
"-DUSE_Z3=OFF"
|
||||||
];
|
];
|
||||||
|
|
||||||
doCheck = stdenv.hostPlatform.isLinux && stdenv.hostPlatform == stdenv.buildPlatform;
|
doCheck = stdenv.hostPlatform.isLinux && stdenv.hostPlatform == stdenv.buildPlatform;
|
||||||
@ -40,7 +46,8 @@ stdenv.mkDerivation {
|
|||||||
"./test/soltest -p -- --no-ipc --no-smt --testpath ../test";
|
"./test/soltest -p -- --no-ipc --no-smt --testpath ../test";
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
buildInputs = [ boost z3 ];
|
buildInputs = [ boost ]
|
||||||
|
++ stdenv.lib.optionals z3Support [ z3 ];
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user