Skip to content

Commit

Permalink
Fix compilation when io_uring is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Oipo committed Aug 19, 2024
1 parent 8523ad1 commit d83c505
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
2 changes: 2 additions & 0 deletions benchmarks/event_benchmark/ichor_event_benchmark.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "TestService.h"
#include <ichor/event_queues/PriorityQueue.h>
#ifdef ICHOR_USE_LIBURING
#include <ichor/event_queues/IOUringQueue.h>
#endif
#include <ichor/services/logging/LoggerFactory.h>
#include <ichor/services/logging/NullLogger.h>
#include <ichor/services/metrics/MemoryUsageFunctions.h>
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d83c505

Please sign in to comment.