mirror of
https://github.com/apache/arrow.git
synced 2026-10-28 16:47:19 +08:00
Add *-all, *-tests, *-benchmarks modular build targets. Use in Travis CI
Change-Id: I56c723873f0d0922c73dd5c370a4132073243a79
This commit is contained in:
1 parent
5c48bdb5de
commit
4202824334
20 files changed
+116
-95
No files matched your search
+2
-6
@@ -112,9 +112,7 @@ matrix:
|
||||
- ARROW_TRAVIS_GANDIVA_JAVA=1
|
||||
- ARROW_TRAVIS_GANDIVA_TESTS=1
|
||||
- ARROW_TRAVIS_OPTIONAL_INSTALL=1
|
||||
- ARROW_CPP_BUILD_TARGETS="gandiva"
|
||||
# TODO(wesm): Remove this after ARROW-4026
|
||||
- ARROW_TRAVIS_CPP_TEST_INCLUDE_LABELS="gandiva"
|
||||
- ARROW_CPP_BUILD_TARGETS="gandiva-all"
|
||||
- ARROW_TRAVIS_USE_TOOLCHAIN=1
|
||||
# ARROW-3979 temporarily disabled.
|
||||
- ARROW_TRAVIS_VALGRIND=0
|
||||
@@ -164,9 +162,7 @@ matrix:
|
||||
- ARROW_TRAVIS_GANDIVA_JAVA=1
|
||||
- ARROW_TRAVIS_GANDIVA_TESTS=1
|
||||
- ARROW_TRAVIS_OPTIONAL_INSTALL=1
|
||||
- ARROW_CPP_BUILD_TARGETS="gandiva"
|
||||
# TODO(wesm): Remove this after ARROW-4026
|
||||
- ARROW_TRAVIS_CPP_TEST_INCLUDE_LABELS="gandiva"
|
||||
- ARROW_CPP_BUILD_TARGETS="gandiva-all"
|
||||
- ARROW_TRAVIS_USE_TOOLCHAIN=1
|
||||
- ARROW_BUILD_WARNING_LEVEL=CHECKIN
|
||||
before_script:
|
||||
|
||||
@@ -42,7 +42,6 @@ fi
|
||||
|
||||
CMAKE_COMMON_FLAGS="\
|
||||
-DCMAKE_INSTALL_PREFIX=$ARROW_CPP_INSTALL \
|
||||
-DARROW_TEST_INCLUDE_LABELS=$ARROW_TRAVIS_CPP_TEST_INCLUDE_LABELS \
|
||||
-DARROW_NO_DEPRECATED_API=ON \
|
||||
-DARROW_EXTRA_ERROR_CONTEXT=ON"
|
||||
CMAKE_LINUX_FLAGS=""
|
||||
@@ -102,9 +101,6 @@ if [ $ARROW_TRAVIS_GANDIVA == "1" ]; then
|
||||
if [ $ARROW_TRAVIS_GANDIVA_JAVA == "1" ]; then
|
||||
CMAKE_COMMON_FLAGS="$CMAKE_COMMON_FLAGS -DARROW_GANDIVA_JAVA=ON"
|
||||
fi
|
||||
if [ $ARROW_TRAVIS_GANDIVA_TESTS == "1" ]; then
|
||||
CMAKE_COMMON_FLAGS="$CMAKE_COMMON_FLAGS -DARROW_BUILD_TESTS=ON"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $ARROW_TRAVIS_VALGRIND == "1" ]; then
|
||||
|
||||
@@ -23,7 +23,7 @@ source $TRAVIS_BUILD_DIR/ci/travis_env_common.sh
|
||||
|
||||
pushd $CPP_BUILD_DIR
|
||||
|
||||
PATH=$ARROW_BUILD_TYPE:$PATH ctest -j2 --output-on-failure -L gandiva
|
||||
PATH=$ARROW_BUILD_TYPE:$PATH ctest -j2 --output-on-failure -L gandiva-tests
|
||||
|
||||
popd
|
||||
|
||||
|
||||
@@ -87,21 +87,20 @@ rm -rf *
|
||||
# XXX Can we simply reuse CMAKE_COMMON_FLAGS from travis_before_script_cpp.sh?
|
||||
CMAKE_COMMON_FLAGS="-DARROW_EXTRA_ERROR_CONTEXT=ON"
|
||||
|
||||
PYTHON_CPP_BUILD_TARGETS="arrow_python plasma"
|
||||
PYTHON_CPP_BUILD_TARGETS="arrow_python-all plasma"
|
||||
|
||||
if [ $ARROW_TRAVIS_COVERAGE == "1" ]; then
|
||||
CMAKE_COMMON_FLAGS="$CMAKE_COMMON_FLAGS -DARROW_GENERATE_COVERAGE=ON"
|
||||
fi
|
||||
|
||||
if [ $ARROW_TRAVIS_PYTHON_GANDIVA == "1" ]; then
|
||||
CMAKE_COMMON_FLAGS="$CMAKE_COMMON_FLAGS -DARROW_GANDIVA=ON -DARROW_GANDIVA_BUILD_TESTS=OFF"
|
||||
CMAKE_COMMON_FLAGS="$CMAKE_COMMON_FLAGS -DARROW_GANDIVA=ON"
|
||||
PYTHON_CPP_BUILD_TARGETS="$PYTHON_CPP_BUILD_TARGETS gandiva"
|
||||
fi
|
||||
|
||||
cmake -GNinja \
|
||||
$CMAKE_COMMON_FLAGS \
|
||||
-DARROW_BUILD_TESTS=ON \
|
||||
-DARROW_TEST_INCLUDE_LABELS=python \
|
||||
-DARROW_BUILD_UTILITIES=OFF \
|
||||
-DARROW_OPTIONAL_INSTALL=ON \
|
||||
-DARROW_PLASMA=on \
|
||||
|
||||
+15
-10
@@ -333,10 +333,6 @@ Always OFF if building binaries"
|
||||
#----------------------------------------------------------------------
|
||||
# Advanced developer options
|
||||
|
||||
set(ARROW_TEST_INCLUDE_LABELS "" CACHE STRING
|
||||
"Only build unit tests having the indicated label or labels. \
|
||||
Pass multiple labels by dividing with semicolons")
|
||||
|
||||
option(ARROW_EXTRA_ERROR_CONTEXT
|
||||
"Compile with extra error context (line numbers, code)"
|
||||
OFF)
|
||||
@@ -466,10 +462,18 @@ endif()
|
||||
|
||||
if(NOT ARROW_BUILD_TESTS)
|
||||
set(NO_TESTS 1)
|
||||
else()
|
||||
add_custom_target(all-tests)
|
||||
add_custom_target(unittest ctest -L unittest)
|
||||
add_dependencies(unittest all-tests)
|
||||
endif()
|
||||
|
||||
if(NOT ARROW_BUILD_BENCHMARKS)
|
||||
set(NO_BENCHMARKS 1)
|
||||
else()
|
||||
add_custom_target(all-benchmarks)
|
||||
add_custom_target(benchmark ctest -L benchmark)
|
||||
add_dependencies(benchmark all-benchmarks)
|
||||
endif()
|
||||
|
||||
if(NOT ARROW_BUILD_EXAMPLES)
|
||||
@@ -516,8 +520,6 @@ include(SetupCxxFlags)
|
||||
# Dependencies
|
||||
############################################################
|
||||
|
||||
add_custom_target(arrow_dependencies)
|
||||
|
||||
include(BuildUtils)
|
||||
enable_testing()
|
||||
|
||||
@@ -673,6 +675,13 @@ set(ARROW_LINK_LIBS)
|
||||
# Libraries to link statically with libarrow.so
|
||||
set(ARROW_STATIC_LINK_LIBS double-conversion_static)
|
||||
|
||||
add_custom_target(arrow_dependencies)
|
||||
add_dependencies(arrow_dependencies toolchain)
|
||||
|
||||
if (ARROW_STATIC_LINK_LIBS)
|
||||
add_dependencies(arrow_dependencies ${ARROW_STATIC_LINK_LIBS})
|
||||
endif()
|
||||
|
||||
if (ARROW_WITH_BROTLI)
|
||||
SET(ARROW_STATIC_LINK_LIBS
|
||||
brotli_dec_static
|
||||
@@ -712,10 +721,6 @@ if (ARROW_USE_GLOG)
|
||||
add_definitions("-DARROW_USE_GLOG")
|
||||
endif()
|
||||
|
||||
if (ARROW_STATIC_LINK_LIBS)
|
||||
add_dependencies(arrow_dependencies ${ARROW_STATIC_LINK_LIBS})
|
||||
endif()
|
||||
|
||||
set(ARROW_SHARED_PRIVATE_LINK_LIBS
|
||||
${ARROW_STATIC_LINK_LIBS}
|
||||
${BOOST_SYSTEM_LIBRARY}
|
||||
|
||||
+6
-2
@@ -105,14 +105,18 @@ export LC_ALL="en_US.UTF-8"
|
||||
## Modular Build Targets
|
||||
|
||||
Since there are several major parts of the C++ project, we have provided
|
||||
modular CMake targets for building each component along with its dependencies,
|
||||
unit tests, and benchmarks (if enabled):
|
||||
modular CMake targets for building each library component, group of unit tests
|
||||
and benchmarks, and their dependencies:
|
||||
|
||||
* `make arrow` for Arrow core libraries
|
||||
* `make parquet` for Parquet libraries
|
||||
* `make gandiva` for Gandiva (LLVM expression compiler) libraries
|
||||
* `make plasma` for Plasma libraries, server
|
||||
|
||||
To build the unit tests or benchmarks, add `-tests` or `-benchmarks` to the
|
||||
target name. So `make arrow-tests` will build the Arrow core unit tests. Using
|
||||
the `-all` target, e.g. `parquet-all`, will build everything.
|
||||
|
||||
If you wish to only build and install one or more project subcomponents, we
|
||||
have provided the CMake option `ARROW_OPTIONAL_INSTALL` to only install targets
|
||||
that have been built. For example, if you only wish to build the Parquet
|
||||
|
||||
@@ -308,6 +308,9 @@ endfunction()
|
||||
# \arg PREFIX a string to append to the name of the benchmark executable. For
|
||||
# example, if you have src/arrow/foo/bar-benchmark.cc, then PREFIX "foo" will
|
||||
# create test executable foo-bar-benchmark
|
||||
# \arg LABELS the benchmark label or labels to assign the unit tests to. By
|
||||
# default, benchmarks will go in the "benchmark" group. Custom targets for the
|
||||
# group names must exist
|
||||
function(ADD_BENCHMARK REL_BENCHMARK_NAME)
|
||||
set(options)
|
||||
set(one_value_args)
|
||||
@@ -343,20 +346,22 @@ function(ADD_BENCHMARK REL_BENCHMARK_NAME)
|
||||
set(NO_COLOR "")
|
||||
endif()
|
||||
|
||||
# Add test as dependency of relevant label targets
|
||||
add_dependencies(all-benchmarks ${BENCHMARK_NAME})
|
||||
foreach (TARGET ${ARG_LABELS})
|
||||
add_dependencies(${TARGET} ${BENCHMARK_NAME})
|
||||
endforeach()
|
||||
|
||||
if (ARG_DEPENDENCIES)
|
||||
add_dependencies(${BENCHMARK_NAME} ${ARG_DEPENDENCIES})
|
||||
endif()
|
||||
|
||||
if (ARG_LABELS)
|
||||
set(ARG_LABELS "${ARG_LABELS}")
|
||||
set(ARG_LABELS "benchmark;${ARG_LABELS}")
|
||||
else()
|
||||
set(ARG_LABELS benchmark)
|
||||
endif()
|
||||
|
||||
foreach (TEST_LABEL ${ARG_LABELS})
|
||||
add_dependencies(${TEST_LABEL} ${BENCHMARK_NAME})
|
||||
endforeach()
|
||||
|
||||
add_test(${BENCHMARK_NAME}
|
||||
${BUILD_SUPPORT_DIR}/run-test.sh ${CMAKE_BINARY_DIR} benchmark ${BENCHMARK_PATH} ${NO_COLOR})
|
||||
set_property(TEST ${BENCHMARK_NAME}
|
||||
@@ -389,7 +394,7 @@ endfunction()
|
||||
# \arg LABELS the unit test label or labels to assign the unit tests
|
||||
# to. By default, unit tests will go in the "unittest" group, but if we have
|
||||
# multiple unit tests in some subgroup, you can assign a test to multiple
|
||||
# groups using the syntax unittest;GROUP2;GROUP3. Custom targets for the group
|
||||
# groups use the syntax unittest;GROUP2;GROUP3. Custom targets for the group
|
||||
# names must exist
|
||||
function(ADD_TEST_CASE REL_TEST_NAME)
|
||||
set(options NO_VALGRIND ENABLED)
|
||||
@@ -401,18 +406,6 @@ function(ADD_TEST_CASE REL_TEST_NAME)
|
||||
message(SEND_ERROR "Error: unrecognized arguments: ${ARG_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
|
||||
if (NOT "${ARROW_TEST_INCLUDE_LABELS}" STREQUAL "")
|
||||
set(_SKIP_TEST TRUE)
|
||||
foreach (_INCLUDED_LABEL ${ARROW_TEST_INCLUDE_LABELS})
|
||||
if ("${ARG_LABELS}" MATCHES "${_INCLUDED_LABEL}")
|
||||
set(_SKIP_TEST FALSE)
|
||||
endif()
|
||||
endforeach()
|
||||
if (_SKIP_TEST)
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NO_TESTS AND NOT ARG_ENABLED)
|
||||
return()
|
||||
endif()
|
||||
@@ -422,12 +415,6 @@ function(ADD_TEST_CASE REL_TEST_NAME)
|
||||
set(TEST_NAME "${ARG_PREFIX}-${TEST_NAME}")
|
||||
endif()
|
||||
|
||||
if (ARG_LABELS)
|
||||
set(ARG_LABELS "${ARG_LABELS}")
|
||||
else()
|
||||
set(ARG_LABELS unittest)
|
||||
endif()
|
||||
|
||||
if (ARG_SOURCES)
|
||||
set(SOURCES ${ARG_SOURCES})
|
||||
else()
|
||||
@@ -458,10 +445,6 @@ function(ADD_TEST_CASE REL_TEST_NAME)
|
||||
add_dependencies(${TEST_NAME} ${ARG_EXTRA_DEPENDENCIES})
|
||||
endif()
|
||||
|
||||
foreach (TEST_LABEL ${ARG_LABELS})
|
||||
add_dependencies(${TEST_LABEL} ${TEST_NAME})
|
||||
endforeach()
|
||||
|
||||
if (ARROW_TEST_MEMCHECK AND NOT ARG_NO_VALGRIND)
|
||||
SET_PROPERTY(TARGET ${TEST_NAME}
|
||||
APPEND_STRING PROPERTY
|
||||
@@ -477,6 +460,18 @@ function(ADD_TEST_CASE REL_TEST_NAME)
|
||||
${BUILD_SUPPORT_DIR}/run-test.sh ${CMAKE_BINARY_DIR} test ${TEST_PATH})
|
||||
endif()
|
||||
|
||||
# Add test as dependency of relevant targets
|
||||
add_dependencies(all-tests ${TEST_NAME})
|
||||
foreach (TARGET ${ARG_LABELS})
|
||||
add_dependencies(${TARGET} ${TEST_NAME})
|
||||
endforeach()
|
||||
|
||||
if (ARG_LABELS)
|
||||
set(ARG_LABELS "unittest;${ARG_LABELS}")
|
||||
else()
|
||||
set(ARG_LABELS unittest)
|
||||
endif()
|
||||
|
||||
set_property(TEST ${TEST_NAME}
|
||||
APPEND PROPERTY
|
||||
LABELS ${ARG_LABELS})
|
||||
@@ -537,7 +532,6 @@ function(ADD_ARROW_EXAMPLE REL_EXAMPLE_NAME)
|
||||
add_dependencies(${EXAMPLE_NAME} ${ARG_DEPENDENCIES})
|
||||
endif()
|
||||
|
||||
|
||||
add_test(${EXAMPLE_NAME} ${EXAMPLE_PATH})
|
||||
set_tests_properties(${EXAMPLE_NAME} PROPERTIES LABELS "example")
|
||||
endfunction()
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
add_custom_target(toolchain)
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Toolchain linkage options
|
||||
|
||||
@@ -401,7 +403,7 @@ if (ARROW_BOOST_VENDORED)
|
||||
${EP_LOG_OPTIONS})
|
||||
set(Boost_INCLUDE_DIR "${BOOST_PREFIX}")
|
||||
set(Boost_INCLUDE_DIRS "${BOOST_INCLUDE_DIR}")
|
||||
add_dependencies(arrow_dependencies boost_ep)
|
||||
add_dependencies(toolchain boost_ep)
|
||||
else()
|
||||
if (MSVC)
|
||||
# disable autolinking in boost
|
||||
@@ -513,7 +515,7 @@ else()
|
||||
endif()
|
||||
|
||||
if (DOUBLE_CONVERSION_VENDORED)
|
||||
add_dependencies(arrow_dependencies double-conversion_ep)
|
||||
add_dependencies(toolchain double-conversion_ep)
|
||||
else()
|
||||
get_property(DOUBLE_CONVERSION_STATIC_LIB TARGET double-conversion::double-conversion
|
||||
PROPERTY LOCATION)
|
||||
@@ -532,9 +534,6 @@ message(STATUS "double-conversion static library: ${DOUBLE_CONVERSION_STATIC_LIB
|
||||
# ----------------------------------------------------------------------
|
||||
# Google gtest & gflags
|
||||
|
||||
add_custom_target(unittest ctest -L unittest)
|
||||
add_custom_target(benchmark ctest -L benchmark)
|
||||
|
||||
if(ARROW_BUILD_TESTS OR ARROW_GANDIVA_BUILD_TESTS
|
||||
OR ARROW_BUILD_BENCHMARKS)
|
||||
if("${GTEST_HOME}" STREQUAL "")
|
||||
@@ -707,7 +706,7 @@ if (ARROW_IPC)
|
||||
include_directories(SYSTEM ${RAPIDJSON_INCLUDE_DIR})
|
||||
|
||||
if(RAPIDJSON_VENDORED)
|
||||
add_dependencies(arrow_dependencies rapidjson_ep)
|
||||
add_dependencies(toolchain rapidjson_ep)
|
||||
endif()
|
||||
|
||||
## Flatbuffers
|
||||
@@ -739,7 +738,7 @@ if (ARROW_IPC)
|
||||
endif()
|
||||
|
||||
if(FLATBUFFERS_VENDORED)
|
||||
add_dependencies(arrow_dependencies flatbuffers_ep)
|
||||
add_dependencies(toolchain flatbuffers_ep)
|
||||
endif()
|
||||
|
||||
message(STATUS "Flatbuffers include dir: ${FLATBUFFERS_INCLUDE_DIR}")
|
||||
@@ -1173,7 +1172,7 @@ if (ARROW_GANDIVA)
|
||||
endif()
|
||||
|
||||
if (RE2_VENDORED)
|
||||
add_dependencies (arrow_dependencies re2_ep)
|
||||
add_dependencies (toolchain re2_ep)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
||||
@@ -15,7 +15,11 @@
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
add_custom_target(arrow-all)
|
||||
add_custom_target(arrow)
|
||||
add_custom_target(arrow-benchmarks)
|
||||
add_custom_target(arrow-tests)
|
||||
add_dependencies(arrow-all arrow arrow-tests arrow-benchmarks)
|
||||
|
||||
# Adding unit tests part of the "arrow" portion of the test suite
|
||||
function(ADD_ARROW_TEST REL_TEST_NAME)
|
||||
@@ -31,7 +35,7 @@ function(ADD_ARROW_TEST REL_TEST_NAME)
|
||||
endif()
|
||||
ADD_TEST_CASE(${REL_TEST_NAME}
|
||||
PREFIX ${PREFIX}
|
||||
LABELS "unittest;arrow"
|
||||
LABELS "arrow-tests"
|
||||
${ARG_UNPARSED_ARGUMENTS})
|
||||
endfunction()
|
||||
|
||||
@@ -47,7 +51,7 @@ function(ADD_ARROW_BENCHMARK REL_TEST_NAME)
|
||||
endif()
|
||||
ADD_BENCHMARK(${REL_TEST_NAME}
|
||||
PREFIX ${PREFIX}
|
||||
LABELS "benchmark;arrow"
|
||||
LABELS "arrow-benchmarks"
|
||||
${ARG_UNPARSED_ARGUMENTS})
|
||||
endfunction()
|
||||
|
||||
@@ -215,6 +219,8 @@ ADD_ARROW_LIB(arrow
|
||||
SHARED_PRIVATE_LINK_LIBS ${ARROW_SHARED_PRIVATE_LINK_LIBS}
|
||||
STATIC_LINK_LIBS ${ARROW_STATIC_LINK_LIBS})
|
||||
|
||||
add_dependencies(arrow ${ARROW_LIBRARIES})
|
||||
|
||||
if (ARROW_BUILD_STATIC AND WIN32)
|
||||
target_compile_definitions(arrow_static PUBLIC ARROW_STATIC)
|
||||
endif()
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
# under the License.
|
||||
|
||||
add_custom_target(arrow_hiveserver2)
|
||||
add_custom_target(arrow_hiveserver2-tests)
|
||||
|
||||
# Headers: top level
|
||||
ARROW_INSTALL_ALL_HEADERS("arrow/dbi/hiveserver2")
|
||||
@@ -103,9 +104,9 @@ set(ARROW_HIVESERVER2_TEST_LINK_LIBS
|
||||
thriftstatic)
|
||||
|
||||
if (ARROW_BUILD_TESTS)
|
||||
ADD_ARROW_TEST(hiveserver2-test
|
||||
ADD_TEST_CASE(hiveserver2-test
|
||||
STATIC_LINK_LIBS "${ARROW_HIVESERVER2_TEST_LINK_LIBS}"
|
||||
LABELS "arrow_hiveserver2"
|
||||
LABELS "arrow_hiveserver2-tests"
|
||||
)
|
||||
if (TARGET arrow-hiveserver2-test)
|
||||
set_property(TARGET arrow-hiveserver2-test
|
||||
|
||||
@@ -75,7 +75,6 @@ set(ARROW_FLIGHT_SRCS
|
||||
|
||||
ADD_ARROW_LIB(arrow_flight
|
||||
SOURCES ${ARROW_FLIGHT_SRCS}
|
||||
DEPENDENCIES arrow_dependencies
|
||||
SHARED_LINK_LIBS arrow_shared ${ARROW_FLIGHT_STATIC_LINK_LIBS}
|
||||
STATIC_LINK_LIBS arrow_static ${ARROW_FLIGHT_STATIC_LINK_LIBS})
|
||||
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
# arrow_cuda
|
||||
#######################################
|
||||
|
||||
add_custom_target(arrow_cuda-all)
|
||||
add_custom_target(arrow_cuda)
|
||||
add_custom_target(arrow_cuda-benchmarks)
|
||||
add_custom_target(arrow_cuda-tests)
|
||||
add_dependencies(arrow_cuda-all arrow_cuda arrow_cuda-tests arrow_cuda-benchmarks)
|
||||
|
||||
if (DEFINED ENV{CUDA_HOME})
|
||||
set(CUDA_TOOLKIT_ROOT_DIR "$ENV{CUDA_HOME}")
|
||||
endif()
|
||||
@@ -49,6 +55,8 @@ ADD_ARROW_LIB(arrow_cuda
|
||||
STATIC_LINK_LIBS ${ARROW_CUDA_SHARED_LINK_LIBS}
|
||||
)
|
||||
|
||||
add_dependencies(arrow_cuda ${ARROW_CUDA_LIBRARIES})
|
||||
|
||||
foreach(LIB_TARGET ${ARROW_CUDA_LIBRARIES})
|
||||
target_compile_definitions(${LIB_TARGET}
|
||||
PRIVATE ARROW_EXPORTING)
|
||||
@@ -77,9 +85,10 @@ if (ARROW_BUILD_TESTS)
|
||||
endif()
|
||||
|
||||
if (ARROW_BUILD_BENCHMARKS)
|
||||
cuda_add_executable(cuda-benchmark cuda-benchmark.cc)
|
||||
target_link_libraries(cuda-benchmark
|
||||
cuda_add_executable(arrow-cuda-benchmark cuda-benchmark.cc)
|
||||
target_link_libraries(arrow-cuda-benchmark
|
||||
arrow_cuda_shared
|
||||
gtest_static
|
||||
${ARROW_BENCHMARK_LINK_LIBS})
|
||||
add_dependencies(arrow_cuda-benchmarks arrow-cuda-benchmark)
|
||||
endif()
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
# Targets required for protocol integration testing
|
||||
add_custom_target(integration)
|
||||
add_dependencies(arrow integration)
|
||||
add_dependencies(arrow-tests integration)
|
||||
|
||||
#######################################
|
||||
# Messaging and interprocess communication
|
||||
|
||||
@@ -22,7 +22,10 @@
|
||||
find_package(PythonLibsNew REQUIRED)
|
||||
find_package(NumPy REQUIRED)
|
||||
|
||||
add_custom_target(arrow_python-all)
|
||||
add_custom_target(arrow_python)
|
||||
add_custom_target(arrow_python-tests)
|
||||
add_dependencies(arrow_python-all arrow_python arrow_python-tests)
|
||||
|
||||
set(ARROW_PYTHON_SRCS
|
||||
arrow_to_pandas.cc
|
||||
@@ -126,10 +129,10 @@ if (ARROW_BUILD_TESTS)
|
||||
|
||||
set(ARROW_PYTHON_TEST_LINK_LIBS ${ARROW_PYTHON_MIN_TEST_LIBS})
|
||||
|
||||
ADD_ARROW_TEST(python-test
|
||||
ADD_TEST_CASE(python-test
|
||||
STATIC_LINK_LIBS "${ARROW_PYTHON_TEST_LINK_LIBS}"
|
||||
EXTRA_LINK_LIBS ${PYTHON_LIBRARIES}
|
||||
EXTRA_INCLUDES "${ARROW_PYTHON_INCLUDES}"
|
||||
LABELS "arrow_python"
|
||||
LABELS "arrow_python-tests"
|
||||
NO_VALGRIND)
|
||||
endif()
|
||||
@@ -15,13 +15,16 @@
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
project(gandiva)
|
||||
# For "make gandiva" to build everything Gandiva-related
|
||||
add_custom_target(gandiva-all)
|
||||
add_custom_target(gandiva)
|
||||
add_custom_target(gandiva-tests)
|
||||
add_custom_target(gandiva-benchmarks)
|
||||
|
||||
add_dependencies(gandiva-all gandiva gandiva-tests gandiva-benchmarks)
|
||||
|
||||
find_package(LLVM)
|
||||
|
||||
# For "make gandiva" to build everything Gandiva-related
|
||||
add_custom_target(gandiva)
|
||||
|
||||
# Set the path where the byte-code files will be installed.
|
||||
set(GANDIVA_BC_INSTALL_DIR
|
||||
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/gandiva)
|
||||
@@ -80,7 +83,7 @@ endif()
|
||||
ADD_ARROW_LIB(gandiva
|
||||
SOURCES ${SRC_FILES}
|
||||
OUTPUTS GANDIVA_LIBRARIES
|
||||
DEPENDENCIES arrow_dependencies precompiled
|
||||
DEPENDENCIES precompiled
|
||||
EXTRA_INCLUDES
|
||||
$<TARGET_PROPERTY:LLVM::LLVM_INTERFACE,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
SHARED_LINK_LIBS arrow_shared
|
||||
@@ -120,7 +123,7 @@ function(ADD_GANDIVA_TEST REL_TEST_NAME)
|
||||
set(TEST_ARGUMENTS
|
||||
ENABLED
|
||||
PREFIX "gandiva"
|
||||
LABELS "unittest;gandiva"
|
||||
LABELS "gandiva-tests"
|
||||
${ARG_UNPARSED_ARGUMENTS})
|
||||
|
||||
# and uses less disk space, but in some cases we need to force static
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
project(gandiva_jni)
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.11)
|
||||
message(FATAL_ERROR "Building the Gandiva JNI bindings requires CMake version >= 3.11")
|
||||
endif()
|
||||
|
||||
@@ -58,7 +58,7 @@ function(add_precompiled_unit_test REL_TEST_NAME)
|
||||
set(TEST_NAME "gandiva-precompiled-${TEST_NAME}")
|
||||
|
||||
add_executable(${TEST_NAME} ${REL_TEST_NAME} ${ARGN})
|
||||
add_dependencies(gandiva ${TEST_NAME})
|
||||
add_dependencies(gandiva-tests ${TEST_NAME})
|
||||
target_include_directories(${TEST_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/src)
|
||||
target_link_libraries(${TEST_NAME}
|
||||
PRIVATE ${ARROW_TEST_LINK_LIBS} ${RE2_LIBRARY}
|
||||
|
||||
@@ -15,6 +15,12 @@
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
add_custom_target(parquet-all)
|
||||
add_custom_target(parquet)
|
||||
add_custom_target(parquet-benchmarks)
|
||||
add_custom_target(parquet-tests)
|
||||
add_dependencies(parquet-all parquet parquet-tests parquet-benchmarks)
|
||||
|
||||
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/.parquetcppversion" PARQUET_VERSION)
|
||||
string(REPLACE "\n" "" PARQUET_VERSION "${PARQUET_VERSION}")
|
||||
string(REGEX MATCH "^([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?)" VERSION ${PARQUET_VERSION})
|
||||
@@ -22,9 +28,6 @@ if(NOT VERSION)
|
||||
message(FATAL_ERROR "invalid .parquetcppversion")
|
||||
endif()
|
||||
|
||||
# For "make parquet" to build everything Parquet-related
|
||||
add_custom_target(parquet)
|
||||
|
||||
function(ADD_PARQUET_TEST REL_TEST_NAME)
|
||||
set(options USE_STATIC_LINKING)
|
||||
set(one_value_args)
|
||||
@@ -34,19 +37,21 @@ function(ADD_PARQUET_TEST REL_TEST_NAME)
|
||||
message(SEND_ERROR "Error: unrecognized arguments: ${ARG_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
|
||||
set(TEST_ARGUMENTS
|
||||
PREFIX "parquet"
|
||||
LABELS "parquet-tests")
|
||||
|
||||
# By default we prefer shared linking with libparquet, as it's faster
|
||||
# and uses less disk space, but in some cases we need to force static
|
||||
# linking (see rationale below).
|
||||
if (ARG_USE_STATIC_LINKING)
|
||||
ADD_TEST_CASE(${REL_TEST_NAME}
|
||||
STATIC_LINK_LIBS ${PARQUET_STATIC_TEST_LINK_LIBS}
|
||||
PREFIX "parquet"
|
||||
LABELS "unittest;parquet")
|
||||
${TEST_ARGUMENTS})
|
||||
else()
|
||||
ADD_TEST_CASE(${REL_TEST_NAME}
|
||||
STATIC_LINK_LIBS ${PARQUET_SHARED_TEST_LINK_LIBS}
|
||||
PREFIX "parquet"
|
||||
LABELS "unittest;parquet")
|
||||
${TEST_ARGUMENTS})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
@@ -217,6 +222,8 @@ ADD_ARROW_LIB(parquet
|
||||
STATIC_LINK_LIBS ${PARQUET_STATIC_LINK_LIBS}
|
||||
)
|
||||
|
||||
add_dependencies(parquet ${PARQUET_LIBRARIES})
|
||||
|
||||
# Thrift requires these definitions for some types that we use
|
||||
foreach(LIB_TARGET ${PARQUET_LIBRARIES})
|
||||
target_compile_definitions(${LIB_TARGET}
|
||||
@@ -232,8 +239,6 @@ foreach(LIB_TARGET ${PARQUET_LIBRARIES})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
add_dependencies(parquet ${PARQUET_LIBRARIES})
|
||||
|
||||
add_subdirectory(api)
|
||||
add_subdirectory(arrow)
|
||||
add_subdirectory(util)
|
||||
@@ -271,7 +276,9 @@ ADD_PARQUET_TEST(schema-test USE_STATIC_LINKING)
|
||||
|
||||
ADD_ARROW_BENCHMARK(column-io-benchmark
|
||||
PREFIX "parquet"
|
||||
LABELS "parquet-benchmarks"
|
||||
EXTRA_LINK_LIBS ${PARQUET_BENCHMARK_LINK_LIBRARIES})
|
||||
ADD_ARROW_BENCHMARK(encoding-benchmark
|
||||
PREFIX "parquet"
|
||||
LABELS "parquet-benchmarks"
|
||||
EXTRA_LINK_LIBS ${PARQUET_BENCHMARK_LINK_LIBRARIES})
|
||||
@@ -20,9 +20,7 @@ ADD_PARQUET_TEST(arrow-reader-writer-test)
|
||||
|
||||
ADD_BENCHMARK(reader-writer-benchmark
|
||||
PREFIX "parquet-arrow"
|
||||
LABELS "parquet-benchmarks"
|
||||
EXTRA_LINK_LIBS ${PARQUET_BENCHMARK_LINK_LIBRARIES})
|
||||
if (TARGET parquet-arrow-reader-writer-benchmark)
|
||||
add_dependencies(parquet parquet-arrow-reader-writer-benchmark)
|
||||
endif()
|
||||
|
||||
ARROW_INSTALL_ALL_HEADERS("parquet/arrow")
|
||||
@@ -15,7 +15,11 @@
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
add_custom_target(plasma-all)
|
||||
add_custom_target(plasma)
|
||||
add_custom_target(plasma-benchmarks)
|
||||
add_custom_target(plasma-tests)
|
||||
add_dependencies(plasma-all plasma plasma-tests plasma-benchmarks)
|
||||
|
||||
# For the moment, Plasma is versioned like Arrow
|
||||
project(plasma VERSION "${ARROW_BASE_VERSION}")
|
||||
@@ -199,7 +203,7 @@ function(ADD_PLASMA_TEST REL_TEST_NAME)
|
||||
cmake_parse_arguments(ARG "${options}" "${one_value_args}" "${multi_value_args}" ${ARGN})
|
||||
ADD_TEST_CASE(${REL_TEST_NAME}
|
||||
PREFIX "plasma"
|
||||
LABELS "unittest;plasma"
|
||||
LABELS "plasma-tests"
|
||||
${ARG_UNPARSED_ARGUMENTS})
|
||||
endfunction()
|
||||
|
||||
|
||||
Reference in new issue
Block a user