Do not allow to build Python bindings if building statically (#4784)
authorAndrew V. Jones <andrew.jones@vector.com>
Thu, 17 Sep 2020 07:18:43 +0000 (08:18 +0100)
committerGitHub <noreply@github.com>
Thu, 17 Sep 2020 07:18:43 +0000 (09:18 +0200)
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

index 0a4b5aea4ecc1bdfaf52821bfd6b987d31563ec9..849adf7049278d692acc9f54401795a1f93d0ceb 100644 (file)
@@ -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()
 
 #-----------------------------------------------------------------------------#