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.
This commit is contained in:
@@ -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
|
||||
# <http://stackoverflow.com/questions/9948375/cmake-find-package-succeeds-but-returns-wrong-path>
|
||||
if (NOT BOOST_ROOT)
|
||||
set (Boost_NO_BOOST_CMAKE ON)
|
||||
endif (NOT BOOST_ROOT)
|
||||
endmacro (opm_defaults opm)
|
||||
|
||||
Reference in New Issue
Block a user