cmake: disable HAVE_POSIX_SEMAPHORES on Apple platform
authorAlexander Alekhin <alexander.alekhin@intel.com>
Mon, 14 Aug 2017 14:19:51 +0000 (17:19 +0300)
committerAlexander Alekhin <alexander.alekhin@intel.com>
Mon, 14 Aug 2017 14:19:51 +0000 (17:19 +0300)
3rdparty/openexr/CMakeLists.txt

index 5611b06..89118dd 100644 (file)
@@ -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"