Skip to content

Commit

Permalink
option to skip native library load
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdullinAM committed Jul 7, 2022
1 parent 45bafd7 commit bef461a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.vorpal.research</groupId>
<artifactId>boolector-java</artifactId>
<version>3.2.6</version>
<version>3.2.7</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -67,4 +67,4 @@
<url>https://maven.pkg.github.com/vorpal-research/kotlin-maven</url>
</repository>
</distributionManagement>
</project>
</project>
15 changes: 9 additions & 6 deletions src/main/java/org/vorpal/research/boolector/Btor.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,15 @@ public Btor() {
}

static {
try {
NativeUtils.loadLibrary("boolector");
NativeUtils.loadLibrary("boolector-java");
} catch (IOException e) {
e.printStackTrace();
throw new IllegalStateException("Unable to load dynamic libraries");
boolean skipLoad = Boolean.parseBoolean(System.getProperty("boolector.skipLibraryLoad", "false"));
if (!skipLoad) {
try {
NativeUtils.loadLibrary("boolector");
NativeUtils.loadLibrary("boolector-java");
} catch (IOException e) {
e.printStackTrace();
throw new IllegalStateException("Unable to load dynamic libraries");
}
}
}

Expand Down

0 comments on commit bef461a

Please sign in to comment.