quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zu...@apache.org
Subject [52/52] incubator-quickstep git commit: Downgraded gflags to 2.1.2 for the distributed version.
Date Sun, 29 Jan 2017 02:08:26 GMT
Downgraded gflags to 2.1.2 for the distributed version.


Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/66178d7e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/66178d7e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/66178d7e

Branch: refs/heads/master
Commit: 66178d7e11543b0d4bac59481e4b7dfee034acd6
Parents: 9661f95
Author: Zuyu Zhang <zuyuz@apache.org>
Authored: Sat Jan 28 14:22:13 2017 -0800
Committer: Zuyu Zhang <zuyuz@apache.org>
Committed: Sat Jan 28 15:47:56 2017 -0800

----------------------------------------------------------------------
 CMakeLists.txt                                  | 10 ++---
 third_party/download_and_patch_prerequisites.sh | 44 +++++++++++---------
 third_party/patches/gflags/CMakeLists.patch     | 21 ++++++++++
 3 files changed, 51 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/66178d7e/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 46eaf2f..ccb23a3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -142,7 +142,11 @@ endif()
 option(ENABLE_DISTRIBUTED "Use the distributed version of Quickstep" OFF)
 
 macro (set_gflags_lib_name)
-  set(GFLAGS_LIB_NAME gflags)
+  if (BUILD_SHARED_LIBS)
+    set(GFLAGS_LIB_NAME gflags_nothreads-shared)
+  else()
+    set(GFLAGS_LIB_NAME gflags_nothreads-static)
+  endif()
 endmacro (set_gflags_lib_name)
 
 set_gflags_lib_name ()
@@ -679,10 +683,6 @@ endif()
 # Add required cmake-controlled third-party libraries (farmhash, gflags, glog, and re2).
 add_subdirectory ("${THIRD_PARTY_SOURCE_DIR}/farmhash" "${CMAKE_CURRENT_BINARY_DIR}/third_party/farmhash")
 
-set (GFLAGS_BUILD_TESTING OFF)
-set (GFLAGS_NC_TESTS OFF)
-set (GFLAGS_CONFIG_TESTS OFF)
-set (GFLAGS_BUILD_STATIC_LIBS OFF)
 add_subdirectory ("${THIRD_PARTY_SOURCE_DIR}/gflags" "${CMAKE_CURRENT_BINARY_DIR}/third_party/gflags")
 include_directories("${CMAKE_CURRENT_BINARY_DIR}/third_party/gflags/include")
 

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/66178d7e/third_party/download_and_patch_prerequisites.sh
----------------------------------------------------------------------
diff --git a/third_party/download_and_patch_prerequisites.sh b/third_party/download_and_patch_prerequisites.sh
index e63db23..b5f5cac 100755
--- a/third_party/download_and_patch_prerequisites.sh
+++ b/third_party/download_and_patch_prerequisites.sh
@@ -1,4 +1,4 @@
-#!/bin/bash 
+#!/bin/bash
 
 # Check if the prerequisite bash programs exist on the system.
 for cmd in curl tar; do
@@ -7,7 +7,7 @@ for cmd in curl tar; do
     echo ""
     echo "ERROR: Program ${cmd} is not installed on the system."
     exit 1
-  else 
+  else
     echo "ok"
   fi
 done
@@ -18,8 +18,8 @@ if [ "${PWD##*/}" != "third_party" ]; then
   exit 1
 fi
 
-THIRD_PARTY_SRC_DIR=${THIRD_PARTY_DIR}/src 
-if [ ! -d "$THIRD_PARTY_SRC_DIR" ]; then  
+THIRD_PARTY_SRC_DIR=${THIRD_PARTY_DIR}/src
+if [ ! -d "$THIRD_PARTY_SRC_DIR" ]; then
   mkdir -p ${THIRD_PARTY_SRC_DIR}
 fi
 
@@ -33,25 +33,25 @@ third_party_dir_names=("benchmark"
                        "re2"
                        "gperftools"
                        )
-                       
+
 third_party_lib_urls=("https://github.com/google/benchmark/archive/v1.1.0.tar.gz"
-                      "https://github.com/gflags/gflags/archive/v2.2.0.tar.gz"
+                      "https://github.com/gflags/gflags/archive/v2.1.2.tar.gz"
                       "https://github.com/google/googletest/archive/release-1.8.0.tar.gz"
                       "https://github.com/antirez/linenoise/archive/1.0.tar.gz"
                       "https://github.com/google/re2/archive/2017-01-01.tar.gz"
                       "https://github.com/gperftools/gperftools/releases/download/gperftools-2.5/gperftools-2.5.tar.gz"
                       )
-                      
+
 downloaded_archive_names=("v1.1.0.tar.gz"
-                          "v2.2.0.tar.gz"
-                          "release-1.8.0.tar.gz"                          
+                          "v2.1.2.tar.gz"
+                          "release-1.8.0.tar.gz"
                           "1.0.tar.gz"
                           "2017-01-01.tar.gz"
                           "gperftools-2.5.tar.gz"
                           )
-                          
+
 tar_options=("-xzf"
-             "-xzf" 
+             "-xzf"
              "-xzf"
              "-xzf"
              "-xzf"
@@ -65,33 +65,39 @@ do
     mkdir ${third_party_dir_names[lib_index]}
   fi
 
-  # Downaload the compressed archive for the third party library. 
+  # Downaload the compressed archive for the third party library.
   curl_cmd="curl -L -O ${third_party_lib_urls[lib_index]}"
-  echo "Downloading from ${third_party_lib_urls[lib_index]} ..."  
+  echo "Downloading from ${third_party_lib_urls[lib_index]} ..."
   echo ${curl_cmd}
   eval ${curl_cmd}
   if [ -f ${downloaded_archive_names[lib_index]} ]; then
     echo "File ${downloaded_archive_names[lib_index]} downloaded successfully"
 
-    # Uncompress the archive to its designated directory. 
+    # Uncompress the archive to its designated directory.
     # The strip-components option will ensure that all the files directly end up
-    # in the desired directory, without any intermediate hierarchy level. 
+    # in the desired directory, without any intermediate hierarchy level.
     tar_cmd="tar ${tar_options[lib_index]} ${downloaded_archive_names[lib_index]} -C ${third_party_dir_names[lib_index]}
--strip-components=1"
     echo ${tar_cmd}
     echo "Extracting from ${downloaded_archive_names[lib_index]} ..."
     eval ${tar_cmd}
 
-    # Delete the compressed archive. 
+    # Delete the compressed archive.
     rm -rf ${downloaded_archive_names[lib_index]}
   else
     echo "Error downloading file ${downloaded_archive_names[lib_index]} from ${third_party_lib_urls[lib_index]}"
   fi
 done
 
-# Apply patches now. 
+# Apply patches now.
 cp ${PATCH_DIR}/linenoise/CMakeLists.txt ${THIRD_PARTY_SRC_DIR}/linenoise
 
-# Apply re2 patch. 
+# Apply gflags patch.
+echo "Patching for gflags:"
+cd ${THIRD_PARTY_SRC_DIR}/gflags
+patch -p0 < ${PATCH_DIR}/gflags/CMakeLists.patch
+cd ${THIRD_PARTY_SRC_DIR}
+
+# Apply re2 patch.
 cd ${THIRD_PARTY_SRC_DIR}/re2
 patch -p0 < ${PATCH_DIR}/re2/re2CMake.patch
 cd ${THIRD_PARTY_SRC_DIR}
@@ -102,5 +108,5 @@ patch -p0 < ${PATCH_DIR}/benchmark/benchmarkCMake.patch
 cd ${THIRD_PARTY_SRC_DIR}/benchmark/src
 patch -p0 < ${PATCH_DIR}/benchmark/benchmarkSrcCMakeLists.patch
 
-# Back to the third_party directory. 
+# Back to the third_party directory.
 cd ${THIRD_PARTY_DIR}

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/66178d7e/third_party/patches/gflags/CMakeLists.patch
----------------------------------------------------------------------
diff --git a/third_party/patches/gflags/CMakeLists.patch b/third_party/patches/gflags/CMakeLists.patch
new file mode 100644
index 0000000..5f7fa43
--- /dev/null
+++ b/third_party/patches/gflags/CMakeLists.patch
@@ -0,0 +1,21 @@
+--- CMakeLists.txt	2017-01-28 12:35:08.000000000 -0800
++++ CMakeLists.txt.new	2017-01-28 15:30:07.000000000 -0800
+@@ -206,6 +206,18 @@
+                        "\nor disable the build of the multi-threaded gflags library (BUILD_gflags_LIB=OFF).")
+ endif ()
+ 
++if(CMAKE_COMPILER_IS_GNUCXX)
++  CHECK_CXX_COMPILER_FLAG("-Wno-unused-local-typedefs" COMPILER_HAS_WNO_UNUSED_LOCAL_TYPEDEFS)
++  if (COMPILER_HAS_WNO_UNUSED_LOCAL_TYPEDEFS)
++    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs")
++  endif (COMPILER_HAS_WNO_UNUSED_LOCAL_TYPEDEFS)
++elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
++  CHECK_CXX_COMPILER_FLAG("-Wno-unused-local-typedef" COMPILER_HAS_WNO_UNUSED_LOCAL_TYPEDEF)
++  if (COMPILER_HAS_WNO_UNUSED_LOCAL_TYPEDEF)
++    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedef")
++  endif (COMPILER_HAS_WNO_UNUSED_LOCAL_TYPEDEF)
++endif ()
++
+ # ----------------------------------------------------------------------------
+ # source files - excluding root subdirectory and/or .in suffix
+ set (PUBLIC_HDRS


Mime
View raw message