parquet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject parquet-cpp git commit: PARQUET-868: Build snappy with optimizations
Date Wed, 08 Feb 2017 08:34:31 GMT
Repository: parquet-cpp
Updated Branches:
  refs/heads/master 98c5ddaf6 -> 7a7234276


PARQUET-868: Build snappy with optimizations

Author: Uwe L. Korn <uwelk@xhochy.com>

Closes #237 from xhochy/PARQUET-868 and squashes the following commits:

90a296f [Uwe L. Korn] PARQUET-868: Build snappy with optimizations


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

Branch: refs/heads/master
Commit: 7a7234276e1b562a29c6f57392bb44571bbd8193
Parents: 98c5dda
Author: Uwe L. Korn <uwelk@xhochy.com>
Authored: Wed Feb 8 09:34:16 2017 +0100
Committer: Uwe L. Korn <uwelk@xhochy.com>
Committed: Wed Feb 8 09:34:16 2017 +0100

----------------------------------------------------------------------
 cmake_modules/ThirdpartyToolchain.cmake | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/7a723427/cmake_modules/ThirdpartyToolchain.cmake
----------------------------------------------------------------------
diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake
index aa83d4b..edccc3a 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -103,10 +103,18 @@ if (NOT SNAPPY_FOUND)
   set(SNAPPY_STATIC_LIB "${SNAPPY_PREFIX}/lib/libsnappy.a")
   set(SNAPPY_VENDORED 1)
 
+  if (${UPPERCASE_BUILD_TYPE} EQUAL "RELEASE")
+    if (APPLE)
+      set(SNAPPY_CXXFLAGS "CXXFLAGS='-DNDEBUG -O1'")
+    else()
+      set(SNAPPY_CXXFLAGS "CXXFLAGS='-DNDEBUG -O2'")
+    endif()
+  endif()
+
   if (CMAKE_VERSION VERSION_GREATER "3.2")
     # BUILD_BYPRODUCTS is a 3.2+ feature
     ExternalProject_Add(snappy_ep
-      CONFIGURE_COMMAND ./configure --with-pic "--prefix=${SNAPPY_PREFIX}"
+      CONFIGURE_COMMAND ./configure --with-pic "--prefix=${SNAPPY_PREFIX}" ${SNAPPY_CXXFLAGS}
       BUILD_IN_SOURCE 1
       BUILD_COMMAND ${MAKE}
       INSTALL_DIR ${SNAPPY_PREFIX}
@@ -115,7 +123,7 @@ if (NOT SNAPPY_FOUND)
       )
   else()
     ExternalProject_Add(snappy_ep
-      CONFIGURE_COMMAND ./configure --with-pic "--prefix=${SNAPPY_PREFIX}"
+      CONFIGURE_COMMAND ./configure --with-pic "--prefix=${SNAPPY_PREFIX}" ${SNAPPY_CXXFLAGS}
       BUILD_IN_SOURCE 1
       BUILD_COMMAND ${MAKE}
       INSTALL_DIR ${SNAPPY_PREFIX}


Mime
View raw message