From b163855bd6928ef09e2de71b47858cca9799437c Mon Sep 17 00:00:00 2001 From: qicosmos Date: Thu, 4 Jul 2024 13:41:05 +0800 Subject: [PATCH] for windows --- tests/CMakeLists.txt | 1 + tests/test_corofile.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index df202af6..cce3397c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -45,6 +45,7 @@ if(ENABLE_FILE_IO_URING) endif() if(WIN32) + message(STATUS "windows has file") add_definitions(-DASIO_HAS_FILE) add_definitions(-DASIO_HAS_IOCP) endif() diff --git a/tests/test_corofile.cpp b/tests/test_corofile.cpp index 26051e2b..65be1d03 100644 --- a/tests/test_corofile.cpp +++ b/tests/test_corofile.cpp @@ -7,6 +7,10 @@ #include #include +#if defined(ASIO_WINDOWS) +#define ASIO_HAS_FILE 1 +#endif + #include "asio/io_context.hpp" #include "async_simple/coro/Collect.h" #include "async_simple/coro/SyncAwait.h"