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/11/15 13:34:33 UTC

[arrow] branch master updated: ARROW-3754: [C++] Enable Zstandard by default only when CMake is 3.7 or later

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 d5cfabf  ARROW-3754: [C++] Enable Zstandard by default only when CMake is 3.7 or later
d5cfabf is described below

commit d5cfabf6bfa064e9e12ad892f510c0ca2556632e
Author: Kouhei Sutou <ko...@clear-code.com>
AuthorDate: Thu Nov 15 08:34:26 2018 -0500

    ARROW-3754: [C++] Enable Zstandard by default only when CMake is 3.7 or later
    
    ExternalProject_Add(SOURCE_SUBDIR) is available since CMake 3.7.
    
    Author: Kouhei Sutou <ko...@clear-code.com>
    
    Closes #2970 from kou/cpp-zstd and squashes the following commits:
    
    b3d9646ab <Kouhei Sutou>  Enable Zstandard by default only when CMake is 3.7 or later
---
 cpp/CMakeLists.txt                          | 8 +++++++-
 cpp/cmake_modules/ThirdpartyToolchain.cmake | 1 +
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 997421c..72edd2f 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -248,9 +248,15 @@ Pass multiple labels by dividing with semicolons")
     "Build with zlib compression"
     ON)
 
+  if(CMAKE_VERSION VERSION_LESS 3.7)
+    set(ARROW_WITH_ZSTD_DEFAULT OFF)
+  else()
+    # ExternalProject_Add(SOURCE_SUBDIR) is available since CMake 3.7.
+    set(ARROW_WITH_ZSTD_DEFAULT ON)
+  endif()
   option(ARROW_WITH_ZSTD
     "Build with zstd compression"
-    ON)
+    ${ARROW_WITH_ZSTD_DEFAULT})
 
   option(ARROW_GENERATE_COVERAGE
     "Build with C++ code coverage enabled"
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index 76a65b7..224ea1c 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -1069,6 +1069,7 @@ if (ARROW_WITH_ZSTD)
     set(ZSTD_CMAKE_ARGS
         "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
         "-DCMAKE_INSTALL_PREFIX=${ZSTD_PREFIX}"
+        "-DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}"
         "-DZSTD_BUILD_PROGRAMS=off"
         "-DZSTD_BUILD_SHARED=off"
         "-DZSTD_BUILD_STATIC=on"