You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2018/12/19 00:56:33 UTC

[arrow] branch master updated: ARROW-4070: [C++] Enable use of ARROW_BOOST_VENDORED with ninja-build

This is an automated email from the ASF dual-hosted git repository.

wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new bfa7f11  ARROW-4070: [C++] Enable use of ARROW_BOOST_VENDORED with ninja-build
bfa7f11 is described below

commit bfa7f11cffa58dcf44f7e1278846e373e63d1dfe
Author: Wes McKinney <we...@apache.org>
AuthorDate: Tue Dec 18 18:56:24 2018 -0600

    ARROW-4070: [C++] Enable use of ARROW_BOOST_VENDORED with ninja-build
    
    It seems that ninja-build is a lot stricter about the dependency graph -- it seeks the root dependency of the `boost_*_static` libraries and finds targets (the absolute paths to the static libraries) that it doesn't know how to build. Setting these as the BUILD_BYPRODUCTS of the ExternalProject fixes the issue.
    
    I need this fix in ARROW-3803 so I'm going to cherry pick it there, and I can rebase later
    
    Author: Wes McKinney <we...@apache.org>
    
    Closes #3217 from wesm/ARROW-4070 and squashes the following commits:
    
    aac135daa <Wes McKinney> Use static library paths as BOOST_BUILD_PRODUCTS so that ninja-build can understand the dependency graph
---
 cpp/CMakeLists.txt                          | 3 ++-
 cpp/cmake_modules/ThirdpartyToolchain.cmake | 7 ++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 60cbe85..1672245 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -239,7 +239,8 @@ static|shared (default shared)")
     ON)
 
   option(ARROW_BOOST_VENDORED
-    "Use vendored Boost instead of existing Boost"
+    "Use vendored Boost instead of existing Boost. \
+Note that this requires linking Boost statically"
     OFF)
 
   option(ARROW_PROTOBUF_USE_SHARED
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index d493de7..db0b69b 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -369,15 +369,16 @@ if (ARROW_BOOST_VENDORED)
   set(BOOST_SYSTEM_LIBRARY boost_system_static)
   set(BOOST_FILESYSTEM_LIBRARY boost_filesystem_static)
   set(BOOST_REGEX_LIBRARY boost_regex_static)
+
   if (ARROW_BOOST_HEADER_ONLY)
     set(BOOST_BUILD_PRODUCTS)
     set(BOOST_CONFIGURE_COMMAND "")
     set(BOOST_BUILD_COMMAND "")
   else()
     set(BOOST_BUILD_PRODUCTS
-      ${BOOST_SYSTEM_LIBRARY}
-      ${BOOST_FILESYSTEM_LIBRARY}
-      ${BOOST_REGEX_LIBRARY})
+      ${BOOST_STATIC_SYSTEM_LIBRARY}
+      ${BOOST_STATIC_FILESYSTEM_LIBRARY}
+      ${BOOST_STATIC_REGEX_LIBRARY})
     set(BOOST_CONFIGURE_COMMAND
       "./bootstrap.sh"
       "--prefix=${BOOST_PREFIX}"