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.
# Add subdirectories
add_subdirectory(src)
-add_subdirectory(test)
if(BUILD_BINDINGS_PYTHON)
set(BUILD_BINDINGS_PYTHON_VERSION ${PYTHON_VERSION_MAJOR})
add_subdirectory(docs)
endif()
+add_subdirectory(test)
+
#-----------------------------------------------------------------------------#
# Package configuration
#
)
add_dependencies(cvc5jar generate-java-kinds cvc5jni cvc5)
-
-get_target_property(CVC5_JAR_PATH cvc5jar JAR_FILE)
\ No newline at end of file
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