From ed13576d034bb6c3732d4ffa5f52cb4fb075409c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 8 Aug 2018 14:42:04 +0100 Subject: [PATCH] From Chris White, Cygwin build fix --- src/OpenThreads/pthreads/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/OpenThreads/pthreads/CMakeLists.txt b/src/OpenThreads/pthreads/CMakeLists.txt index 770ca5f85..b126541d5 100644 --- a/src/OpenThreads/pthreads/CMakeLists.txt +++ b/src/OpenThreads/pthreads/CMakeLists.txt @@ -20,6 +20,11 @@ SET(TARGET_SRC ../common/Version.cpp ../common/Atomic.cpp ) + +IF(CYGWIN) # define for pthread_{yield,getconcurrency,setconcurrency} + ADD_DEFINITIONS(-D_GNU_SOURCE) +ENDIF() + IF(ANDROID) ADD_DEFINITIONS(-D_GNU_SOURCE) SET(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE")