2017-01-17 16:56:40 -08:00
|
|
|
# Code for compiling flatbuffers
|
2016-07-20 21:47:37 -07:00
|
|
|
|
2017-01-17 16:56:40 -08:00
|
|
|
include(ExternalProject)
|
2017-02-28 18:47:40 -08:00
|
|
|
include(CMakeParseArguments)
|
2016-07-20 21:47:37 -07:00
|
|
|
|
2017-10-12 21:00:23 -07:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g -Werror -Wall -Wno-error=unused-function -Wno-error=strict-aliasing")
|
2016-07-20 21:47:37 -07:00
|
|
|
|
2017-10-13 21:39:11 -07:00
|
|
|
# The rdynamic flag is needed to produce better backtraces on Linux.
|
|
|
|
if(UNIX AND NOT APPLE)
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic")
|
|
|
|
endif()
|
|
|
|
|
2017-01-17 16:56:40 -08:00
|
|
|
# Custom CFLAGS
|
|
|
|
|
2017-12-14 14:54:09 -08:00
|
|
|
set(CMAKE_C_FLAGS "-g -Wall -Wextra -Werror=implicit-function-declaration -Wno-sign-compare -Wno-unused-parameter -Wno-type-limits -Wno-missing-field-initializers --std=c99 -fPIC -std=c99")
|
2017-01-17 16:56:40 -08:00
|
|
|
|
2018-05-19 10:09:23 +08:00
|
|
|
# language-specific
|
|
|
|
if ("${CMAKE_RAY_LANG_PYTHON}" STREQUAL "YES")
|
|
|
|
# Code for finding Python
|
|
|
|
find_package(PythonInterp REQUIRED)
|
|
|
|
find_package(NumPy REQUIRED)
|
|
|
|
|
|
|
|
# Now find the Python include directories.
|
|
|
|
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import *; print(get_python_inc())"
|
|
|
|
OUTPUT_VARIABLE PYTHON_INCLUDE_DIRS OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
message(STATUS "PYTHON_INCLUDE_DIRS: " ${PYTHON_INCLUDE_DIRS})
|
|
|
|
|
|
|
|
message(STATUS "Using PYTHON_EXECUTABLE: " ${PYTHON_EXECUTABLE})
|
|
|
|
message(STATUS "Using PYTHON_INCLUDE_DIRS: " ${PYTHON_INCLUDE_DIRS})
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
if ("${CMAKE_RAY_LANG_JAVA}" STREQUAL "YES")
|
|
|
|
find_package(JNI REQUIRED)
|
|
|
|
# add jni support
|
|
|
|
include_directories(${JAVA_INCLUDE_PATH})
|
|
|
|
include_directories(${JAVA_INCLUDE_PATH2})
|
|
|
|
if (JNI_FOUND)
|
|
|
|
message (STATUS "JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}")
|
|
|
|
message (STATUS "JNI_LIBRARIES=${JNI_LIBRARIES}")
|
|
|
|
else()
|
|
|
|
message (WARNING "NOT FIND JNI")
|
|
|
|
endif()
|
|
|
|
endif()
|
2016-07-24 21:24:26 -07:00
|
|
|
|
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
|
|
|
include_directories(${CMAKE_SOURCE_DIR}/src/common)
|
|
|
|
include_directories(${CMAKE_SOURCE_DIR}/src/common/thirdparty)
|