ray/cmake/Modules/BoostExternalProject.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.4 KiB
CMake

# Boost external project
# target:
# - boost_ep
# defines:
# - BOOST_ROOT
# - Boost_INCLUDE_DIR
# - Boost_SYSTEM_LIBRARY
# - Boost_FILESYSTEM_LIBRARY
set(Boost_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/boost-install)
set(Boost_INCLUDE_DIR ${Boost_INSTALL_PREFIX}/include)
set(BOOST_ROOT ${Boost_INSTALL_PREFIX})
set(Boost_LIBRARY_DIR ${Boost_INSTALL_PREFIX}/lib)
set(Boost_SYSTEM_LIBRARY ${Boost_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}boost_system${CMAKE_STATIC_LIBRARY_SUFFIX})
set(Boost_FILESYSTEM_LIBRARY ${Boost_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}boost_filesystem${CMAKE_STATIC_LIBRARY_SUFFIX})
#set(boost_URL https://github.com/boostorg/boost.git)
#set(boost_TAG boost-1.65.1)
set(Boost_TAR_GZ_URL http://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz)
set(Boost_BUILD_PRODUCTS ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY})
set(Boost_URL_MD5 "ee64fd29a3fe42232c6ac3c419e523cf")
set(Boost_USE_STATIC_LIBS ON)
ExternalProject_Add(boost_ep
PREFIX external/boost
URL ${Boost_TAR_GZ_URL}
URL_MD5 ${Boost_URL_MD5}
# GIT_REPOSITORY ${boost_URL}
# GIT_TAG ${boost_TAG}
# GIT_SUBMODULES ""
BUILD_IN_SOURCE 1
BUILD_BYPRODUCTS ${Boost_BUILD_PRODUCTS}
CONFIGURE_COMMAND ./bootstrap.sh
BUILD_COMMAND bash -c "./b2 cxxflags=-fPIC cflags=-fPIC variant=release link=static --with-filesystem --with-system --with-regex -j8 install --prefix=${Boost_INSTALL_PREFIX} > /dev/null"
INSTALL_COMMAND "")