From: Andres Noetzli Date: Wed, 5 Jun 2019 16:36:40 +0000 (-0700) Subject: Add support for SWIG 4 (#3041) X-Git-Tag: cvc5-1.0.0~4124 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c587235d29d2e3e1cd52a9f76dde8f58c89ae37e;p=cvc5.git Add support for SWIG 4 (#3041) SWIG 4 seems to change the name for `std::map` to include the implicit template argument for comparisons. To make the code compatible with both SWIG 4.0.0 and older versions, this commit creates an explicit instance of the template. --- diff --git a/src/bindings/java/CMakeLists.txt b/src/bindings/java/CMakeLists.txt index 7b7d93f1d..b1631f369 100644 --- a/src/bindings/java/CMakeLists.txt +++ b/src/bindings/java/CMakeLists.txt @@ -131,6 +131,7 @@ set(gen_java_files ${CMAKE_CURRENT_BINARY_DIR}/LastExceptionBuffer.java ${CMAKE_CURRENT_BINARY_DIR}/LogicException.java ${CMAKE_CURRENT_BINARY_DIR}/LogicInfo.java + ${CMAKE_CURRENT_BINARY_DIR}/Map_ExprExpr.java ${CMAKE_CURRENT_BINARY_DIR}/ModalException.java ${CMAKE_CURRENT_BINARY_DIR}/OptionException.java ${CMAKE_CURRENT_BINARY_DIR}/Options.java @@ -165,7 +166,6 @@ set(gen_java_files ${CMAKE_CURRENT_BINARY_DIR}/SExpr.java ${CMAKE_CURRENT_BINARY_DIR}/SExprKeyword.java ${CMAKE_CURRENT_BINARY_DIR}/SExprType.java - ${CMAKE_CURRENT_BINARY_DIR}/Statistic.java ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_CVC4__Model.java ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_CVC4__Printer.java ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_CVC4__api__Solver.java @@ -178,7 +178,6 @@ set(gen_java_files ${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__mapT_CVC4__Expr_CVC4__Expr_t.java ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_std__ostream.java ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_std__shared_ptrT_CVC4__SygusPrintCallback_t.java ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_std__string.java @@ -201,16 +200,17 @@ set(gen_java_files ${CMAKE_CURRENT_BINARY_DIR}/SmtEngine.java ${CMAKE_CURRENT_BINARY_DIR}/SortConstructorType.java ${CMAKE_CURRENT_BINARY_DIR}/SortType.java + ${CMAKE_CURRENT_BINARY_DIR}/Statistic.java ${CMAKE_CURRENT_BINARY_DIR}/Statistics.java ${CMAKE_CURRENT_BINARY_DIR}/StatisticsBase.java ${CMAKE_CURRENT_BINARY_DIR}/StringType.java ${CMAKE_CURRENT_BINARY_DIR}/SygusConstraintCommand.java - ${CMAKE_CURRENT_BINARY_DIR}/SynthFunCommand.java ${CMAKE_CURRENT_BINARY_DIR}/SygusGTerm.java ${CMAKE_CURRENT_BINARY_DIR}/SygusInvConstraintCommand.java ${CMAKE_CURRENT_BINARY_DIR}/SygusPrintCallback.java ${CMAKE_CURRENT_BINARY_DIR}/SymbolTable.java ${CMAKE_CURRENT_BINARY_DIR}/SymbolType.java + ${CMAKE_CURRENT_BINARY_DIR}/SynthFunCommand.java ${CMAKE_CURRENT_BINARY_DIR}/TesterType.java ${CMAKE_CURRENT_BINARY_DIR}/TheoryId.java ${CMAKE_CURRENT_BINARY_DIR}/Timer.java diff --git a/src/smt/smt_engine.i b/src/smt/smt_engine.i index c054cb666..4018cc3dc 100644 --- a/src/smt/smt_engine.i +++ b/src/smt/smt_engine.i @@ -42,6 +42,9 @@ SWIGEXPORT void JNICALL Java_edu_nyu_acsys_CVC4_SmtEngine_dlRef(JNIEnv* jenv, jc swigCPtr = 0; } } + +%template(Map_ExprExpr) std::map; + #endif // SWIGJAVA %ignore CVC4::SmtEngine::setLogic(const char*);