impala-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From he...@apache.org
Subject [4/4] incubator-impala git commit: IMPALA-4651: Add LibEv to build
Date Thu, 12 Jan 2017 23:46:55 GMT
IMPALA-4651: Add LibEv to build

Add libev 4.20 to the Impala build. This is a dependency of KRPC.

FindLibEv.cmake was taken from Apache Kudu.

Change-Id: Iaf0646533592e6a8cd929a8cb015b83a7ea3008f
Reviewed-on: http://gerrit.cloudera.org:8080/5659
Tested-by: Impala Public Jenkins
Reviewed-by: Henry Robinson <henry@cloudera.com>


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

Branch: refs/heads/master
Commit: a81ad5eaab8a088e1fc1429449a1c15b029cffdb
Parents: 5466512
Author: Henry Robinson <henry@cloudera.com>
Authored: Tue Nov 8 13:54:55 2016 -0800
Committer: Henry Robinson <henry@cloudera.com>
Committed: Thu Jan 12 23:44:26 2017 +0000

----------------------------------------------------------------------
 CMakeLists.txt                |  6 ++++++
 bin/bootstrap_toolchain.py    |  6 +++---
 bin/impala-config.sh          |  1 +
 cmake_modules/FindLibEv.cmake | 41 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 51 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/a81ad5ea/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 18be5d4..e0339d6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -77,6 +77,7 @@ set_dep_root(GFLAGS)
 set_dep_root(GLOG)
 set_dep_root(GPERFTOOLS)
 set_dep_root(GTEST)
+set_dep_root(LIBEV)
 set_dep_root(LLVM)
 set(LLVM_DEBUG_ROOT $ENV{IMPALA_TOOLCHAIN}/llvm-$ENV{IMPALA_LLVM_DEBUG_VERSION})
 set_dep_root(LZ4)
@@ -310,6 +311,11 @@ ADD_THIRDPARTY_LIB(protoc
   STATIC_LIB "${PROTOBUF_PROTOC_STATIC_LIBRARY}"
   DEPS protobuf)
 
+find_package(LibEv REQUIRED)
+include_directories(SYSTEM ${LIBEV_INCLUDE_DIR})
+ADD_THIRDPARTY_LIB(libev
+  STATIC_LIB "${LIBEV_STATIC_LIB}")
+
 ###################################################################
 
 # KuduClient can use GLOG

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/a81ad5ea/bin/bootstrap_toolchain.py
----------------------------------------------------------------------
diff --git a/bin/bootstrap_toolchain.py b/bin/bootstrap_toolchain.py
index c8e35de..1434862 100755
--- a/bin/bootstrap_toolchain.py
+++ b/bin/bootstrap_toolchain.py
@@ -350,9 +350,9 @@ if __name__ == "__main__":
     os.makedirs(toolchain_root)
 
   packages = ["avro", "binutils", "boost", "breakpad", "bzip2", "cmake", "gcc", "gflags",
-      "glog", "gperftools", "gtest", "kudu", "llvm", ("llvm", "3.8.0-asserts-p1"), "lz4",
-      "openldap", "protobuf", "rapidjson", "re2", "snappy", "thrift", "tpc-h", "tpc-ds",
-      "zlib"]
+      "glog", "gperftools", "gtest", "kudu", "libev", "llvm",
+      ("llvm", "3.8.0-asserts-p1"), "lz4", "openldap", "protobuf", "rapidjson", "re2",
+      "snappy", "thrift", "tpc-h", "tpc-ds", "zlib"]
   bootstrap(toolchain_root, packages)
 
   # Download the CDH components if necessary.

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/a81ad5ea/bin/impala-config.sh
----------------------------------------------------------------------
diff --git a/bin/impala-config.sh b/bin/impala-config.sh
index c980ea3..2e72027 100755
--- a/bin/impala-config.sh
+++ b/bin/impala-config.sh
@@ -88,6 +88,7 @@ export IMPALA_GFLAGS_VERSION=2.0
 export IMPALA_GLOG_VERSION=0.3.2-p2
 export IMPALA_GPERFTOOLS_VERSION=2.5
 export IMPALA_GTEST_VERSION=1.6.0
+export IMPALA_LIBEV_VERSION=4.20
 export IMPALA_LLVM_VERSION=3.8.0-p1
 export IMPALA_LLVM_ASAN_VERSION=3.8.0-p1
 # Debug builds should use the release+asserts build to get additional coverage.

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/a81ad5ea/cmake_modules/FindLibEv.cmake
----------------------------------------------------------------------
diff --git a/cmake_modules/FindLibEv.cmake b/cmake_modules/FindLibEv.cmake
new file mode 100644
index 0000000..40443f1
--- /dev/null
+++ b/cmake_modules/FindLibEv.cmake
@@ -0,0 +1,41 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# - Find LIBEV (ev++.h, libev.a, and libev.so)
+# This module defines
+#  LIBEV_INCLUDE_DIR, directory containing headers
+#  LIBEV_SHARED_LIB, path to libev's shared library
+#  LIBEV_STATIC_LIB, path to libev's static library
+#  LIBEV_FOUND, whether libev has been found
+
+find_path(LIBEV_INCLUDE_DIR ev++.h PATHS
+  ${LIBEV_ROOT}/include
+  # make sure we don't accidentally pick up a different version
+  NO_CMAKE_SYSTEM_PATH
+  NO_SYSTEM_ENVIRONMENT_PATH)
+find_library(LIBEV_SHARED_LIB ev PATHS
+  ${LIBEV_ROOT}/lib
+  NO_CMAKE_SYSTEM_PATH
+  NO_SYSTEM_ENVIRONMENT_PATH)
+find_library(LIBEV_STATIC_LIB libev.a PATHS
+  ${LIBEV_ROOT}/lib
+  NO_CMAKE_SYSTEM_PATH
+  NO_SYSTEM_ENVIRONMENT_PATH)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(LIBEV REQUIRED_VARS
+  LIBEV_SHARED_LIB LIBEV_STATIC_LIB LIBEV_INCLUDE_DIR)


Mime
View raw message