From a2cc6d256ac420d4662e725fd7d4d0cbc42cfdea Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Thu, 3 Mar 2016 21:15:53 +0000 Subject: [PATCH] Emit an error message if building the Python bindings is enabled but libz3 is built statically. This build combination doesn't work because the Python bindings need a dynamic libz3. --- contrib/cmake/src/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/cmake/src/CMakeLists.txt b/contrib/cmake/src/CMakeLists.txt index c4f6b3334..5e60d7e9d 100644 --- a/contrib/cmake/src/CMakeLists.txt +++ b/contrib/cmake/src/CMakeLists.txt @@ -217,6 +217,10 @@ add_subdirectory(test) ################################################################################ option(BUILD_PYTHON_BINDINGS "Build Python bindings for Z3" OFF) if (BUILD_PYTHON_BINDINGS) + if (NOT BUILD_LIBZ3_SHARED) + message(FATAL_ERROR "The python bindings will not work with a static libz3. " + "You either need to disable BUILD_PYTHON_BINDINGS or enable BUILD_LIBZ3_SHARED") + endif() add_subdirectory(api/python) endif()