From: Andres Noetzli Date: Wed, 12 Jun 2019 00:21:54 +0000 (-0700) Subject: Fix compilation issue for Java bindings + CLN (#3045) X-Git-Tag: cvc5-1.0.0~4115 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=707734fb384203d6b1c87fcec4cc14ce6fc9ed97;p=cvc5.git Fix compilation issue for Java bindings + CLN (#3045) Fixes #3044. When using CLN instead of GMP, SWIG produces different Java files for the CLN classes. The bindings expected the GMP files even when building with CLN, so compilation failed. This commit fixes the issue by changing the list of files depending on whether we build with CLN or GMP. --- diff --git a/src/bindings/java/CMakeLists.txt b/src/bindings/java/CMakeLists.txt index b1631f369..6277b2794 100644 --- a/src/bindings/java/CMakeLists.txt +++ b/src/bindings/java/CMakeLists.txt @@ -175,8 +175,6 @@ set(gen_java_files ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_ListenerCollection__Registration.java ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_MaybeT_CVC4__Rational_t.java ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_Type.java - ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_mpq_class.java - ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_mpz_class.java ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_std__istream.java ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_std__ostream.java ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_std__shared_ptrT_CVC4__SygusPrintCallback_t.java @@ -242,6 +240,18 @@ set(gen_java_files ${CMAKE_CURRENT_BINARY_DIR}/vectorVectorExpr.java ) +if(CVC4_USE_CLN_IMP) + list(APPEND gen_java_files + ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_cln__cl_I.java + ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_cln__cl_RA.java + ) +elseif(CVC4_USE_GMP_IMP) + list(APPEND gen_java_files + ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_mpq_class.java + ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_mpz_class.java + ) +endif() + set(CMAKE_JNI_TARGET TRUE) add_jar(cvc4jar SOURCES ${gen_java_files}