IMPALA-4959: Avoid picking up the system's boost cmake module In some systems with an old boost installed system-wide the impala build would fail with something like:
CMake Error at /usr/lib64/boost/BoostConfig.cmake:64 (get_target_property): get_target_property() called with non-existent target "boost_thread-shared". Call Stack (most recent call first): toolchain/cmake-3.2.3-p1/share/cmake-3.2/Modules/FindBoost.cmake:206 (find_package) CMakeLists.txt:116 (find_package) CMake Error at /usr/lib64/boost/BoostConfig.cmake:72 (get_target_property): get_target_property() called with non-existent target "boost_thread-shared-debug". Call Stack (most recent call first): toolchain/cmake-3.2.3-p1/share/cmake-3.2/Modules/FindBoost.cmake:206 (find_package) CMakeLists.txt:116 (find_package) This because, if it exists, cmake's FindBoost.cmake will look for and use that module, even though boost's cmake build hasn't been maintained in years and the impala build is actually configured to not use the systems boost. This patch sets the cmake flag Boost_NO_BOOST_CMAKE to ON, making sure the old cmake module is not picked up. Change-Id: I759e1a4f8f69727cc1224bf460326140fd2131a2 Reviewed-on: http://gerrit.cloudera.org:8080/5994 Reviewed-by: Alex Behm <[email protected]> Reviewed-by: Matthew Jacobs <[email protected]> Tested-by: Impala Public Jenkins Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/1656d3dd Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/1656d3dd Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/1656d3dd Branch: refs/heads/master Commit: 1656d3dd5583312ddd0db147c1605e2d3448a081 Parents: cede376 Author: David Alves <[email protected]> Authored: Mon Feb 13 20:28:59 2017 -0800 Committer: Impala Public Jenkins <[email protected]> Committed: Thu Feb 23 01:30:13 2017 +0000 ---------------------------------------------------------------------- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/1656d3dd/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/CMakeLists.txt b/CMakeLists.txt index a283097..80256cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,6 +93,10 @@ if (APPLE) set_dep_root(OPENSSL) endif() +# The boost-cmake project hasn't been maintained for years. Let's make sure we +# don't accidentally use it if it can be found. +set(Boost_NO_BOOST_CMAKE ON) + set(Boost_USE_STATIC_LIBS NOT ${BUILD_SHARED_LIBS}) set(Boost_USE_STATIC_RUNTIME ON)
