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:
authorJens Verwiebe <info@jensverwiebe.de>2014-07-08 19:03:35 +0400
committerJens Verwiebe <info@jensverwiebe.de>2014-07-08 19:03:44 +0400
commit9605e0bfb6cc6e26204f6584461f3c3c1b77d71d (patch)
treebd060a6556c1128ae760dc19bab674cb068f1495 /CMakeLists.txt
parent330633f063fdba9c950c4e5093a185ca5a8cdaca (diff)
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
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d64364ed83f..38f9854da98 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}")