Build flow-binding
This commit is contained in:
parent
733ba0a751
commit
50a01fb8ce
|
@ -1,4 +1,5 @@
|
|||
add_subdirectory(c)
|
||||
add_subdirectory(flow)
|
||||
add_subdirectory(python)
|
||||
if(BUILD_JAVA)
|
||||
add_subdirectory(java)
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
set(SRCS
|
||||
DirectoryLayer.actor.cpp
|
||||
DirectoryLayer.h
|
||||
DirectoryPartition.h
|
||||
DirectorySubspace.cpp
|
||||
DirectorySubspace.h
|
||||
FDBLoanerTypes.h
|
||||
HighContentionAllocator.actor.cpp
|
||||
HighContentionAllocator.h
|
||||
IDirectory.h
|
||||
Node.actor.cpp
|
||||
Subspace.cpp
|
||||
Subspace.h
|
||||
Tuple.cpp
|
||||
Tuple.h
|
||||
fdb_flow.actor.cpp
|
||||
fdb_flow.h)
|
||||
|
||||
add_flow_target(NAME fdb_flow SRCS ${SRCS} STATIC_LIBRARY)
|
||||
target_link_libraries(fdb_flow PUBLIC fdb_c)
|
||||
|
||||
add_subdirectory(tester)
|
||||
|
||||
# generate flow-package
|
||||
foreach(f IN LISTS SRCS)
|
||||
if(f MATCHES ".*\\.h$")
|
||||
list(APPEND headers ${CMAKE_CURRENT_SOURCE_DIR}/${f})
|
||||
endif()
|
||||
endforeach()
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/packages)
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/packages)
|
||||
set(package_dir ${CMAKE_CURRENT_BINARY_DIR}/packages/fdb-flow-${CMAKE_PROJECT_VERSION})
|
||||
set(tar_file ${CMAKE_BINARY_DIR}/packages/fdb-flow-${CMAKE_PROJECT_VERSION}.tar.gz)
|
||||
add_custom_command(OUTPUT ${tar_file}
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E make_directory ${package_dir} &&
|
||||
${CMAKE_COMMAND} -E copy $<TARGET_FILE:fdb_flow> ${headers} ${package_dir} &&
|
||||
${CMAKE_COMMAND} -E tar czf ${tar_file} ${package_dir}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/packages
|
||||
COMMENT "Build fdb_flow package")
|
||||
add_custom_target(package_flow DEPENDS ${tar_file})
|
|
@ -0,0 +1,6 @@
|
|||
set(TEST_SRCS
|
||||
DirectoryTester.actor.cpp
|
||||
Tester.actor.cpp
|
||||
Tester.actor.h)
|
||||
add_flow_target(NAME fdb_flow_tester EXECUTABLE SRCS ${TEST_SRCS})
|
||||
target_link_libraries(fdb_flow_tester fdb_flow)
|
Loading…
Reference in New Issue