From ad4f264cbab0236607534ecd3414ebd8a36b69e6 Mon Sep 17 00:00:00 2001 From: "Andrew V. Jones" Date: Thu, 17 Sep 2020 08:18:43 +0100 Subject: [PATCH] Do not allow to build Python bindings if building statically (#4784) This PR disables building the Python bindings if you're doing a static build (which makes sense, because there's no such thing as a "static" Python module). Signed-off-by: Andrew V. Jones andrew.jones@vector.com --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a4b5aea4..849adf704 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -328,6 +328,11 @@ else() message(WARNING "Disabling unit tests since static build is enabled.") set(ENABLE_UNIT_TESTING OFF) endif() + + if (BUILD_BINDINGS_PYTHON) + message(FATAL_ERROR "Building Python bindings is not possible " + "when building statically") + endif() endif() #-----------------------------------------------------------------------------# -- 2.30.2