From 7f1114d9358f430d82e8e6f7f8ab5e994721ed25 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Mon, 14 Aug 2017 17:19:51 +0300 Subject: [PATCH] cmake: disable HAVE_POSIX_SEMAPHORES on Apple platform --- 3rdparty/openexr/CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/3rdparty/openexr/CMakeLists.txt b/3rdparty/openexr/CMakeLists.txt index 5611b06f99..89118dde13 100644 --- a/3rdparty/openexr/CMakeLists.txt +++ b/3rdparty/openexr/CMakeLists.txt @@ -6,9 +6,12 @@ project(openexr CXX) if(UNIX) - set(HAVE_PTHREAD 1) - include(CheckIncludeFile) - check_include_file(semaphore.h HAVE_POSIX_SEMAPHORES) + if(APPLE) + set(HAVE_POSIX_SEMAPHORES 0) # Unnamed semaphores are not supported: https://github.com/opencv/opencv/issues/9361 + else() + include(CheckIncludeFile) + check_include_file(semaphore.h HAVE_POSIX_SEMAPHORES) + endif() endif() configure_file("${CMAKE_CURRENT_SOURCE_DIR}/IlmBaseConfig.h.cmakein"