diff --git a/CMakeLists.txt b/CMakeLists.txt index 87603976..06f199a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,9 +98,13 @@ file(GLOB_RECURSE ICHOR_BOOST_BEAST_SOURCES ${ICHOR_TOP_DIR}/src/services/networ file(GLOB_RECURSE ICHOR_METRICS_SOURCES ${ICHOR_TOP_DIR}/src/services/metrics/*.cpp) file(GLOB_RECURSE ICHOR_TIMER_SOURCES ${ICHOR_TOP_DIR}/src/services/timer/*.cpp) file(GLOB_RECURSE ICHOR_OPTIONAL_HIREDIS_SOURCES ${ICHOR_TOP_DIR}/src/services/redis/*.cpp) -file(GLOB_RECURSE ICHOR_IO_SOURCES ${ICHOR_TOP_DIR}/src/services/io/*.cpp) file(GLOB_RECURSE ICHOR_BASE64_SOURCES ${ICHOR_TOP_DIR}/src/base64/*.cpp) +set(ICHOR_IO_SOURCES ${ICHOR_TOP_DIR}/src/services/io/IAsyncFileIO.cpp ${ICHOR_TOP_DIR}/src/services/io/SharedOverThreadsAsyncFileIO.cpp) +if(ICHOR_USE_LIBURING) + set(ICHOR_IO_SOURCES ${ICHOR_IO_SOURCES} ${ICHOR_TOP_DIR}/src/services/io/IOUringAsyncFileIO.cpp) +endif() + file(GLOB SPDLOG_SOURCES ${ICHOR_EXTERNAL_DIR}/spdlog/src/*.cpp) add_library(ichor ${FMT_SOURCES} ${ICHOR_FRAMEWORK_SOURCES} ${ICHOR_LOGGING_SOURCES} ${ICHOR_TCP_SOURCES} ${ICHOR_METRICS_SOURCES} ${ICHOR_TIMER_SOURCES} ${ICHOR_IO_SOURCES} ${ICHOR_BASE64_SOURCES}) diff --git a/benchmarks/event_benchmark/ichor_event_benchmark.cpp b/benchmarks/event_benchmark/ichor_event_benchmark.cpp index 610d92d4..9135a9aa 100644 --- a/benchmarks/event_benchmark/ichor_event_benchmark.cpp +++ b/benchmarks/event_benchmark/ichor_event_benchmark.cpp @@ -1,6 +1,8 @@ #include "TestService.h" #include +#ifdef ICHOR_USE_LIBURING #include +#endif #include #include #include diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 3d65279e..f9528b84 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -24,7 +24,7 @@ foreach(filename ${PROJECT_TEST_SOURCES}) if(ICHOR_SKIP_EXTERNAL_TESTS) target_compile_definitions(${testname} PUBLIC ICHOR_SKIP_EXTERNAL_TESTS) endif() - if(${testname} STREQUAL "AsyncFileIOTests" AND NOT WIN32 AND NOT APPLE AND NOT (ICHOR_SKIP_EXTERNAL_TESTS AND ICHOR_AARCH64)) + if(ICHOR_USE_LIBURING AND ${testname} STREQUAL "AsyncFileIOTests" AND NOT WIN32 AND NOT APPLE AND NOT (ICHOR_SKIP_EXTERNAL_TESTS AND ICHOR_AARCH64)) add_executable(${testname}_uring ${filename}) target_link_libraries(${testname}_uring ${CMAKE_THREAD_LIBS_INIT}) target_link_libraries(${testname}_uring ichor)