From c5116ea686a4aa621fce3fc2b3d69384e9426d92 Mon Sep 17 00:00:00 2001 From: Minh Vu Date: Thu, 18 Jun 2026 19:10:56 +0200 Subject: [PATCH] Respect libdispatch CMake option --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 217aa5227..33fe87169 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -423,7 +423,9 @@ include(ConfigureASIO) if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") check_include_file_cxx("dispatch/dispatch.h" STDEXEC_FOUND_LIBDISPATCH) option(STDEXEC_ENABLE_LIBDISPATCH "Enable use of the Grand Central Dispatch scheduler" ${STDEXEC_FOUND_LIBDISPATCH}) - target_compile_definitions(stdexec INTERFACE STDEXEC_ENABLE_LIBDISPATCH) + if (STDEXEC_ENABLE_LIBDISPATCH) + target_compile_definitions(stdexec INTERFACE STDEXEC_ENABLE_LIBDISPATCH) + endif() endif() if (CMAKE_SYSTEM_NAME STREQUAL "Windows")