Skip to content

Commit 8aa89be

Browse files
author
Norbert Manthey
committed
build: introduce LIBSOLVER environment variable
When building solvers.a while aiming at building CBMC with support for IPASIR solvers, all projects that need SAT checkers would require to link against the provided libipasir.a library. To make this library visible for all subprojects at the same time, but furthermore allow the user to choose which library to pick, the variable LIBSOLVER was introduced, which is set to an empty value by default. To get started with the default ipasir package, run the following commands in the root directory of the repository: make ipasir-build -C src make -C src IPASIR=../../ipasir LIBSOLVER=$(pwd)/ipasir/libipasir.a
1 parent df45bdb commit 8aa89be

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/config.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ MINISAT2 = ../../minisat-2.2.1
2626
#GLUCOSE = ../../glucose-syrup
2727
#SMVSAT =
2828

29+
# Extra library for SAT solver. This should link to the archive file to be used
30+
# when linking against an IPASIR solver.
31+
LIBSOLVER =
32+
2933
ifneq ($(PRECOSAT),)
3034
CP_CXXFLAGS += -DSATCHECK_PRECOSAT
3135
endif

src/solvers/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,4 +222,4 @@ endif
222222
solvers$(LIBEXT): $(OBJ) $(CHAFF_LIB) $(BOOLEFORCE_LIB) $(MINISAT_LIB) \
223223
$(MINISAT2_LIB) $(SMVSAT_LIB) $(SQUOLEM2_LIB) $(CUDD_LIB) \
224224
$(PRECOSAT_LIB) $(PICOSAT_LIB) $(LINGELING_LIB) $(GLUCOSE_LIB)
225-
$(LINKLIB)
225+
$(LINKLIB) $(LIBSOLVER)

0 commit comments

Comments
 (0)