diff options
author | makaimann <makaim@stanford.edu> | 2018-10-22 16:24:05 -0700 |
---|---|---|
committer | Andres Noetzli <andres.noetzli@gmail.com> | 2018-10-22 16:24:05 -0700 |
commit | 2f97221cc16f175568ea240768e5818b35472adf (patch) | |
tree | 2496288a4f3dd3536e62b9ac300d8544c75cfc4e /src/bindings | |
parent | 93f4888b6bce4766ef3af0830b5c057a1cd11399 (diff) |
Fail for SWIG 3.0.8 (#2656)
Ran into this bug when compiling with python3 bindings: https://github.com/swig/swig/issues/588
Instantiating any object crashes python. Since swig3.0.8 is currently the apt-get install for Ubuntu 16.04, I thought it'd be good to have a check for that. If python3 is preferred and the swig version is 3.0.8, it errors out and asks users to downgrade or upgrade SWIG.
Diffstat (limited to 'src/bindings')
-rw-r--r-- | src/bindings/CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bindings/CMakeLists.txt b/src/bindings/CMakeLists.txt index 1c62ecd58..135331e54 100644 --- a/src/bindings/CMakeLists.txt +++ b/src/bindings/CMakeLists.txt @@ -3,6 +3,13 @@ if(NOT ENABLE_SHARED) endif() find_package(SWIG 3.0.0 REQUIRED) + +if(USE_PYTHON3 AND (SWIG_VERSION VERSION_EQUAL 3.0.8)) + message(FATAL_ERROR + "\nSWIG ${SWIG_VERSION} is not supported for python3 bindings because of the following bug: https://github.com/swig/swig/issues/588 +Please downgrade to 3.0.0-3.0.7 or upgrade.") +endif() + include(${SWIG_USE_FILE}) set(CVC4_SWIG_INTERFACE ${PROJECT_SOURCE_DIR}/src/cvc4.i) |