-
Notifications
You must be signed in to change notification settings - Fork 17
/
CMakeLists.txt
37 lines (37 loc) · 2.34 KB
/
CMakeLists.txt
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
28
29
30
31
32
33
34
35
36
37
cmake_minimum_required(VERSION 2.8.7)
project(gwrl)
option(GWRL_BUILD_EXAMPLES "Whether or not to build the examples portion of the library." ON)
option(GWRL_BUILD_TEST "Whether or not to build the test directory." OFF)
option(GWRL_BUILD_COVERAGE "Whether or not to build lcov coverate report." OFF)
option(GWRL_FORCE_KQUEUE "If you know you have kqueue or want to force it's use." OFF)
option(GWRL_FORCE_EPOLL "If you know you have epoll or want to force it's use." OFF)
option(GWRL_FORCE_POLL "If you know you have poll or want to force it's use." OFF)
option(GWRL_FORCE_SELECT "If you know you have select or want to force it's use." OFF)
option(GWRL_FORCE_IOCP "If you know you have IOCP and want to use it." OFF)
set(gwrl_mem_calloc "calloc(n,s)" CACHE STRING "The default calloc allocator.")
set(gwrl_mem_free "free(mm)" CACHE STRING "The default free function.")
set(GWRL_EPOLL_EVENT_COUNT 64 CACHE STRING "The number of events to accept from epoll_wait function when polling.")
set(GWRL_EVENT_CACHE_MAX 128 CACHE STRING "Internal gwrlevt structure cache count.")
set(GWPR_FILTERS_MAX 0 CACHE STRING "The maximum amount of read or write filters for file input sources.")
set(GWRL_GATHER_FUNCS_MAX 0 CACHE STRING "The maximum amount of user-provided gather functions required.")
set(GWRL_KQUEUE_KEVENT_COUNT 512 CACHE STRING "The number of events to accept from kevent function when polling.")
set(GWPR_MAX_ACCEPT 256 CACHE STRING "Maximum amount of clients to accept in one runloop iteration.")
set(GWRL_POLLFD_COUNT 64 CACHE STRING "The initial struct pollfd * size and grow by size to accept events from poll backend.")
set(GWRL_REDISPATCH_MAX 5 CACHE STRING "The maximum amount of times to re-dispatch events created by the user during the dispatch phase.")
set(GWRL_SRC_TYPES_COUNT 2 CACHE STRING "The number of supported input sources.")
set(GWPR_SYNCHRONOUS_WRITE_MAX_BYTES 512 CACHE STRING "The maximum bytes allowed to try in a synchronous write.")
set(GWPR_WRQUEUE_CACHE_MAX 256 CACHE STRING "Internal cache size for gwpr_wrqueue structures.")
if(GWRL_BUILD_COVERAGE AND "${CMAKE_GENERATOR}" MATCHES "Make")
set(GWRL_COVERAGE_INTERNAL_ASSERT_VARS 1)
set(GWRL_HIDE_FROM_COVERAGE 1)
endif()
add_subdirectory(src/gwrl)
if(GWRL_BUILD_EXAMPLES)
add_subdirectory(examples/)
endif()
if(GWRL_BUILD_TEST)
add_subdirectory(test/)
endif()
if(USING_KQUEUE_BACKEND)
message("KQUEUE")
endif()