[Bf-blender-cvs] [5e96b860a37] master: Windows: Fix failing tests due to missing manifest.

Ray Molenkamp noreply at git.blender.org
Fri Dec 6 19:37:22 CET 2019


Commit: 5e96b860a372a87dd94131af75289160cc5911ee
Author: Ray Molenkamp
Date:   Fri Dec 6 11:36:49 2019 -0700
Branches: master
https://developer.blender.org/rB5e96b860a372a87dd94131af75289160cc5911ee

Windows: Fix failing tests due to missing manifest.

Tests were missing a manifest, and were importing the
wrong version of Microsoft.Windows.Common-Controls
causing blenloader_test, bmesh_core_test and alembic_test
to fail due a loader error.

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

M	build_files/cmake/Modules/GTestTesting.cmake
M	build_files/cmake/platform/platform_win32_bundle_crt.cmake

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

diff --git a/build_files/cmake/Modules/GTestTesting.cmake b/build_files/cmake/Modules/GTestTesting.cmake
index 2a05b92ba3f..30b10ae5980 100644
--- a/build_files/cmake/Modules/GTestTesting.cmake
+++ b/build_files/cmake/Modules/GTestTesting.cmake
@@ -34,8 +34,10 @@ macro(BLENDER_SRC_GTEST_EX)
       ${CMAKE_SOURCE_DIR}/extern/gmock/include
     )
     unset(_current_include_directories)
-
-    add_executable(${TARGET_NAME} ${ARG_SRC})
+    if(WIN32)
+      set(MANIFEST "${CMAKE_BINARY_DIR}/tests.exe.manifest")
+    endif()
+    add_executable(${TARGET_NAME} ${ARG_SRC} ${MANIFEST})
     target_include_directories(${TARGET_NAME} PUBLIC "${TEST_INC}")
     target_include_directories(${TARGET_NAME} SYSTEM PUBLIC "${TEST_INC_SYS}")
     target_link_libraries(${TARGET_NAME}
@@ -75,6 +77,9 @@ macro(BLENDER_SRC_GTEST_EX)
       # that we can't fix.
       set_tests_properties(${TARGET_NAME} PROPERTIES ENVIRONMENT LSAN_OPTIONS=exitcode=0)
     endif()
+    if(WIN32)
+      unset(MANIFEST)
+    endif()
     unset(TEST_INC)
     unset(TEST_INC_SYS)
     unset(TARGET_NAME)
diff --git a/build_files/cmake/platform/platform_win32_bundle_crt.cmake b/build_files/cmake/platform/platform_win32_bundle_crt.cmake
index a4aa608b013..e84a139fac9 100644
--- a/build_files/cmake/platform/platform_win32_bundle_crt.cmake
+++ b/build_files/cmake/platform/platform_win32_bundle_crt.cmake
@@ -1,3 +1,6 @@
+# First generate the manifest for tests since it will not need the dependency on the CRT.
+configure_file(${CMAKE_SOURCE_DIR}/release/windows/manifest/blender.exe.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/tests.exe.manifest @ONLY)
+
 if(WITH_WINDOWS_BUNDLE_CRT)
   set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
   set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)



More information about the Bf-blender-cvs mailing list