Build: disable gtests entirely for Python module

To avoid test failure on Windows.
This commit is contained in:
Brecht Van Lommel 2022-09-18 11:21:25 +02:00
parent 3ff15a9e23
commit 892a5f8176
2 changed files with 5 additions and 14 deletions

View File

@ -1272,6 +1272,11 @@ endif()
if(WITH_PYTHON_MODULE)
add_definitions(-DPy_ENABLE_SHARED)
# Not currently supported due to different required Python link flags.
if(WITH_GTESTS)
message(STATUS "GTests not compatible with Python module, disabling WITH_GTESTS")
set(WITH_GTESTS OFF)
endif()
endif()

View File

@ -418,13 +418,6 @@ function(blender_add_test_lib
library_deps
)
# Not currently supported for Python module due to different required
# Python link flags.
if(WITH_PYTHON_MODULE)
add_custom_target(${name})
return()
endif()
add_cc_flags_custom_test(${name} PARENT_SCOPE)
# Otherwise external projects will produce warnings that we cannot fix.
@ -471,13 +464,6 @@ function(blender_add_test_executable
library_deps
)
# Not currently supported for Python module due to different required
# Python link flags.
if(WITH_PYTHON_MODULE)
add_custom_target(${name})
return()
endif()
add_cc_flags_custom_test(${name} PARENT_SCOPE)
## Otherwise external projects will produce warnings that we cannot fix.