embedded-framework/external/httpserver.h-master/test/functional/CMakeLists.txt
2024-06-05 09:28:13 +08:00

17 lines
530 B
CMake

add_executable(functional-test-server main.c)
add_executable(functional-test-server-cpp main.cpp)
include(CheckFunctionExists)
check_function_exists(epoll_wait EPOLL)
check_function_exists(kqueue KQUEUE)
if(KQUEUE)
target_compile_definitions(functional-test-server PRIVATE "KQUEUE")
target_compile_definitions(functional-test-server-cpp PRIVATE "KQUEUE")
endif()
if(EPOLL)
target_compile_definitions(functional-test-server PRIVATE "EPOLL")
target_compile_definitions(functional-test-server-cpp PRIVATE "EPOLL")
endif()