CMakeLists.txt revision 06b2a236
1# Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc.  See LICENSE.
2INCLUDE(CheckFunctionExists)
3CHECK_FUNCTION_EXISTS(sendmmsg HAVE_SENDMMSG)
4CHECK_FUNCTION_EXISTS(recvmmsg HAVE_RECVMMSG)
5CHECK_FUNCTION_EXISTS(open_memstream HAVE_OPEN_MEMSTREAM)
6
7
8INCLUDE(CheckSymbolExists)
9
10CHECK_SYMBOL_EXISTS(
11    IP_MTU_DISCOVER
12    "netinet/in.h"
13    HAVE_IP_MTU_DISCOVER
14)
15
16CHECK_SYMBOL_EXISTS(
17    IP_DONTFRAG
18    "netinet/in.h"
19    HAVE_IP_DONTFRAG
20)
21
22CHECK_SYMBOL_EXISTS(
23    preadv
24    "sys/uio.h"
25    HAVE_PREADV
26)
27
28INCLUDE(CheckIncludeFiles)
29
30IF (MSVC AND PCRE_LIB)
31FIND_PATH(EVENT_INCLUDE_DIR NAMES pcreposix.h)
32IF (EVENT_INCLUDE_DIR)
33    MESSAGE(STATUS "found pcreposix.h")
34    SET(HAVE_REGEX 1)
35ELSE()
36    MESSAGE(FATAL_ERROR "event2/event.h was not found")
37ENDIF()
38ELSE()
39CHECK_INCLUDE_FILES(regex.h HAVE_REGEX)
40ENDIF()
41
42CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/test_config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/test_config.h)
43