mirror of
https://github.com/apache/impala.git
synced 2025-12-23 21:08:39 -05:00
Optional Impala Toolchain
This patch allows to optionally enable the new Impala binary toolchain. For now there are now major version differences in the toolchain dependencies and what is currently kept in thirdparty. To enable the toolchain, export the variable IMPALA_TOOLCHAIN to the folder where the binaries are available. In addition this patch moves gutil from the thirdparty directory into the source tree of be/src to allow easy propagation of compiler and linker flags. Furthermore, the thrift-cpp target was added as a dependency to all targets that require the generated thrift sources to be available before the build is started. What is the new toolchain: The goal of the toolchain is to homogenize the build environment and to make sure that Impala is build nearly identical on every platform. To achieve this, we limit the flexibility of using the systems host libraries and rather rely on a set of custom produced binaries including the necessary compiler. Change-Id: If2dac920520e4a18be2a9a75b3184a5bd97a065b Reviewed-on: http://gerrit.cloudera.org:8080/427 Reviewed-by: Adar Dembo <adar@cloudera.com> Tested-by: Internal Jenkins Reviewed-by: Martin Grund <mgrund@cloudera.com>
This commit is contained in:
@@ -1,38 +1,44 @@
|
||||
# - Find SASL security library.
|
||||
# CYRUS_SASL_ROOT hints the location
|
||||
# This module defines
|
||||
# SASL_INCLUDE_DIR, where to find SASL headers
|
||||
# SASL_STATIC_LIBRARY, the library to use.
|
||||
# SASL_FOUND, If false, do not try to use.
|
||||
# SASL_STATIC_LIBRARY, the library to use
|
||||
# saslstatic - imported static library
|
||||
|
||||
set(THIRDPARTY_SASL thirdparty/cyrus-sasl-$ENV{IMPALA_CYRUS_SASL_VERSION})
|
||||
|
||||
set (THIRDPARTY ${CMAKE_SOURCE_DIR}/thirdparty)
|
||||
set(SASL_SEARCH_LIB_PATH $ENV{IMPALA_CYRUS_SASL_INSTALL_DIR}/lib)
|
||||
set(SASL_INCLUDE_DIR $ENV{IMPALA_CYRUS_SASL_INSTALL_DIR}/include)
|
||||
|
||||
find_library(SASL_LIB_PATH NAMES sasl2
|
||||
set(SASL_SEARCH_LIB_PATH
|
||||
${CYRUS_SASL_ROOT}/lib
|
||||
$ENV{IMPALA_CYRUS_SASL_INSTALL_DIR}/lib)
|
||||
set(SASL_SEARCH_INCLUDE_DIR
|
||||
${CYRUS_SASL_ROOT}/include
|
||||
$ENV{IMPALA_CYRUS_SASL_INSTALL_DIR}/include)
|
||||
|
||||
|
||||
find_path(SASL_INCLUDE_DIR NAMES sasl/sasl.h
|
||||
PATHS ${SASL_SEARCH_INCLUDE_DIR}
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
find_library(SASL_STATIC_LIBRARY NAMES libsasl2.a
|
||||
PATHS ${SASL_SEARCH_LIB_PATH}
|
||||
NO_DEFAULT_PATH
|
||||
DOC "Cyrus-sasl library"
|
||||
)
|
||||
|
||||
if (SASL_LIB_PATH)
|
||||
set(SASL_FOUND TRUE)
|
||||
set(SASL_STATIC_LIBRARY ${SASL_SEARCH_LIB_PATH}/libsasl2.a)
|
||||
else ()
|
||||
if (NOT SASL_STATIC_LIBRARY OR NOT SASL_INCLUDE_DIR)
|
||||
set(SASL_FOUND FALSE)
|
||||
endif ()
|
||||
|
||||
if (SASL_FOUND)
|
||||
if (NOT SASL_FIND_QUIETLY)
|
||||
message(STATUS "Found SASL ${SASL_STATIC_LIBRARY}")
|
||||
endif ()
|
||||
else ()
|
||||
message(STATUS "SASL includes and libraries NOT found.")
|
||||
message(FATAL_ERROR "SASL includes and libraries NOT found.")
|
||||
else()
|
||||
set(SASL_FOUND TRUE)
|
||||
add_library(saslstatic STATIC IMPORTED)
|
||||
set_target_properties(saslstatic PROPERTIES IMPORTED_LOCATION ${SASL_STATIC_LIBRARY})
|
||||
endif ()
|
||||
|
||||
|
||||
mark_as_advanced(
|
||||
SASL_STATIC_LIBRARY
|
||||
SASL_INCLUDE_DIR
|
||||
saslstatic
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user