Fix: GPU: Asserts when building WITH_GPU_DRAW_TESTS but without WITH_GTEST

This commit is contained in:
Clément Foucault
2024-11-26 22:39:13 +01:00
parent 7faec42236
commit 112b3bae84
2 changed files with 8 additions and 2 deletions

View File

@@ -750,6 +750,10 @@ if(WITH_GPU_DRAW_TESTS)
add_definitions(-DWITH_GPU_DRAW_TESTS)
endif()
if(WITH_GTEST)
add_definitions(-DWITH_GTEST)
endif()
blender_add_lib(bf_gpu "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
target_link_libraries(bf_gpu PUBLIC
bf_compositor_shaders

View File

@@ -38,8 +38,10 @@
#include "gpu_shader_text_info.hh"
#include "gpu_srgb_to_framebuffer_space_info.hh"
#ifdef WITH_GPU_DRAW_TESTS
# include "gpu_shader_test_info.hh"
#ifdef WITH_GTEST
# ifdef WITH_GPU_DRAW_TESTS
# include "gpu_shader_test_info.hh"
# endif
#endif
#ifdef WITH_METAL_BACKEND