ray/cmake/Modules/FlatBuffersExternalProject.cmake
Hanwei Jin fbf214e408 update ray cmake build process (#2853)
* use cmake to build ray project, no need to appply build.sh before cmake, fix some abuse of cmake, improve the build performance

* support boost external project, avoid using the system or build.sh boost

* keep compatible with build.sh, remove boost and arrow build from it.

* bugfix: parquet bison version control, plasma_java lib install problem

* bugfix: cmake, do not compile plasma java client if no need

* bugfix: component failures test timeout machenism has problem for plasma manager failed case

* bugfix: arrow use lib64 in centos, travis check-git-clang-format-output.sh does not support other branches except master

* revert some fix

* set arrow python executable, fix format error in component_failures_test.py

* make clean arrow python build directory

* update cmake code style, back to support cmake minimum version 3.4
2018-09-12 11:19:33 -07:00

38 lines
1.3 KiB
CMake

# flatbuffers external project
# target:
# - flatbuffer_ep
# depends:
#
# defines:
# - FLATBUFFERS_HOME
# - FLATBUFFERS_INCLUDE_DIR
# - FLATBUFFERS_STATIC_LIB
# - FLATBUFFERS_COMPILER
# - FBS_DEPENDS, to keep compatible
set(flatbuffers_VERSION "1.9.0")
set(flatbuffers_URL "https://github.com/google/flatbuffers/archive/v${flatbuffers_VERSION}.tar.gz")
set(flatbuffers_URL_MD5 "8be7513bf960034f6873326d09521a4b")
set(FLATBUFFERS_INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/external/flatbuffers-install")
set(FBS_DEPENDS flatbuffers_ep)
# The following is needed because in CentOS, the lib directory is named lib64
if(EXISTS "/etc/redhat-release" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
set(LIB_SUFFIX 64)
endif()
set(FLATBUFFERS_HOME "${FLATBUFFERS_INSTALL_PREFIX}")
set(FLATBUFFERS_INCLUDE_DIR "${FLATBUFFERS_INSTALL_PREFIX}/include")
set(FLATBUFFERS_STATIC_LIB "${FLATBUFFERS_INSTALL_PREFIX}/lib${LIB_SUFFIX}/libflatbuffers.a")
set(FLATBUFFERS_COMPILER "${FLATBUFFERS_INSTALL_PREFIX}/bin/flatc")
ExternalProject_Add(flatbuffers_ep
PREFIX external/flatbuffers
URL ${flatbuffers_URL}
URL_MD5 ${flatbuffers_URL_MD5}
CMAKE_ARGS
"-DCMAKE_CXX_FLAGS=-fPIC"
"-DCMAKE_INSTALL_PREFIX:PATH=${FLATBUFFERS_INSTALL_PREFIX}"
"-DFLATBUFFERS_BUILD_TESTS=OFF"
"-DCMAKE_BUILD_TYPE=RELEASE")