Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ option(MINIO_CPP_MAKE_DOC "Build documentation" OFF)
# GetObjectRDMAArgs / PutObjectRDMAArgs API surface.
option(MINIO_CPP_ENABLE_RDMA "Enable RDMA and GPU Direct Storage support" OFF)

# C++20 coroutine support. When ON, the library is compiled with -std=c++20
# and defines MINIO_CPP_COROUTINES so that async callers can co_await the
# *Async methods directly (e.g. via FutureAwaitable<T> in coro.h).
# OFF by default because it requires a compiler with <coroutine> support
# (GCC 11+, Clang 14+, MSVC 2019 16.10+).
option(MINIO_CPP_ENABLE_COROUTINES "Enable C++20 coroutine support" OFF)

set(MINIO_CPP_CFLAGS)
set(MINIO_CPP_INCLUDES)
set(MINIO_CPP_LIBS)
Expand All @@ -63,6 +70,12 @@ else()
endif()
endif()

if (MINIO_CPP_ENABLE_COROUTINES)
set(MINIO_CPP_STD "20")
add_compile_definitions(MINIO_CPP_COROUTINES)
message(STATUS "C++20 coroutine support enabled (MINIO_CPP_COROUTINES)")
endif()

if (MINIO_CPP_ENABLE_RDMA)
if (WIN32 OR APPLE)
message(FATAL_ERROR "MINIO_CPP_ENABLE_RDMA is only supported on Linux")
Expand Down Expand Up @@ -131,6 +144,7 @@ set(MINIO_CPP_HEADERS
include/miniocpp/baseclient.h
include/miniocpp/client.h
include/miniocpp/config.h
include/miniocpp/coro.h
include/miniocpp/credentials.h
include/miniocpp/error.h
include/miniocpp/http.h
Expand Down
Loading
Loading