foundationdb/fdbrpc/CMakeLists.txt

74 lines
1.9 KiB
CMake
Raw Normal View History

2018-05-03 02:25:38 +08:00
set(FDBRPC_SRCS
AsyncFileCached.actor.h
AsyncFileEIO.actor.h
AsyncFileKAIO.actor.h
AsyncFileNonDurable.actor.h
AsyncFileReadAhead.actor.h
AsyncFileWinASIO.actor.h
AsyncFileCached.actor.cpp
AsyncFileNonDurable.actor.cpp
AsyncFileWriteChecker.cpp
FailureMonitor.actor.cpp
FlowTransport.actor.cpp
genericactors.actor.h
genericactors.actor.cpp
2020-02-18 13:54:05 +08:00
HealthMonitor.actor.cpp
2018-05-03 02:25:38 +08:00
IAsyncFile.actor.cpp
LoadBalance.actor.h
Locality.cpp
Net2FileSystem.cpp
networksender.actor.h
2018-05-03 02:25:38 +08:00
QueueModel.cpp
ReplicationPolicy.cpp
ReplicationTypes.cpp
ReplicationUtils.cpp
Stats.actor.cpp
Stats.h
2018-05-03 02:25:38 +08:00
sim2.actor.cpp
sim_validation.cpp
2019-08-01 23:48:25 +08:00
TimedRequest.h
2019-04-10 02:16:45 +08:00
TraceFileIO.cpp)
set(FDBRPC_THIRD_PARTY_SRCS
2018-05-03 02:25:38 +08:00
libcoroutine/Common.c
2020-08-12 08:15:07 +08:00
libcoroutine/Coro.c)
2018-05-03 02:25:38 +08:00
2018-05-04 06:48:10 +08:00
if(APPLE)
2019-04-10 02:19:13 +08:00
list(APPEND FDBRPC_THIRD_PARTY_SRCS libcoroutine/asm.S)
2019-04-10 02:16:45 +08:00
endif()
if(NOT WIN32)
2020-02-02 02:04:22 +08:00
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
find_library(EIO eio)
if(EIO)
list(APPEND FDBRPC_THIRD_PARTY_SRCS libcoroutine/context.c)
else()
list(APPEND FDBRPC_THIRD_PARTY_SRCS libcoroutine/context.c libeio/eio.c)
endif()
else()
list(APPEND FDBRPC_THIRD_PARTY_SRCS libcoroutine/context.c libeio/eio.c)
endif()
2019-02-07 11:27:38 +08:00
endif()
2019-04-10 02:16:45 +08:00
add_library(thirdparty STATIC ${FDBRPC_THIRD_PARTY_SRCS})
if(WIN32)
target_compile_definitions(thirdparty PRIVATE USE_FIBERS)
else()
target_compile_definitions(thirdparty PRIVATE USE_UCONTEXT)
2019-04-10 02:16:45 +08:00
target_compile_options(thirdparty BEFORE PRIVATE -w) # disable warnings for third party
2018-05-04 06:48:10 +08:00
endif()
2019-06-11 06:30:57 +08:00
if(USE_VALGRIND)
target_link_libraries(thirdparty PUBLIC Valgrind)
endif()
2018-05-04 06:48:10 +08:00
set(FDBRPC_SRCS_DISABLE_ACTOR_DIAGNOSTICS
ActorFuzz.actor.cpp
FlowTests.actor.cpp
dsltest.actor.cpp)
add_flow_target(STATIC_LIBRARY NAME fdbrpc
SRCS ${FDBRPC_SRCS}
DISABLE_ACTOR_DIAGNOSTICS ${FDBRPC_SRCS_DISABLE_ACTOR_DIAGNOSTICS})
2018-05-03 02:25:38 +08:00
target_include_directories(fdbrpc PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/libeio)
2019-04-10 02:16:45 +08:00
target_link_libraries(fdbrpc PRIVATE thirdparty)
2019-04-10 02:19:13 +08:00
target_link_libraries(fdbrpc PUBLIC flow)