diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2021-05-24 20:21:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-25 03:21:16 +0000 |
commit | 8e1eac35d265eacfbeb5f16be61e5d4caf45d1af (patch) | |
tree | 0cb4f15e26695cddc18a7de327d015e771fe1323 /test | |
parent | 8b68ade92a8687c85a595b116da2da9ca03af5ed (diff) |
[Unit tests] Fix path of Java bindings (#6616)
Currently, when configuring cvc5 with Java bindings, CMake complains
about `get_filename_component(CVC5_JNI_PATH ${CVC5_JAR_PATH} DIRECTORY)`
not using the correct number of arguments in the Java unit tests. The
issue is that `${CVC5_JAR_PATH}` is empty. The value of
`${CVC5_JAR_PATH}` was computed in the Java API bindings but then not
shared with the rest of the build system. Because `${CVC5_JAR_PATH}` is
not used anywhere else, this commit moves the computation of
`${CVC5_JAR_PATH}` to the unit tests. The commit also ensures that the
API subdirectories are processed before the test subdirectories.
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/api/java/CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/unit/api/java/CMakeLists.txt b/test/unit/api/java/CMakeLists.txt index 0ef649b87..fe497ef3b 100644 --- a/test/unit/api/java/CMakeLists.txt +++ b/test/unit/api/java/CMakeLists.txt @@ -17,6 +17,8 @@ find_package(Java REQUIRED) include(UseJava) find_package(JUnit REQUIRED) +get_target_property(CVC5_JAR_PATH cvc5jar JAR_FILE) + # specify source files for junit tests set(java_test_src_files ${CMAKE_CURRENT_SOURCE_DIR}/cvc5/SolverTest.java |