summaryrefslogtreecommitdiff
path: root/src/bindings/python
diff options
context:
space:
mode:
authorMathias Preiner <mathias.preiner@gmail.com>2018-08-24 12:52:49 -0700
committerMathias Preiner <mathias.preiner@gmail.com>2018-09-22 16:30:59 -0700
commitf0260ef80ee8020e6f5ee7cace54be0a568236f0 (patch)
tree7b41bbf7a86c4450ad164a6b6e6a3e6bb205ec0e /src/bindings/python
parent38c24575b3415f375b14ebfb7685a1621c7587e2 (diff)
cmake: Add SWIG support + Python and Java bindings.
Diffstat (limited to 'src/bindings/python')
-rw-r--r--src/bindings/python/CMakeLists.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/bindings/python/CMakeLists.txt b/src/bindings/python/CMakeLists.txt
new file mode 100644
index 000000000..2c2c50126
--- /dev/null
+++ b/src/bindings/python/CMakeLists.txt
@@ -0,0 +1,19 @@
+find_package(PythonLibs REQUIRED)
+include_directories(${PYTHON_INCLUDE_DIRS})
+
+set(SWIG_MODULE_CVC4_EXTRA_DEPS cvc4 cvc4parser)
+set_property(SOURCE ${CVC4_SWIG_INTERFACE} PROPERTY CPLUSPLUS ON)
+
+# Suppress -Wsuggest-override warnings for generated code
+set_property(
+ SOURCE ${CMAKE_CURRENT_BINARY_DIR}/cvc4PYTHON_wrap.cxx
+ PROPERTY COMPILE_OPTIONS -Wno-suggest-override)
+
+# The generated module should have the name _CVC4.so, hence we use CVC4 as
+# target name.
+if(${CMAKE_VERSION} VERSION_LESS "3.8.0")
+ swig_add_module(CVC4 Python ${CVC4_SWIG_INTERFACE})
+else()
+ swig_add_library(CVC4 LANGUAGE Python SOURCES ${CVC4_SWIG_INTERFACE})
+endif()
+swig_link_libraries(CVC4 cvc4 cvc4parser ${PYTHON_LIBRARIES})
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback