File: FindEPOLL.cmake

package info (click to toggle)
ntirpc 6.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 2,500 kB
  • sloc: ansic: 33,935; cpp: 1,132; python: 590; sh: 68; makefile: 13
file content (27 lines) | stat: -rw-r--r-- 802 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# - Find EPOLL
#
# This module defines the following variables:
#    EPOLL_FOUND       = Was EPOLL found or not?
#
# On can set EPOLL_PATH_HINT before using find_package(EPOLL) and the
# module with use the PATH as a hint to find EPOLL.
#
# The hint can be given on the command line too:
#   cmake -DEPOLL_PATH_HINT=/DATA/ERIC/EPOLL /path/to/source

if (BSDBASED)
    set (EPOLL_FOUND ON)
    return ()
endif (BSDBASED)

include(CheckIncludeFiles)
include(CheckFunctionExists)

check_include_files("sys/epoll.h" EPOLL_HEADER)
check_function_exists(epoll_create EPOLL_FUNC)

# handle the QUIETLY and REQUIRED arguments and set PRELUDE_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(EPOLL REQUIRED_VARS EPOLL_HEADER EPOLL_FUNC)