diff options
author | Peter Wu <peter@lekensteyn.nl> | 2016-10-31 00:45:17 +0100 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2016-11-06 15:16:52 +0100 |
commit | 6aa9cfa2b90a818e06c8c414733145ad94ca461f (patch) | |
tree | 396dd171a8e96fe317702e66f18d5158141c3ec7 /CMake | |
parent | 4564636781cbb1f8735bc636ff8ba1719ad10ace (diff) |
cmake: disable poll for macOS
Mirrors the autotools behavior introduced with curl-7_50_3-83-ga34c7ce.
Fixes #1089
Diffstat (limited to 'CMake')
-rw-r--r-- | CMake/OtherTests.cmake | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/CMake/OtherTests.cmake b/CMake/OtherTests.cmake index d59949871..3b203c538 100644 --- a/CMake/OtherTests.cmake +++ b/CMake/OtherTests.cmake @@ -179,17 +179,20 @@ int main(void) { include(CheckCSourceRuns) -set(CMAKE_REQUIRED_FLAGS) -if(HAVE_SYS_POLL_H) - set(CMAKE_REQUIRED_FLAGS "-DHAVE_SYS_POLL_H") -endif(HAVE_SYS_POLL_H) -check_c_source_runs(" - #ifdef HAVE_SYS_POLL_H - # include <sys/poll.h> - #endif - int main(void) { - return poll((void *)0, 0, 10 /*ms*/); - }" HAVE_POLL_FINE) +# See HAVE_POLL in CMakeLists.txt for why poll is disabled on macOS +if(NOT APPLE) + set(CMAKE_REQUIRED_FLAGS) + if(HAVE_SYS_POLL_H) + set(CMAKE_REQUIRED_FLAGS "-DHAVE_SYS_POLL_H") + endif(HAVE_SYS_POLL_H) + check_c_source_runs(" + #ifdef HAVE_SYS_POLL_H + # include <sys/poll.h> + #endif + int main(void) { + return poll((void *)0, 0, 10 /*ms*/); + }" HAVE_POLL_FINE) +endif() set(HAVE_SIG_ATOMIC_T 1) set(CMAKE_REQUIRED_FLAGS) |