Skip to content

Commit f786cac

Browse files
committed
Apply patch to cadical so that it compiles with gcc-11
1 parent 1d76f7b commit f786cac

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

scripts/cadical-1.4.1-patch

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/src/lookahead.cpp b/src/lookahead.cpp
2+
index 9e8a16b..3d5721a 100644
3+
--- a/src/lookahead.cpp
4+
+++ b/src/lookahead.cpp
5+
@@ -390,6 +390,7 @@ int Internal::lookahead_probing() {
6+
CubesWithStatus Internal::generate_cubes(int depth, int min_depth) {
7+
if (!active() || depth == 0) {
8+
CubesWithStatus cubes;
9+
+ cubes.status = 0;
10+
cubes.cubes.push_back(std::vector<int>());
11+
return cubes;
12+
}

src/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ cadical-download:
177177
@$(TAR) xfz $(cadical_release).tar.gz
178178
@rm -Rf ../cadical
179179
@mv cadical-$(cadical_release) ../cadical
180+
@(cd ../cadical; patch -p1 < ../scripts/cadical-1.4.1-patch)
180181
@(cd ../cadical && ./configure)
181182
# Need to rename VERSION so that it isn't picked up by `#include<version>` on
182183
# macOS which is case insensitive

src/solvers/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ foreach(SOLVER ${sat_impl})
111111

112112
download_project(PROJ cadical
113113
URL https://github.com/arminbiere/cadical/archive/rel-1.4.1.tar.gz
114-
PATCH_COMMAND true
114+
PATCH_COMMAND patch -p1 -i ${CBMC_SOURCE_DIR}/../scripts/cadical-1.4.1-patch
115115
COMMAND cmake -E copy ${CBMC_SOURCE_DIR}/../scripts/cadical_CMakeLists.txt CMakeLists.txt
116116
COMMAND ./configure
117117
URL_MD5 b44874501a175106424f4bd5de29aa59

0 commit comments

Comments
 (0)