[Bf-blender-cvs] [5fb72b7] master: OSX/Cmake: tentative handling for clang-omp, set flags hardcoded when used

Jens Verwiebe noreply at git.blender.org
Wed Feb 19 21:45:03 CET 2014


Commit: 5fb72b7ee55358f92fe965e5dae5de971c62bff8
Author: Jens Verwiebe
Date:   Wed Feb 19 21:44:44 2014 +0100
https://developer.blender.org/rB5fb72b7ee55358f92fe965e5dae5de971c62bff8

OSX/Cmake: tentative handling for clang-omp,
set flags hardcoded when used

===================================================================

M	CMakeLists.txt

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0a79f95..39b441e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1859,9 +1859,15 @@ elseif(APPLE)
 	endif()
 	
 	if(WITH_OPENMP AND CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS '3.4')
+		set(OPENMP_FOUND ON)
+		set(OpenMP_C_FLAGS "-fopenmp" CACHE STRING "C compiler flags for OpenMP parallization" FORCE)
+		set(OpenMP_CXX_FLAGS "-fopenmp" CACHE STRING "C++ compiler flags for OpenMP parallization" FORCE)
 		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
+		execute_process(COMMAND cp ${LIBDIR}/openmp/lib/libiomp5.dylib ${CMAKE_BINARY_DIR}/bin/libiomp5.dylib) # for intermediate binaries, lib id is @loader_path
+	else()
+		set(OpenMP_C_FLAGS "" CACHE STRING "C compiler flags for OpenMP parallization" FORCE) # unset
+		set(OpenMP_CXX_FLAGS "" CACHE STRING "C++ compiler flags for OpenMP parallization" FORCE) # unset
 	endif()
 
 	set(EXETYPE MACOSX_BUNDLE)




More information about the Bf-blender-cvs mailing list