Fix common cmake dependencies (#2876)

This commit is contained in:
Philipp Moritz
2018-09-15 22:11:12 -07:00
committed by Robert Nishihara
parent 503344149f
commit 47d2f82c6c
4 changed files with 7 additions and 8 deletions
+1 -6
View File
@@ -90,10 +90,6 @@ add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/src/global_scheduler/)
# final target copy_ray
add_custom_target(copy_ray ALL)
# Make sure redis-server is ready before copying.
add_dependencies(copy_ray copy_redis)
add_dependencies(copy_ray ray_redis_module)
# copy plasma_store_server
add_custom_command(TARGET copy_ray POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
@@ -131,7 +127,7 @@ if ("${CMAKE_RAY_LANG_PYTHON}" STREQUAL "YES")
list(APPEND build_ray_file_list ${CMAKE_BINARY_DIR}/${file})
endforeach()
add_custom_target(copy_ray_files DEPENDS ${build_ray_file_list})
add_custom_target(copy_ray_files DEPENDS ${build_ray_file_list} copy_redis ray_redis_module)
add_dependencies(copy_ray copy_ray_files)
# Make sure that the Python extensions are built before copying the files.
@@ -160,4 +156,3 @@ if ("${CMAKE_RAY_LANG_JAVA}" STREQUAL "YES")
add_custom_command(TARGET copy_ray POST_BUILD
COMMAND bash -c "cp ${ARROW_HOME}/lib/libplasma_java.* ${CMAKE_CURRENT_BINARY_DIR}/src/plasma")
endif()
+2
View File
@@ -20,6 +20,8 @@ set(OUTPUT_DIR ${CMAKE_CURRENT_LIST_DIR}/format/)
set(COMMON_FBS_OUTPUT_FILES
"${OUTPUT_DIR}/common_generated.h")
add_custom_target(gen_common_fbs DEPENDS ${COMMON_FBS_OUTPUT_FILES})
add_custom_command(
OUTPUT ${COMMON_FBS_OUTPUT_FILES}
# The --gen-object-api flag generates a C++ class MessageT for each
+3 -1
View File
@@ -47,12 +47,14 @@ add_dependencies(gen_local_scheduler_fbs arrow_ep)
add_library(local_scheduler_client STATIC local_scheduler_client.cc)
# local_scheduler_shared.h includes ray/gcs/client.h which requires gen_gcs_fbs & gen_node_manager_fbs.
add_dependencies(local_scheduler_client gen_local_scheduler_fbs ${COMMON_FBS_OUTPUT_FILES} gen_gcs_fbs gen_node_manager_fbs)
add_dependencies(local_scheduler_client hiredis gen_local_scheduler_fbs ${COMMON_FBS_OUTPUT_FILES} gen_gcs_fbs gen_node_manager_fbs)
add_executable(local_scheduler local_scheduler.cc local_scheduler_algorithm.cc)
add_dependencies(local_scheduler hiredis)
target_link_libraries(local_scheduler local_scheduler_client common ${HIREDIS_LIB} ${PLASMA_STATIC_LIB} ray_static ${ARROW_STATIC_LIB} -lpthread ${Boost_SYSTEM_LIBRARY})
add_executable(local_scheduler_tests test/local_scheduler_tests.cc local_scheduler.cc local_scheduler_algorithm.cc)
add_dependencies(local_scheduler_tests hiredis)
target_link_libraries(local_scheduler_tests local_scheduler_client common ${HIREDIS_LIB} ${PLASMA_STATIC_LIB} ray_static ${ARROW_STATIC_LIB} -lpthread ${Boost_SYSTEM_LIBRARY})
target_compile_options(local_scheduler_tests PUBLIC "-DLOCAL_SCHEDULER_TEST")
+1 -1
View File
@@ -67,7 +67,7 @@ set(RAY_LIB_DEPENDENCIES
gen_object_manager_fbs
gen_node_manager_fbs
gen_local_scheduler_fbs
${COMMON_FBS_OUTPUT_FILES})
gen_common_fbs)
if(RAY_USE_GLOG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DRAY_USE_GLOG")