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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-06-28 12:22:33 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-06-28 12:22:33 +0300
commit6f0de2328c7bd587799a8c72d9db17029d2b9cb7 (patch)
treefb9e551a91b2975849a5edd157270058c03494ab /build_files
parent9bcab8050f44e5bd36a0715811ee0355e4b221b6 (diff)
Fix OpenMP library for tests on macOS
Diffstat (limited to 'build_files')
-rw-r--r--build_files/cmake/platform/platform_apple.cmake15
1 files changed, 6 insertions, 9 deletions
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake
index d7c4370cde7..882f41b3c0d 100644
--- a/build_files/cmake/platform/platform_apple.cmake
+++ b/build_files/cmake/platform/platform_apple.cmake
@@ -393,16 +393,13 @@ if(WITH_OPENMP)
set(OpenMP_CXX_FLAGS "-Xclang -fopenmp -I'${LIBDIR}/openmp/include'")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L'${LIBDIR}/openmp/lib' -lomp")
- # Copy libomp.dylib to allow executables like datatoc to work.
- if(CMAKE_MAKE_PROGRAM MATCHES "xcodebuild")
- set(OPENMP_DYLIB_AUX_PATH "${CMAKE_BINARY_DIR}/bin")
- else()
- set(OPENMP_DYLIB_AUX_PATH "${CMAKE_BINARY_DIR}")
- endif()
-
+ # Copy libomp.dylib to allow executables like datatoc and tests to work.
+ execute_process(
+ COMMAND mkdir -p ${CMAKE_BINARY_DIR}/Resources/lib
+ COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/Resources/lib/libomp.dylib)
execute_process(
- COMMAND mkdir -p ${OPENMP_DYLIB_AUX_PATH}/Resources/lib
- COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${OPENMP_DYLIB_AUX_PATH}/Resources/lib/libomp.dylib)
+ COMMAND mkdir -p ${CMAKE_BINARY_DIR}/bin/Resources/lib
+ COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/bin/Resources/lib/libomp.dylib)
endif()
endif()