summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorStephen D. Huston <shuston@apache.org>2009-12-14 18:16:58 +0000
committerStephen D. Huston <shuston@apache.org>2009-12-14 18:16:58 +0000
commit2b0886c0e3155b5093c0038f1aeecdec39a9299c (patch)
tree6d31c6d8d9d03686740e6f9f9a4901eaec22d3ce /cpp
parentb7ca1dd5cd230873df4ffc637027048095c5534c (diff)
downloadqpid-python-2b0886c0e3155b5093c0038f1aeecdec39a9299c.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/qpid@890422 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/CMakeLists.txt18
1 files changed, 12 insertions, 6 deletions
diff --git a/cpp/src/CMakeLists.txt b/cpp/src/CMakeLists.txt
index c1666487f2..b6da2e758d 100644
--- a/cpp/src/CMakeLists.txt
+++ b/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