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-09 01:35:04 +0400
committerJens Verwiebe <info@jensverwiebe.de>2014-07-09 01:35:04 +0400
commita83c6293f43a8c8b8603ba9e17c32d34eb9edd4d (patch)
tree1f195c6d136d58cd806aab87f8b9a6eeae7d4818 /CMakeLists.txt
parent9605e0bfb6cc6e26204f6584461f3c3c1b77d71d (diff)
OSX/CMAKE: Way better fix for T40887, checks where failing with clang-omp
- found a way to feed just extra flags to the testcompiles
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 6 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 38f9854da98..3d0ad4cdde7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2032,16 +2032,8 @@ blender_include_dirs_sys("${OPENGL_INCLUDE_DIR}")
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 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
- 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}")
- endif()
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
else()
set(WITH_OPENMP OFF)
endif()
@@ -2166,6 +2158,10 @@ if(CMAKE_COMPILER_IS_GNUCC)
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
+ if(APPLE AND WITH_OPENMP) # we need the Intel omp lib linked here to not fail all tests due presence of -fopenmp !
+ set(CMAKE_REQUIRED_FLAGS "-L${LIBDIR}/openmp/lib -liomp5") # these are only used for the checks
+ endif()
+
# strange, clang complains these are not supported, but then yses them.
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_DECLARATION_AFTER_STATEMENT -Werror=declaration-after-statement)