Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2020-01-31 14:51:35 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2020-01-31 14:56:20 +0300
commitc82b8c5944d85a24fcb1b6552e970accb4628c9d (patch)
treea524a7755566440e87c5d8145669b6932c99e9ed /build_files/cmake/Modules
parenta075f45526eccb218314368859ac4ce9138bd0be (diff)
Fix tests failing on AMD Ryzen, due TBB initialization order issue
Similar fix as the one we did for the blender executable, see T72015.
Diffstat (limited to 'build_files/cmake/Modules')
-rw-r--r--build_files/cmake/Modules/GTestTesting.cmake9
1 files changed, 7 insertions, 2 deletions
diff --git a/build_files/cmake/Modules/GTestTesting.cmake b/build_files/cmake/Modules/GTestTesting.cmake
index 30b10ae5980..c9f62906ae0 100644
--- a/build_files/cmake/Modules/GTestTesting.cmake
+++ b/build_files/cmake/Modules/GTestTesting.cmake
@@ -40,9 +40,14 @@ macro(BLENDER_SRC_GTEST_EX)
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} ${ARG_EXTRA_LIBS} ${PLATFORM_LINKLIBS})
+ if(WITH_TBB)
+ # Force TBB libraries to be in front of MKL (part of OpenImageDenoise), so
+ # that it is initialized before MKL and static library initialization order
+ # issues are avoided.
+ target_link_libraries(${TARGET_NAME} ${TBB_LIBRARIES})
+ endif()
target_link_libraries(${TARGET_NAME}
- ${ARG_EXTRA_LIBS}
- ${PLATFORM_LINKLIBS}
bf_testing_main
bf_intern_eigen
bf_intern_guardedalloc