parquet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject parquet-cpp git commit: PARQUET-849: Upgrade to Thrift 0.10 in thirdparty toolchain, build Thrift in Travis CI on OS X
Date Tue, 21 Feb 2017 21:53:40 GMT
Repository: parquet-cpp
Updated Branches:
  refs/heads/master 5d408fe45 -> bc5c945ce


PARQUET-849: Upgrade to Thrift 0.10 in thirdparty toolchain, build Thrift in Travis CI on
OS X

Closes #251.

Also resolves PARQUET-871 by adding `-DPARQUET_CXXFLAGS=...` option

Author: Julien Lafaye <jlafaye@gmail.com>
Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes #255 from wesm/PARQUET-849 and squashes the following commits:

dd54a43 [Wes McKinney] Add PARQUET_CXXFLAGS cmake option
89034c5 [Wes McKinney] Fix typo in cmake args
f6df56d [Wes McKinney] Only install boost in OS X
60b4433 [Julien Lafaye] BUILD_BYPRODUCTS not available on older releases of cmake
20f5c02 [Julien Lafaye] Thrift can now be used as a vendored module on MACOS
ed68cb3 [Julien Lafaye] Remove cmake flags not used by thrift CMakeLists.txt
5d0b1c5 [Julien Lafaye] Build thrift-0.10.0 with cmake
154b672 [Julien Lafaye] Upgrade thrift revision number to 0.10.0


Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/bc5c945c
Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/bc5c945c
Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/bc5c945c

Branch: refs/heads/master
Commit: bc5c945ceacb6f1796e2296ce70e72349e09c824
Parents: 5d408fe
Author: Julien Lafaye <jlafaye@gmail.com>
Authored: Tue Feb 21 16:53:32 2017 -0500
Committer: Wes McKinney <wes.mckinney@twosigma.com>
Committed: Tue Feb 21 16:53:32 2017 -0500

----------------------------------------------------------------------
 CMakeLists.txt                          |  4 ++-
 ci/before_script_travis.sh              |  6 ++--
 cmake_modules/ThirdpartyToolchain.cmake | 43 ++++++++++++++--------------
 3 files changed, 28 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/bc5c945c/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bb24c14..8edebc9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,6 +70,8 @@ if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
     ON)
   set(PARQUET_ARROW_LINKAGE "shared" CACHE STRING
     "Libraries to link for Apache Arrow. static|shared (default shared)")
+  set(PARQUET_CXXFLAGS "" CACHE STRING
+    "Compiler flags to use when compiling Parquet")
   option(PARQUET_USE_SSE
     "Build with SSE4 optimizations"
     OFF)
@@ -333,7 +335,7 @@ endif ()
 
 message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
 
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -fno-strict-aliasing")
+SET(CMAKE_CXX_FLAGS "${PARQUET_CXXFLAGS} ${CMAKE_CXX_FLAGS} -std=c++11 -Wall -fno-strict-aliasing")
 
 if (PARQUET_USE_SSE)
   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/bc5c945c/ci/before_script_travis.sh
----------------------------------------------------------------------
diff --git a/ci/before_script_travis.sh b/ci/before_script_travis.sh
index 2bd880b..374f7c6 100755
--- a/ci/before_script_travis.sh
+++ b/ci/before_script_travis.sh
@@ -14,7 +14,7 @@
 
 if [ $TRAVIS_OS_NAME == "osx" ]; then
   brew update > /dev/null
-  brew install thrift
+  brew install boost
 else
   # Use a C++11 compiler on Linux
   export CC="gcc-4.9"
@@ -24,7 +24,7 @@ fi
 export PARQUET_TEST_DATA=$TRAVIS_BUILD_DIR/data
 
 if [ $TRAVIS_OS_NAME == "linux" ]; then
-    cmake -DCMAKE_CXX_FLAGS="-Werror" \
+    cmake -DPARQUET_CXXFLAGS=-Werror \
           -DPARQUET_TEST_MEMCHECK=ON \
           -DPARQUET_BUILD_BENCHMARKS=ON \
           -DPARQUET_ARROW=ON \
@@ -32,7 +32,7 @@ if [ $TRAVIS_OS_NAME == "linux" ]; then
           -DPARQUET_GENERATE_COVERAGE=1 \
           $TRAVIS_BUILD_DIR
 else
-    cmake -DCMAKE_CXX_FLAGS="-Werror" \
+    cmake -DPARQUET_CXXFLAGS=-Werror \
           -DPARQUET_ARROW=ON \
           -DPARQUET_ARROW_LINKAGE=static \
           $TRAVIS_BUILD_DIR

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/bc5c945c/cmake_modules/ThirdpartyToolchain.cmake
----------------------------------------------------------------------
diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake
index cebec75..ab25199 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -18,7 +18,7 @@
 set(GTEST_VERSION "1.7.0")
 set(GBENCHMARK_VERSION "1.0.0")
 set(SNAPPY_VERSION "1.1.3")
-set(THRIFT_VERSION "0.9.1")
+set(THRIFT_VERSION "0.10.0")
 
 # Brotli 0.5.2 does not install headers/libraries yet, but 0.6.0.dev does
 set(BROTLI_VERSION "5db62dcc9d386579609540cdf8869e95ad334bbd")
@@ -64,41 +64,42 @@ set(EP_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${UPPERCASE_BUILD_TYPE}}
-fPIC"
 find_package(Thrift)
 
 if (NOT THRIFT_FOUND)
-  if (APPLE)
-      message(FATAL_ERROR "thrift compilation under OSX is not currently supported.")
-  endif()
 
   set(THRIFT_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/thrift_ep/src/thrift_ep-install")
   set(THRIFT_HOME "${THRIFT_PREFIX}")
   set(THRIFT_INCLUDE_DIR "${THRIFT_PREFIX}/include")
-  set(THRIFT_STATIC_LIB "${THRIFT_PREFIX}/lib/libthrift.a")
+  IF (${UPPERCASE_BUILD_TYPE} STREQUAL "DEBUG")
+    set(THRIFT_STATIC_LIB "${THRIFT_PREFIX}/lib/libthriftd.a")
+  ELSE()
+    set(THRIFT_STATIC_LIB "${THRIFT_PREFIX}/lib/libthrift.a")
+  ENDIF()
   set(THRIFT_COMPILER "${THRIFT_PREFIX}/bin/thrift")
   set(THRIFT_VENDORED 1)
-  set(THRIFT_CONFIGURE_COMMAND
-      ./configure "CFLAGS=${EP_C_FLAGS}" "CXXFLAGS=${EP_CXX_FLAGS}" --without-qt4 --without-c_glib
--without-csharp --without-java --without-erlang --without-nodejs --without-lua --without-python
--without-perl --without-php --without-php_extension --without-ruby --without-haskell --without-go
--without-d --with-cpp "--prefix=${THRIFT_PREFIX}")
+  set(THRIFT_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+                        "-DCMAKE_CXX_FLAGS=${EP_CXX_FLAGS}"
+                        "-DCMAKE_C_FLAGS=${EP_C_FLAGS}"
+                        "-DCMAKE_INSTALL_PREFIX=${THRIFT_PREFIX}"
+                        "-DCMAKE_INSTALL_RPATH=${THRIFT_PREFIX}/lib"
+                        "-DBUILD_SHARED_LIBS=OFF"
+                        "-DBUILD_TESTING=OFF"
+                        "-DWITH_QT4=OFF"
+                        "-DWITH_C_GLIB=OFF"
+                        "-DWITH_JAVA=OFF"
+                        "-DWITH_PYTHON=OFF"
+                        "-DWITH_CPP=ON"
+                        "-DWITH_STATIC_LIB=ON"
+                        )
 
   if (CMAKE_VERSION VERSION_GREATER "3.2")
     # BUILD_BYPRODUCTS is a 3.2+ feature
     ExternalProject_Add(thrift_ep
-      CONFIGURE_COMMAND ${THRIFT_CONFIGURE_COMMAND}
-      BUILD_IN_SOURCE 1
-      # This is needed for 0.9.1 and can be removed for 0.9.3 again
-      BUILD_COMMAND make clean
-      INSTALL_COMMAND make install
-      INSTALL_DIR ${THRIFT_PREFIX}
       URL "http://archive.apache.org/dist/thrift/${THRIFT_VERSION}/thrift-${THRIFT_VERSION}.tar.gz"
       BUILD_BYPRODUCTS "${THRIFT_STATIC_LIB}" "${THRIFT_COMPILER}"
-      )
+      CMAKE_ARGS ${THRIFT_CMAKE_ARGS})
   else()
     ExternalProject_Add(thrift_ep
-      CONFIGURE_COMMAND ${THRIFT_CONFIGURE_COMMAND}
-      BUILD_IN_SOURCE 1
-      # This is needed for 0.9.1 and can be removed for 0.9.3 again
-      BUILD_COMMAND make clean
-      INSTALL_COMMAND make install
-      INSTALL_DIR ${THRIFT_PREFIX}
       URL "http://archive.apache.org/dist/thrift/${THRIFT_VERSION}/thrift-${THRIFT_VERSION}.tar.gz"
-      )
+      CMAKE_ARGS ${THRIFT_CMAKE_ARGS})
   endif()
     set(THRIFT_VENDORED 1)
 else()


Mime
View raw message