CMake: disable OpenMP on macOS bpy_module config
authorCampbell Barton <ideasman42@gmail.com>
Wed, 23 Oct 2019 03:50:42 +0000 (14:50 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 23 Oct 2019 03:50:42 +0000 (14:50 +1100)
This gives linking errors on build.

build_files/cmake/config/bpy_module.cmake

index 46aee50135c58156daf0215fa990509fb995bbf4..99bf17475c85957577cb5bddcf67f234a73e0af1 100644 (file)
@@ -31,7 +31,18 @@ set(WITH_BULLET              OFF CACHE BOOL "" FORCE)
 set(WITH_OPENVDB             OFF CACHE BOOL "" FORCE)
 set(WITH_ALEMBIC             OFF CACHE BOOL "" FORCE)
 
-if(CMAKE_SYSTEM_NAME MATCHES "Linux")
-  # jemalloc causes linking error on import, disable.
+# Depends on Python install, do this to quiet warning.
+set(WITH_DRACO               OFF CACHE BOOL "" FORCE)
+
+# Note, if linking errors can be resolved, lines below can be removed.
+# Until then, disable configurations known to fail.
+
+if(UNIX AND NOT APPLE)
+  if(CMAKE_SYSTEM_NAME MATCHES "Linux")
+    # jemalloc causes linking error on import, disable.
+    set(WITH_MEM_JEMALLOC    OFF CACHE BOOL "" FORCE)
+  endif()
+elseif(APPLE)
+  # OpenMP causes linking error on build, disable.
   set(WITH_MEM_JEMALLOC        OFF CACHE BOOL "" FORCE)
 endif()