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
cmake_minimum_required(VERSION 3.10)
project(felspar-io)


include(cmake/detect_accept4.cmake)


if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
    set(FELSPAR_ENABLE_IO_URING YES CACHE BOOL
        "Enable io_uring through liburing")
else()
    set(FELSPAR_ENABLE_IO_URING NO CACHE BOOL
        "Enable io_uring through liburing")
endif()

if(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
    add_custom_target(felspar-check)
    set_property(TARGET felspar-check PROPERTY EXCLUDE_FROM_ALL TRUE)
    add_custom_target(felspar-examples)
    add_custom_target(felspar-stress)
    set_property(TARGET felspar-stress PROPERTY EXCLUDE_FROM_ALL TRUE)
    include(requirements.cmake)
endif()

add_subdirectory(src)

if(TARGET felspar-check)
    add_subdirectory(test)
endif()
if(TARGET felspar-examples)
add_subdirectory(examples)
endif()