diff options
author | Julian Eisel <julian@blender.org> | 2020-03-26 23:03:42 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-03-26 23:18:45 +0300 |
commit | c94b6209861ca7cc3985b53474feed7d94c0221a (patch) | |
tree | 752054f0dca1338cda5cf8ad4f6d18573fcca3b9 /build_files/cmake/Modules/GTestTesting.cmake | |
parent | 357ed79cb93f9d655501a828c6cddd68282de62d (diff) | |
parent | afb1a64ccb81b7ed792f64151986f40f53af8da5 (diff) |
Merge branch 'master' into wm-drag-drop-rewrite
Diffstat (limited to 'build_files/cmake/Modules/GTestTesting.cmake')
-rw-r--r-- | build_files/cmake/Modules/GTestTesting.cmake | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/build_files/cmake/Modules/GTestTesting.cmake b/build_files/cmake/Modules/GTestTesting.cmake index 30b10ae5980..04e1670aef6 100644 --- a/build_files/cmake/Modules/GTestTesting.cmake +++ b/build_files/cmake/Modules/GTestTesting.cmake @@ -40,9 +40,17 @@ 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}) + if(WITH_OPENIMAGEDENOISE) + target_link_libraries(${TARGET_NAME} ${OPENIMAGEDENOISE_LIBRARIES}) + endif() + endif() target_link_libraries(${TARGET_NAME} - ${ARG_EXTRA_LIBS} - ${PLATFORM_LINKLIBS} bf_testing_main bf_intern_eigen bf_intern_guardedalloc @@ -55,6 +63,9 @@ macro(BLENDER_SRC_GTEST_EX) if(WITH_OPENMP_STATIC) target_link_libraries(${TARGET_NAME} ${OpenMP_LIBRARIES}) endif() + if(UNIX AND NOT APPLE) + target_link_libraries(${TARGET_NAME} bf_intern_libc_compat) + endif() get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) if(GENERATOR_IS_MULTI_CONFIG) |