[9605e0b] master: OSX/CMAKE: extend my former workaround for failing tests with clang-omp to all build types - this workaround makes sure the breaking -fopenmp is not exposed to testcompiles which use C_FLAGS respective CXX_Flags - -fopenmp is always added to the CMAKE_C(XX)_FLAGS_<BUILD_TYPE> now - another way to solve this would be to move the Configure OpenMP part after all line 2366, but i don’t know if this would be apreciated

Jens Verwiebe noreply at git.blender.org
Tue Jul 8 17:03:52 CEST 2014


Commit: 9605e0bfb6cc6e26204f6584461f3c3c1b77d71d
Author: Jens Verwiebe
Date:   Tue Jul 8 17:03:35 2014 +0200
https://developer.blender.org/rB9605e0bfb6cc6e26204f6584461f3c3c1b77d71d

OSX/CMAKE: extend my former workaround for failing tests with clang-omp to all build types
- this workaround makes sure the breaking -fopenmp is not exposed to testcompiles which use C_FLAGS respective CXX_Flags
- -fopenmp is always added to the CMAKE_C(XX)_FLAGS_<BUILD_TYPE> now
- another way to solve this would be to move the Configure OpenMP part after all line 2366,
but i don’t know if this would be apreciated

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

M	CMakeLists.txt

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

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d64364e..38f9854 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2033,10 +2033,11 @@ if(WITH_OPENMP)
 	find_package(OpenMP)
 	if(OPENMP_FOUND)
 		# Some tests with clang-omp fail due special buid env ( dylib )
-		# we push the openmp flags to rel flags to circumvent this as a tentative fix for now until i found a real fix
+		# we push the openmp flags to buildtype flags to circumvent this as a tentative fix for now
 		if(APPLE AND CMAKE_C_COMPILER_ID MATCHES "Clang") # Some tests with clang-omp fail due special buid env
-			set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${OpenMP_C_FLAGS}")
-			set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${OpenMP_CXX_FLAGS}")
+			string(TOUPPER ${CMAKE_BUILD_TYPE} B_TYPE)
+			set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_${B_TYPE}} ${OpenMP_C_FLAGS}")
+			set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_${B_TYPE}} ${OpenMP_CXX_FLAGS}")
 		else()
 			set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
 			set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")




More information about the Bf-blender-cvs mailing list