[Bf-blender-cvs] [ad4c12f] master: OSX/CMAKE: make linking and bundling of clang omp lib work, Cmake will still not find -fopenmp working, so the user must set WITH_OPENMP and flags manually
Jens Verwiebe
noreply at git.blender.org
Tue Feb 18 23:39:24 CET 2014
Commit: ad4c12fe01d47d5b3092865ecdb9f49cf8c79aaf
Author: Jens Verwiebe
Date: Tue Feb 18 23:38:48 2014 +0100
https://developer.blender.org/rBad4c12fe01d47d5b3092865ecdb9f49cf8c79aaf
OSX/CMAKE: make linking and bundling of clang omp lib work,
Cmake will still not find -fopenmp working, so the user must set
WITH_OPENMP and flags manually
===================================================================
M CMakeLists.txt
M source/creator/CMakeLists.txt
===================================================================
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b022233..9f09646 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1854,6 +1854,12 @@ elseif(APPLE)
message(STATUS "OSL not found")
endif()
endif()
+
+ if(WITH_OPENMP AND CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS '3.4')
+ include_directories(${LIBDIR}/openmp/include)
+ LINK_DIRECTORIES(${LIBDIR}/openmp/lib)
+ execute_process(COMMAND cp ${LIBDIR}/openmp/lib/libiomp5.dylib ${CMAKE_BINARY_DIR}/bin/libiomp5.dylib) # needed for imtermediate binaries, due lib id is @loader_path
+ endif()
set(EXETYPE MACOSX_BUNDLE)
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 2a355bd..a56af90 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -773,6 +773,13 @@ elseif(APPLE)
\${TARGETDIR}/blender.app/Contents/
)
+ if(WITH_OPENMP AND CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS '3.4')
+ install(
+ FILES ${LIBDIR}/openmp/lib/libiomp5.dylib
+ DESTINATION ${TARGETDIR}/blender.app/Contents/MacOS
+ )
+ endif()
+
# python
if(WITH_PYTHON AND NOT WITH_PYTHON_MODULE AND NOT WITH_PYTHON_FRAMEWORK)
# the python zip is first extract as part of the build process,
@@ -843,7 +850,7 @@ elseif(APPLE)
endif()
endif()
-
+
endif()
# -----------------------------------------------------------------------------
More information about the Bf-blender-cvs
mailing list