diff options
| author | Stephen D. Huston <shuston@apache.org> | 2009-12-14 18:16:58 +0000 |
|---|---|---|
| committer | Stephen D. Huston <shuston@apache.org> | 2009-12-14 18:16:58 +0000 |
| commit | 0276bdc61b37b8818525a1a91da498e5f98dcd5f (patch) | |
| tree | 96436a977bd46f6db45081c59c555d3a1619572c /qpid/cpp | |
| parent | 900ff9c0aca00db00123c54d6a49ccd14b79505e (diff) | |
| download | qpid-python-0276bdc61b37b8818525a1a91da498e5f98dcd5f.tar.gz | |
Only search for boost.system if the discovered Boost version is 1.35 or greater; fixes QPID-2202
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@890422 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
| -rw-r--r-- | qpid/cpp/src/CMakeLists.txt | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/qpid/cpp/src/CMakeLists.txt b/qpid/cpp/src/CMakeLists.txt index c1666487f2..b6da2e758d 100644 --- a/qpid/cpp/src/CMakeLists.txt +++ b/qpid/cpp/src/CMakeLists.txt @@ -155,13 +155,23 @@ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILER_FLAGS} ${WARNING_FLAGS}") # TODO: Not all these libs are needed everywhere: # Linux only uses filesystem program_options unit_test_framework # (which itself uses regex). +# Boost.system is sometimes needed; it's handled separately, below. find_package(Boost 1.33 REQUIRED COMPONENTS filesystem program_options date_time thread - regex unit_test_framework system) + regex unit_test_framework) if(NOT Boost_FOUND) message(FATAL_ERROR "Boost C++ libraries not found. Please install or try setting BOOST_ROOT") endif(NOT Boost_FOUND) +# Boost.system was introduced at Boost 1.35; it's needed secondarily by other +# Boost libs Qpid needs, so be sure it's there. +if (NOT Boost_VERSION LESS 103500) + find_library(Boost_SYSTEM_LIBRARY, boost_system ${Boost_LIBRARY_DIRS}) + if (NOT Boost_SYSTEM_LIBRARY) + message(FATAL_ERROR "Boost.system library not found. Please install or try setting BOOST_ROOT") + endif (NOT Boost_SYSTEM_LIBRARY) +endif (NOT Boost_VERSION LESS 103500) + # Versions of cmake pre 2.6 don't set the Boost_*_LIBRARY variables correctly # these values are correct for Linux if (NOT Boost_PROGRAM_OPTIONS_LIBRARY) @@ -181,11 +191,7 @@ if (NOT Boost_REGEX_LIBRARY) endif (NOT Boost_REGEX_LIBRARY) if (NOT Boost_SYSTEM_LIBRARY) - # This library is not present in earlier boost versions so check for presence. - find_library(LIBBOOST_SYSTEM, boost_system ${Boost_LIBRARY_DIRS}) - if (LIBBOOST_SYSTEM) - set(Boost_SYSTEM_LIBRARY boost_system) - endif (LIBBOOST_SYSTEM) + set(Boost_SYSTEM_LIBRARY boost_system) endif (NOT Boost_SYSTEM_LIBRARY) # The Windows install also wants the Boost DLLs and headers that the release |
