From fefc31412da2f3ffc273e542c0993c0caafd2012 Mon Sep 17 00:00:00 2001 From: hzhang2 Date: Thu, 12 May 2016 10:17:05 +0800 Subject: [PATCH 1/4] FLATBUFFERS_HOME must be set before cmake --- cpp/README.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/cpp/README.md b/cpp/README.md index c8cd86fedc6..92a1f3de188 100644 --- a/cpp/README.md +++ b/cpp/README.md @@ -8,14 +8,7 @@ out-of-source builds with the latter one being preferred. Arrow requires a C++11-enabled compiler. On Linux, gcc 4.8 and higher should be sufficient. -To build the thirdparty build dependencies, run: - -``` -./thirdparty/download_thirdparty.sh -./thirdparty/build_thirdparty.sh -``` - -You can also run from the root of the C++ tree +To build the thirdparty build dependencies, run from the root of the C++ tree ``` source setup_build_env.sh From b2312e0b35821b90a828704a3d6de03db3b6dae1 Mon Sep 17 00:00:00 2001 From: hzhang2 Date: Fri, 13 May 2016 18:33:07 +0800 Subject: [PATCH 2/4] ARROW-199: [C++] Refine third party dependency --- cpp/README.md | 10 +++++++++- cpp/thirdparty/set_thirdparty_env.sh | 12 ++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100755 cpp/thirdparty/set_thirdparty_env.sh diff --git a/cpp/README.md b/cpp/README.md index 92a1f3de188..129c5f15b15 100644 --- a/cpp/README.md +++ b/cpp/README.md @@ -8,7 +8,15 @@ out-of-source builds with the latter one being preferred. Arrow requires a C++11-enabled compiler. On Linux, gcc 4.8 and higher should be sufficient. -To build the thirdparty build dependencies, run from the root of the C++ tree +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 ``` source setup_build_env.sh diff --git a/cpp/thirdparty/set_thirdparty_env.sh b/cpp/thirdparty/set_thirdparty_env.sh new file mode 100755 index 00000000000..7e9531cd508 --- /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 From 8c02a387d7d144ff6bdb20c28930ee315eb29d65 Mon Sep 17 00:00:00 2001 From: hzhang2 Date: Sat, 14 May 2016 08:43:04 +0800 Subject: [PATCH 3/4] ARROW-199: [C++] Refine third party dependency --- cpp/setup_build_env.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cpp/setup_build_env.sh b/cpp/setup_build_env.sh index 6520dbd43f7..ec950fa8197 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 "build_thirdparty.sh failed" ; return; } echo "Build env initialized" From ea3101b8f113202043dded7b4b02469ddf4b2ad6 Mon Sep 17 00:00:00 2001 From: hzhang2 Date: Sun, 15 May 2016 09:27:18 +0800 Subject: [PATCH 4/4] remove CMAKE_SKIP_INSTALL_ALL_DEPENDENCY for target install and fix typo --- cpp/CMakeLists.txt | 5 ----- cpp/setup_build_env.sh | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index b38f91e5d68..a3fb01076d4 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 diff --git a/cpp/setup_build_env.sh b/cpp/setup_build_env.sh index ec950fa8197..fa779fdd5c2 100755 --- a/cpp/setup_build_env.sh +++ b/cpp/setup_build_env.sh @@ -4,6 +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/set_thirdparty_env.sh || { echo "build_thirdparty.sh failed" ; return; } +source ./thirdparty/set_thirdparty_env.sh || { echo "source set_thirdparty_env.sh failed" ; return; } echo "Build env initialized"