From c6ce421432849ee007a89150c6eae2ee63c2b471 Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Fri, 8 Apr 2022 08:42:06 -0400 Subject: [PATCH] CMakeLists.txt - Python bindings are not supported in Unity builds fixes #284 --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 13b1ccd1..ac7879c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -284,6 +284,10 @@ if(${PROJECT_NAME}_PYTHON_BINDINGS) if(CMAKE_BUILD_TYPE MATCHES "^[Dd]eb" OR ${PROJECT_NAME}_STATIC) message(FATAL_ERROR "** Python Bindings are disabled in debug or static builds.") endif() + if(CMAKE_UNITY_BUILD) + message(FATAL_ERROR "** Python Bindings are disabled in Unity builds. " + "Try again with CMAKE_UNITY_BUILD=OFF") + endif() endif() if(${PROJECT_NAME}_PYTHON_BINDINGS) add_subdirectory(python)