Skip to content

Commit

Permalink
Making CMake modules more modular for non-toolchain build
Browse files Browse the repository at this point in the history
This patch makes sure that the Impala-lzo build can pickup the
cmake modules from Impala to avoid code duplication on the lzo side.

Change-Id: I7917946724ce4bfaa281e708e9ea5799b4e2cd37
Reviewed-on: http://gerrit.cloudera.org:8080/552
Reviewed-by: Martin Grund <mgrund@cloudera.com>
Tested-by: Internal Jenkins
  • Loading branch information
Martin Grund authored and Internal Jenkins committed Jul 22, 2015
1 parent 504d06d commit 0d48009
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 27 deletions.
4 changes: 2 additions & 2 deletions cmake_modules/FindAvro.cmake
Expand Up @@ -6,11 +6,11 @@
# avro - static library
set(AVRO_SEARCH_HEADER_PATHS
${AVRO_ROOT}/include
${CMAKE_SOURCE_DIR}/thirdparty/avro-c-$ENV{IMPALA_AVRO_VERSION}/src)
$ENV{IMPALA_HOME}/thirdparty/avro-c-$ENV{IMPALA_AVRO_VERSION}/src)

set(AVRO_SEARCH_LIB_PATH
${AVRO_ROOT}/lib
${CMAKE_SOURCE_DIR}/thirdparty/avro-c-$ENV{IMPALA_AVRO_VERSION}/src)
$ENV{IMPALA_HOME}/thirdparty/avro-c-$ENV{IMPALA_AVRO_VERSION}/src)

find_path(AVRO_INCLUDE_DIR NAMES avro/schema.h schema.h PATHS
${AVRO_SEARCH_HEADER_PATHS}
Expand Down
3 changes: 1 addition & 2 deletions cmake_modules/FindBoostMultiPrecision.cmake
Expand Up @@ -2,7 +2,7 @@
# This is a header only library so we just need to set the include dir

set(BOOST_MULTI_PRECISION_SEARCH_HEADER_PATH
${CMAKE_SOURCE_DIR}/thirdparty/boost_multiprecision
$ENV{IMPALA_HOME}/thirdparty/boost_multiprecision
)

find_file(BOOST_MULTI_PRECISION_HEADER NAMES cpp_int.hpp
Expand All @@ -28,4 +28,3 @@ endif ()
mark_as_advanced(
BOOST_MULTI_PRECISION_INCLUDE_DIR
)

4 changes: 2 additions & 2 deletions cmake_modules/FindGFlags.cmake
Expand Up @@ -9,12 +9,12 @@

set(GFLAGS_SEARCH_HEADER_PATHS
${GFLAGS_ROOT}/include
${CMAKE_SOURCE_DIR}/thirdparty/gflags-$ENV{IMPALA_GFLAGS_VERSION}/src
$ENV{IMPALA_HOME}/thirdparty/gflags-$ENV{IMPALA_GFLAGS_VERSION}/src
)

set(GFLAGS_SEARCH_LIB_PATH
${GFLAGS_ROOT}/lib
${CMAKE_SOURCE_DIR}/thirdparty/gflags-$ENV{IMPALA_GFLAGS_VERSION}/.libs
$ENV{IMPALA_HOME}/thirdparty/gflags-$ENV{IMPALA_GFLAGS_VERSION}/.libs
)

find_path(GFLAGS_INCLUDE_DIR gflags/gflags.h PATHS
Expand Down
2 changes: 1 addition & 1 deletion cmake_modules/FindGLog.cmake
Expand Up @@ -7,7 +7,7 @@
# GLOG_STATIC_LIB, path to libglog.a
# glogstatic

set(THIRDPARTY ${CMAKE_SOURCE_DIR}/thirdparty)
set(THIRDPARTY $ENV{IMPALA_HOME}/thirdparty)

set(GLOG_SEARCH_HEADER_PATHS
${GLOG_ROOT}/include
Expand Down
6 changes: 3 additions & 3 deletions cmake_modules/FindGTest.cmake
Expand Up @@ -37,21 +37,21 @@ set(GTEST_H gtest/gtest.h)

find_path(GTEST_INCLUDE_DIR ${GTEST_H}
PATHS ${GTEST_ROOT}/include
${CMAKE_SOURCE_DIR}/thirdparty/gtest-1.6.0/include
$ENV{IMPALA_HOME}/thirdparty/gtest-1.6.0/include
NO_DEFAULT_PATH
DOC "Path to the ${GTEST_H} file"
)

find_library(GTEST_LIBRARY NAMES gtest
PATHS ${GTEST_ROOT}/lib
${CMAKE_SOURCE_DIR}/thirdparty/gtest-1.6.0
$ENV{IMPALA_HOME}/thirdparty/gtest-1.6.0
NO_DEFAULT_PATH
DOC "Google's framework for writing C++ tests (gtest)"
)

find_library(GTEST_MAIN_LIBRARY NAMES gtest_main
PATHS ${GTEST_ROOT}/lib
${CMAKE_SOURCE_DIR}/thirdparty/gtest-1.6.0
$ENV{IMPALA_HOME}/thirdparty/gtest-1.6.0
NO_DEFAULT_PATH
DOC "Google's framework for writing C++ tests (gtest_main)"
)
Expand Down
4 changes: 2 additions & 2 deletions cmake_modules/FindLdap.cmake
Expand Up @@ -7,9 +7,9 @@
# LBER_STATIC_LIBRARY, a support library for LDAP.
# ldapstatic, lberstatic, imported libraries

set(THIRDPARTY_LDAP thirdparty/openldap-$ENV{IMPALA_OPENLDAP_VERSION})
set(THIRDPARTY_LDAP $ENV{IMPALA_HOME}/thirdparty/openldap-$ENV{IMPALA_OPENLDAP_VERSION})

set (THIRDPARTY ${CMAKE_SOURCE_DIR}/thirdparty)
set(THIRDPARTY $ENV{IMPALA_HOME}/thirdparty)
set(LDAP_SEARCH_LIB_PATH
${OPENLDAP_ROOT}/lib
${THIRDPARTY}/openldap-$ENV{IMPALA_OPENLDAP_VERSION}/impala_install/lib
Expand Down
4 changes: 2 additions & 2 deletions cmake_modules/FindLz4.cmake
Expand Up @@ -9,12 +9,12 @@

set(LZ4_SEARCH_LIB_PATH
${LZ4_ROOT}/lib
${CMAKE_SOURCE_DIR}/thirdparty/lz4
$ENV{IMPALA_HOME}/thirdparty/lz4
)

set(LZ4_SEARCH_INCLUDE_DIR
${LZ4_ROOT}/include
${CMAKE_SOURCE_DIR}/thirdparty/lz4
$ENV{IMPALA_HOME}/thirdparty/lz4
)

find_path(LZ4_INCLUDE_DIR lz4.h
Expand Down
4 changes: 2 additions & 2 deletions cmake_modules/FindMustache.cmake
Expand Up @@ -4,8 +4,8 @@
# MUSTACHE_SRC_DIR, directory containing source
# MUSTACHE_FOUND, whether the Mustache library has been located

find_path(MUSTACHE_INCLUDE_DIR mustache/mustache.h HINTS ${CMAKE_SOURCE_DIR}/thirdparty)
find_path(MUSTACHE_SRC_DIR mustache.cc HINTS ${CMAKE_SOURCE_DIR}/thirdparty/mustache)
find_path(MUSTACHE_INCLUDE_DIR mustache/mustache.h HINTS $ENV{IMPALA_HOME}/thirdparty)
find_path(MUSTACHE_SRC_DIR mustache.cc HINTS $ENV{IMPALA_HOME}/thirdparty/mustache)

if (MUSTACHE_INCLUDE_DIR)
set(MUSTACHE_FOUND TRUE)
Expand Down
4 changes: 2 additions & 2 deletions cmake_modules/FindPProf.cmake
Expand Up @@ -9,12 +9,12 @@

set(PPROF_SEARCH_HEADER_PATHS
${GPERFTOOLS_ROOT}/include
${CMAKE_SOURCE_DIR}/thirdparty/gperftools-2.0/src
$ENV{IMPALA_HOME}/thirdparty/gperftools-2.0/src
)

set(PPROF_SEARCH_LIB_PATH
${GPERFTOOLS_ROOT}/lib
${CMAKE_SOURCE_DIR}/thirdparty/gperftools-2.0/.libs
$ENV{IMPALA_HOME}/thirdparty/gperftools-2.0/.libs
)

find_path(PPROF_INCLUDE_DIR google/profiler.h PATHS
Expand Down
2 changes: 1 addition & 1 deletion cmake_modules/FindRapidJson.cmake
Expand Up @@ -4,7 +4,7 @@

set(RAPIDJSON_SEARCH_HEADER_PATHS
${RAPIDJSON_ROOT}/include
${CMAKE_SOURCE_DIR}/thirdparty/rapidjson/include/
$ENV{IMPALA_HOME}/thirdparty/rapidjson/include/
)

find_path(RAPIDJSON_INCLUDE_DIR rapidjson/rapidjson.h HINTS
Expand Down
4 changes: 2 additions & 2 deletions cmake_modules/FindRe2.cmake
Expand Up @@ -7,12 +7,12 @@

set(RE2_SEARCH_HEADER_PATHS
${RE2_ROOT}/include
${CMAKE_SOURCE_DIR}/thirdparty/re2
$ENV{IMPALA_HOME}/thirdparty/re2
)

set(RE2_SEARCH_LIB_PATHS
${RE2_ROOT}/lib
${CMAKE_SOURCE_DIR}/thirdparty/re2/obj
$ENV{IMPALA_HOME}/thirdparty/re2/obj
)

find_path(RE2_INCLUDE_DIR re2/re2.h
Expand Down
4 changes: 2 additions & 2 deletions cmake_modules/FindSasl.cmake
Expand Up @@ -5,9 +5,9 @@
# SASL_STATIC_LIBRARY, the library to use
# saslstatic - imported static library

set(THIRDPARTY_SASL thirdparty/cyrus-sasl-$ENV{IMPALA_CYRUS_SASL_VERSION})
set(THIRDPARTY_SASL $ENV{IMPALA_HOME}/thirdparty/cyrus-sasl-$ENV{IMPALA_CYRUS_SASL_VERSION})

set (THIRDPARTY ${CMAKE_SOURCE_DIR}/thirdparty)
set(THIRDPARTY $ENV{IMPALA_HOME}/thirdparty)

set(SASL_SEARCH_LIB_PATH
${CYRUS_SASL_ROOT}/lib
Expand Down
4 changes: 2 additions & 2 deletions cmake_modules/FindSnappy.cmake
Expand Up @@ -10,12 +10,12 @@

set(SNAPPY_SEARCH_HEADER_PATHS
${SNAPPY_ROOT}/include
${CMAKE_SOURCE_DIR}/thirdparty/snappy-1.0.5/build/include
$ENV{IMPALA_HOME}/thirdparty/snappy-1.0.5/build/include
)

set(SNAPPY_SEARCH_LIB_PATH
${SNAPPY_ROOT}/lib
${CMAKE_SOURCE_DIR}/thirdparty/snappy-1.0.5/build/lib
$ENV{IMPALA_HOME}/thirdparty/snappy-1.0.5/build/lib
)

find_path(SNAPPY_INCLUDE_DIR
Expand Down
4 changes: 2 additions & 2 deletions cmake_modules/FindSqueasel.cmake
Expand Up @@ -3,8 +3,8 @@
# SQUEASEL_INCLUDE_DIR, directory containing headers
# SQUEASEL_SRC_DIR, directory containing source

find_path(SQUEASEL_INCLUDE_DIR squeasel/squeasel.h HINTS ${CMAKE_SOURCE_DIR}/thirdparty)
find_path(SQUEASEL_SRC_DIR squeasel.c HINTS ${CMAKE_SOURCE_DIR}/thirdparty/squeasel)
find_path(SQUEASEL_INCLUDE_DIR squeasel/squeasel.h HINTS $ENV{IMPALA_HOME}/thirdparty)
find_path(SQUEASEL_SRC_DIR squeasel.c HINTS $ENV{IMPALA_HOME}/thirdparty/squeasel)

if (SQUEASEL_INCLUDE_DIR)
set(SQUEASEL_FOUND TRUE)
Expand Down

0 comments on commit 0d48009

Please sign in to comment.