Tests: Fix compilation error with static OpenMP
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 7 Apr 2017 14:06:05 +0000 (16:06 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 7 Apr 2017 14:06:28 +0000 (16:06 +0200)
build_files/cmake/Modules/GTestTesting.cmake

index 0732e10133c7643a098a55ae692d3b521ca4b5d9..e688db35ef12be6e9ff58948bad2e8b3431e54eb 100644 (file)
@@ -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}"