diff --git a/CMakeLists.txt b/CMakeLists.txt index 18be5d49edd..e0339d670c6 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 diff --git a/bin/bootstrap_toolchain.py b/bin/bootstrap_toolchain.py index c8e35def05a..14348622801 100755 --- a/bin/bootstrap_toolchain.py +++ b/bin/bootstrap_toolchain.py @@ -350,9 +350,9 @@ def download_cdh_components(toolchain_root, cdh_components): 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. diff --git a/bin/impala-config.sh b/bin/impala-config.sh index c980ea30918..2e720271b0f 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. diff --git a/cmake_modules/FindLibEv.cmake b/cmake_modules/FindLibEv.cmake new file mode 100644 index 00000000000..40443f1b42b --- /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)