Browse Source

[cmake] help cmake on FreeBSD find sys/event.h

sys/event.h does not compile standalone, so check_include_files() fails

Add compiler flags -include sys/types.h so that the compile check passes

This allows cmake builds on FreeBSD to detect and use kqueue.
personal/stbuehler/ci-build
Glenn Strauss 3 years ago
parent
commit
3abbb8dc4b
  1. 2
      src/CMakeLists.txt

2
src/CMakeLists.txt

@ -78,7 +78,9 @@ endif()
check_include_files(sys/devpoll.h HAVE_SYS_DEVPOLL_H)
check_include_files(sys/epoll.h HAVE_SYS_EPOLL_H)
set(CMAKE_REQUIRED_FLAGS "-include sys/types.h")
check_include_files(sys/event.h HAVE_SYS_EVENT_H)
set(CMAKE_REQUIRED_FLAGS)
check_include_files(sys/mman.h HAVE_SYS_MMAN_H)
check_include_files(sys/poll.h HAVE_SYS_POLL_H)
check_include_files(sys/port.h HAVE_SYS_PORT_H)

Loading…
Cancel
Save