Skip to content

Commit

Permalink
simplify build steps.
Browse files Browse the repository at this point in the history
extract patch from code file.
this might make it easier to apply it on updated versions.
not yet tested.
  • Loading branch information
kfriedberger committed Nov 29, 2019
1 parent 197b67a commit abadda1
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 192 deletions.
6 changes: 5 additions & 1 deletion build/build-publish-solvers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,13 @@
<!-- add JNI wrapper before compiling Boolector -->
<exec executable="cp">
<arg value="lib/native/source/libboolector/interface_wrap.c"/>
<arg value="lib/native/source/libboolector/CMakeLists.txt"/>
<arg value="lib/native/source/libboolector/include_interface_and_jni.patch"/>
<arg value="${boolector.path}/src/"/>
</exec>
<exec executable="git" dir="${boolector.path}">
<arg value="apply"/>
<arg value="src/include_interface_and_jni.patch"/>
</exec>

<!-- build Boolector -->
<exec executable="./contrib/setup-picosat.sh" dir="${boolector.path}"/>
Expand Down
191 changes: 0 additions & 191 deletions lib/native/source/libboolector/CMakeLists.txt

This file was deleted.

27 changes: 27 additions & 0 deletions lib/native/source/libboolector/include_interface_and_jni.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e2781eb..b838d8e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,6 +1,7 @@
set(libboolector_src_files
aigprop.c
boolector.c
+ interface_wrap.c
boolectormc.c
btorabort.c
btoraig.c
@@ -96,6 +97,14 @@ target_include_directories(boolector
target_include_directories(boolector PRIVATE ${Btor2Tools_INCLUDE_DIR})
target_link_libraries(boolector ${Btor2Tools_LIBRARIES})

+find_package(JNI)
+if(JNI_FOUND)
+ message (STATUS "JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}")
+ message (STATUS "JNI_LIBRARIES=${JNI_LIBRARIES}")
+ target_include_directories(boolector PRIVATE ${JNI_INCLUDE_DIRS})
+ target_link_libraries(boolector ${JNI_LIBRARIES})
+endif()
+
if(GMP_FOUND)
target_include_directories(boolector PRIVATE ${GMP_INCLUDE_DIR})
target_link_libraries(boolector ${GMP_LIBRARIES})

0 comments on commit abadda1

Please sign in to comment.