Repository: arrow Updated Branches: refs/heads/master 68b80a838 -> 6968ec01d
ARROW-199: [C++] Refine third party dependency To generate makefile, run download_thirdparty.sh and build_thirdparty.sh is not enough source setup_build_env.sh is necessary since FLATBUFFERS_HOME must be set . Author: hzhang2 <zhanghuan...@163.com> Closes #75 from zhangh43/arrow2 and squashes the following commits: ea3101b [hzhang2] remove CMAKE_SKIP_INSTALL_ALL_DEPENDENCY for target install and fix typo 8c02a38 [hzhang2] ARROW-199: [C++] Refine third party dependency b2312e0 [hzhang2] ARROW-199: [C++] Refine third party dependency fefc314 [hzhang2] FLATBUFFERS_HOME must be set before cmake Project: http://git-wip-us.apache.org/repos/asf/arrow/repo Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/6968ec01 Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/6968ec01 Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/6968ec01 Branch: refs/heads/master Commit: 6968ec01d722584e9561dc3c0438bce29c664b5a Parents: 68b80a8 Author: hzhang2 <zhanghuan...@163.com> Authored: Sat May 14 19:07:44 2016 -0700 Committer: Wes McKinney <w...@apache.org> Committed: Sat May 14 19:07:44 2016 -0700 ---------------------------------------------------------------------- cpp/CMakeLists.txt | 5 ----- cpp/README.md | 1 + cpp/setup_build_env.sh | 6 +----- cpp/thirdparty/set_thirdparty_env.sh | 12 ++++++++++++ 4 files changed, 14 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/arrow/blob/6968ec01/cpp/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index b38f91e..a3fb010 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -25,11 +25,6 @@ include(CMakeParseArguments) set(BUILD_SUPPORT_DIR "${CMAKE_SOURCE_DIR}/build-support") set(THIRDPARTY_DIR "${CMAKE_SOURCE_DIR}/thirdparty") -# Allow "make install" to not depend on all targets. -# -# Must be declared in the top-level CMakeLists.txt. -set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY true) - find_package(ClangTools) if ("$ENV{CMAKE_EXPORT_COMPILE_COMMANDS}" STREQUAL "1" OR CLANG_TIDY_FOUND) # Generate a Clang compile_commands.json "compilation database" file for use http://git-wip-us.apache.org/repos/asf/arrow/blob/6968ec01/cpp/README.md ---------------------------------------------------------------------- diff --git a/cpp/README.md b/cpp/README.md index c8cd86f..129c5f1 100644 --- a/cpp/README.md +++ b/cpp/README.md @@ -13,6 +13,7 @@ To build the thirdparty build dependencies, run: ``` ./thirdparty/download_thirdparty.sh ./thirdparty/build_thirdparty.sh +source ./thirdparty/set_thirdparty_env.sh ``` You can also run from the root of the C++ tree http://git-wip-us.apache.org/repos/asf/arrow/blob/6968ec01/cpp/setup_build_env.sh ---------------------------------------------------------------------- diff --git a/cpp/setup_build_env.sh b/cpp/setup_build_env.sh index 6520dbd..fa779fd 100755 --- a/cpp/setup_build_env.sh +++ b/cpp/setup_build_env.sh @@ -4,10 +4,6 @@ SOURCE_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd) ./thirdparty/download_thirdparty.sh || { echo "download_thirdparty.sh failed" ; return; } ./thirdparty/build_thirdparty.sh || { echo "build_thirdparty.sh failed" ; return; } -source thirdparty/versions.sh - -export GTEST_HOME=$SOURCE_DIR/thirdparty/$GTEST_BASEDIR -export GBENCHMARK_HOME=$SOURCE_DIR/thirdparty/installed -export FLATBUFFERS_HOME=$SOURCE_DIR/thirdparty/installed +source ./thirdparty/set_thirdparty_env.sh || { echo "source set_thirdparty_env.sh failed" ; return; } echo "Build env initialized" http://git-wip-us.apache.org/repos/asf/arrow/blob/6968ec01/cpp/thirdparty/set_thirdparty_env.sh ---------------------------------------------------------------------- diff --git a/cpp/thirdparty/set_thirdparty_env.sh b/cpp/thirdparty/set_thirdparty_env.sh new file mode 100755 index 0000000..7e9531c --- /dev/null +++ b/cpp/thirdparty/set_thirdparty_env.sh @@ -0,0 +1,12 @@ +#!/usr/bash + +SOURCE_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd) +source $SOURCE_DIR/versions.sh + +if [ -z "$THIRDPARTY_DIR" ]; then + THIRDPARTY_DIR=$SOURCE_DIR +fi + +export GTEST_HOME=$THIRDPARTY_DIR/$GTEST_BASEDIR +export GBENCHMARK_HOME=$THIRDPARTY_DIR/installed +export FLATBUFFERS_HOME=$THIRDPARTY_DIR/installed