mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-14 09:58:50 +08:00
Only build libcoro if COROUTINE_IMPL == libcoro
It doesn't build at all on mac m1
This commit is contained in:
parent
b43f1640a4
commit
23de546586
@ -87,22 +87,24 @@ if(COMPILE_EIO)
|
||||
target_link_libraries(fdbrpc_sampling PRIVATE eio)
|
||||
endif()
|
||||
|
||||
set(CORO_SRCS libcoroutine/Common.c libcoroutine/Coro.c)
|
||||
if(APPLE)
|
||||
list(APPEND CORO_SRCS libcoroutine/asm.S)
|
||||
if(${COROUTINE_IMPL} STREQUAL libcoro)
|
||||
set(CORO_SRCS libcoroutine/Common.c libcoroutine/Coro.c)
|
||||
if(APPLE)
|
||||
list(APPEND CORO_SRCS libcoroutine/asm.S)
|
||||
endif()
|
||||
if(NOT WIN32)
|
||||
list(APPEND CORO_SRCS libcoroutine/context.c)
|
||||
endif()
|
||||
add_library(coro STATIC ${CORO_SRCS})
|
||||
if(WIN32)
|
||||
target_compile_definitions(coro PRIVATE USE_FIBERS)
|
||||
else()
|
||||
target_compile_definitions(coro PRIVATE USE_UCONTEXT)
|
||||
target_compile_options(coro BEFORE PRIVATE -w) # disable warnings for third party
|
||||
endif()
|
||||
if(USE_VALGRIND)
|
||||
target_link_libraries(coro PUBLIC Valgrind)
|
||||
endif()
|
||||
target_link_libraries(fdbrpc PRIVATE coro)
|
||||
target_link_libraries(fdbrpc_sampling PRIVATE coro)
|
||||
endif()
|
||||
if(NOT WIN32)
|
||||
list(APPEND CORO_SRCS libcoroutine/context.c)
|
||||
endif()
|
||||
add_library(coro STATIC ${CORO_SRCS})
|
||||
if(WIN32)
|
||||
target_compile_definitions(coro PRIVATE USE_FIBERS)
|
||||
else()
|
||||
target_compile_definitions(coro PRIVATE USE_UCONTEXT)
|
||||
target_compile_options(coro BEFORE PRIVATE -w) # disable warnings for third party
|
||||
endif()
|
||||
if(USE_VALGRIND)
|
||||
target_link_libraries(coro PUBLIC Valgrind)
|
||||
endif()
|
||||
target_link_libraries(fdbrpc PRIVATE coro)
|
||||
target_link_libraries(fdbrpc_sampling PRIVATE coro)
|
||||
|
Loading…
x
Reference in New Issue
Block a user