From b7a9e980a11a085a3bc7ef8e267b967197f47447 Mon Sep 17 00:00:00 2001 From: Arto Kitula Date: Sat, 26 Jan 2019 14:14:51 +0100 Subject: macOS: add support for OpenMP, making smoke/fluid/cloth simulations faster. This bring macOS on par with Windows and Linux. It uses the OpenMP library added to our precompiled libraries. Custom flags are set because FindOpenMP from CMake below 3.12 does not support AppleClang, and more recent versions do not work with our custom directory location either. Differential Revision: https://developer.blender.org/D4257 --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 2341a535603..a71677c0308 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1177,7 +1177,10 @@ endif() #----------------------------------------------------------------------------- # Configure OpenMP. if(WITH_OPENMP) - find_package(OpenMP) + if(NOT OPENMP_CUSTOM) + find_package(OpenMP) + endif() + if(OPENMP_FOUND) if(NOT WITH_OPENMP_STATIC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") -- cgit v1.2.3