[Bf-blender-cvs] [9a5f2f4878e] temp-T97352-3d-texturing-seam-bleeding-b2: Build: disable gtests entirely for Python module

Brecht Van Lommel noreply at git.blender.org
Tue Sep 20 10:32:14 CEST 2022


Commit: 9a5f2f4878e318aaa13902e845033e136d23b930
Author: Brecht Van Lommel
Date:   Sun Sep 18 11:21:25 2022 +0200
Branches: temp-T97352-3d-texturing-seam-bleeding-b2
https://developer.blender.org/rB9a5f2f4878e318aaa13902e845033e136d23b930

Build: disable gtests entirely for Python module

To avoid test failure on Windows.

===================================================================

M	CMakeLists.txt
M	build_files/cmake/macros.cmake

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 85e2a1450d8..b6f9046a883 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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()
 
 
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 093106fc4dc..d271d8f216f 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -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.



More information about the Bf-blender-cvs mailing list