CMakeLists.txt revision fb3e20e0
1# Copyright (c) 2017 - 2020 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 22INCLUDE(CheckIncludeFiles) 23 24IF (MSVC AND PCRE_LIB) 25FIND_PATH(EVENT_INCLUDE_DIR NAMES pcreposix.h) 26IF (EVENT_INCLUDE_DIR) 27 MESSAGE(STATUS "found pcreposix.h") 28 SET(HAVE_REGEX 1) 29ELSE() 30 MESSAGE(FATAL_ERROR "event2/event.h was not found") 31ENDIF() 32ELSE() 33CHECK_INCLUDE_FILES(regex.h HAVE_REGEX) 34ENDIF() 35 36CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/test_config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/test_config.h) 37