From 4fc2593bb322c04c43e5fa2b6f2c1dcb62064d24 Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Thu, 14 Feb 2013 22:59:32 +0100 Subject: [PATCH] Prevent conflict between older Boost and newer CMake The probe for Boost was changed in CMake 2.8; if the system has installed configuration files tailored for an older CMake, the library paths are not setup correctly. This patch disables using those configuration files; just use the library directly instead. --- cmake/Modules/OpmDefaults.cmake | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cmake/Modules/OpmDefaults.cmake b/cmake/Modules/OpmDefaults.cmake index 6aa1bed0..73a3df9e 100644 --- a/cmake/Modules/OpmDefaults.cmake +++ b/cmake/Modules/OpmDefaults.cmake @@ -35,4 +35,15 @@ macro (opm_defaults opm) if (NOT PRECOMPILE_HEADERS) message (STATUS "Precompiled headers: disabled") endif(NOT PRECOMPILE_HEADERS) + + # if we are on a system where CMake 2.6 is the default (Hi RHEL 6!), + # the configuration files for Boost will trip up the library paths + # (look for /usr/lib64/lib64/ in the log) when used with FindBoost + # module bundled with CMake 2.8. this can be circumvented by turning + # off config mode probing if we have not explicitly specified a + # directory to look for it. for more details, see + # + if (NOT BOOST_ROOT) + set (Boost_NO_BOOST_CMAKE ON) + endif (NOT BOOST_ROOT) endmacro (opm_defaults opm)