From c637e749b2bab67f9ce27937cf0430965cacc907 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 7 Apr 2017 16:06:05 +0200 Subject: Tests: Fix compilation error with static OpenMP --- build_files/cmake/Modules/GTestTesting.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build_files/cmake/Modules/GTestTesting.cmake b/build_files/cmake/Modules/GTestTesting.cmake index 0732e10133c..e688db35ef1 100644 --- a/build_files/cmake/Modules/GTestTesting.cmake +++ b/build_files/cmake/Modules/GTestTesting.cmake @@ -39,6 +39,9 @@ macro(BLENDER_SRC_GTEST_EX NAME SRC EXTRA_LIBS DO_ADD_TEST) ${PTHREADS_LIBRARIES} extern_glog extern_gflags) + if(WITH_OPENMP_STATIC) + target_link_libraries(${NAME}_test ${OpenMP_LIBRARIES}) + endif() set_target_properties(${NAME}_test PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${TESTS_OUTPUT_DIR}" RUNTIME_OUTPUT_DIRECTORY_RELEASE "${TESTS_OUTPUT_DIR}" -- cgit v1.2.3