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:
authorArto Kitula <arto.kitula@gmail.com>2019-01-26 16:14:51 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-01-26 17:48:56 +0300
commitb7a9e980a11a085a3bc7ef8e267b967197f47447 (patch)
treecbd8f045c4b2045828bfbf62799eb4dc55469f40 /CMakeLists.txt
parent8d4c4775a0a686e93fbaaf02057f8ab8ef4896c3 (diff)
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
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
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}")