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-13 02:19:33 +08:00
|
|
|
# Boost external project
|
|
|
|
# target:
|
|
|
|
# - boost_ep
|
|
|
|
# defines:
|
|
|
|
# - Boost_INCLUDE_DIR
|
|
|
|
# - Boost_SYSTEM_LIBRARY
|
|
|
|
# - Boost_FILESYSTEM_LIBRARY
|
2019-01-03 15:51:11 +08:00
|
|
|
# - Boost_THREAD_LIBRARY
|
|
|
|
|
|
|
|
option(RAY_BUILD_BOOST "Whether to build boost locally" ON)
|
|
|
|
|
|
|
|
# Set the required boost version.
|
|
|
|
set(BOOST_MAJOR_VERSION 1)
|
|
|
|
set(BOOST_MINOR_VERSION 68)
|
|
|
|
set(BOOST_SUBMINOR_VERSION 0)
|
|
|
|
set(TARGET_BOOST_VERSION ${BOOST_MAJOR_VERSION}.${BOOST_MINOR_VERSION}.${BOOST_SUBMINOR_VERSION})
|
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-13 02:19:33 +08:00
|
|
|
|
2018-09-23 21:52:33 +07:00
|
|
|
# boost is a stable library in ray, and it supports to find
|
|
|
|
# the boost pre-built in environment to speed up build process
|
2018-10-11 05:33:15 +08:00
|
|
|
if (DEFINED ENV{RAY_BOOST_ROOT} AND EXISTS $ENV{RAY_BOOST_ROOT})
|
2018-09-23 21:52:33 +07:00
|
|
|
set(Boost_USE_STATIC_LIBS ON)
|
2018-10-11 05:33:15 +08:00
|
|
|
set(BOOST_ROOT "$ENV{RAY_BOOST_ROOT}")
|
2019-01-03 15:51:11 +08:00
|
|
|
find_package(Boost ${TARGET_BOOST_VERSION} COMPONENTS system filesystem thread)
|
|
|
|
if (Boost_FOUND)
|
|
|
|
# If there is a newer version of Boost, there will be a warning message and Boost_FOUND is true.
|
|
|
|
set(FOUND_BOOST_VERSION ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION})
|
|
|
|
if (${TARGET_BOOST_VERSION} STREQUAL ${FOUND_BOOST_VERSION})
|
|
|
|
set(RAY_BUILD_BOOST OFF)
|
|
|
|
set(Boost_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
|
|
|
|
# Boost_SYSTEM_LIBRARY, Boost_FILESYSTEM_LIBRARY, Boost_THREAD_LIBRARY will be set by find_package(Boost).
|
|
|
|
add_custom_target(boost_ep)
|
|
|
|
else()
|
|
|
|
message("Required Boost Version ${TARGET_BOOST_VERSION} does not match the path: $ENV{RAY_BOOST_ROOT}. Will build Boost Locally.")
|
|
|
|
endif()
|
|
|
|
endif(Boost_FOUND)
|
|
|
|
endif()
|
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-13 02:19:33 +08:00
|
|
|
|
2019-01-03 15:51:11 +08:00
|
|
|
if (RAY_BUILD_BOOST)
|
2018-09-23 21:52:33 +07:00
|
|
|
set(Boost_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/boost-install)
|
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-13 02:19:33 +08:00
|
|
|
|
2018-09-23 21:52:33 +07:00
|
|
|
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})
|
2018-12-22 13:25:48 -08:00
|
|
|
set(Boost_THREAD_LIBRARY ${Boost_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}boost_thread${CMAKE_STATIC_LIBRARY_SUFFIX})
|
2018-09-23 21:52:33 +07:00
|
|
|
set(Boost_FILESYSTEM_LIBRARY ${Boost_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}boost_filesystem${CMAKE_STATIC_LIBRARY_SUFFIX})
|
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-13 02:19:33 +08:00
|
|
|
|
2018-09-23 21:52:33 +07:00
|
|
|
#set(boost_URL https://github.com/boostorg/boost.git)
|
2018-12-22 13:25:48 -08:00
|
|
|
#set(boost_TAG boost-1.68.0)
|
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-13 02:19:33 +08:00
|
|
|
|
2018-12-22 13:25:48 -08:00
|
|
|
set(Boost_TAR_GZ_URL http://dl.bintray.com/boostorg/release/1.68.0/source/boost_1_68_0.tar.gz)
|
2018-09-23 21:52:33 +07:00
|
|
|
set(Boost_BUILD_PRODUCTS ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY})
|
2018-12-22 13:25:48 -08:00
|
|
|
set(Boost_URL_MD5 "5d8b4503582fffa9eefdb9045359c239")
|
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-13 02:19:33 +08:00
|
|
|
|
2018-09-23 21:52:33 +07:00
|
|
|
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
|
2018-12-22 13:25:48 -08:00
|
|
|
BUILD_COMMAND bash -c "./b2 cxxflags=-fPIC cflags=-fPIC variant=release link=static --with-filesystem --with-system --with-thread --with-atomic --with-chrono --with-date_time --with-regex -j8 install --prefix=${Boost_INSTALL_PREFIX} > /dev/null"
|
2018-09-23 21:52:33 +07:00
|
|
|
INSTALL_COMMAND "")
|
|
|
|
endif ()
|