diff options
| author | Gordon Sim <gsim@apache.org> | 2013-07-17 10:37:58 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2013-07-17 10:37:58 +0000 |
| commit | 4462511ce0b08463305a13141cb168e3ae0741f5 (patch) | |
| tree | 7f81f10c730529f549557dcc7efe9f498cfd6604 /cpp/src/amqp.cmake | |
| parent | f48c9762c060a9049d699a9f0228c1ba059f15f6 (diff) | |
| download | qpid-python-4462511ce0b08463305a13141cb168e3ae0741f5.tar.gz | |
NO-JIRA: Enhance proton version compatibility check to restrict latest as well as earliest compatible version
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1504071 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/amqp.cmake')
| -rw-r--r-- | cpp/src/amqp.cmake | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/cpp/src/amqp.cmake b/cpp/src/amqp.cmake index 45b0c51527..30cb8484ed 100644 --- a/cpp/src/amqp.cmake +++ b/cpp/src/amqp.cmake @@ -24,14 +24,19 @@ include(FindPkgConfig) pkg_check_modules(PROTON libqpid-proton) set (amqp_default ${amqp_force}) -set (required_version 0.3) +set (minimum_version 0.3) +set (maximum_version 0.4) if (PROTON_FOUND) - if (PROTON_VERSION LESS ${required_version}) - message(STATUS "Qpid proton is too old, amqp 1.0 support not enabled") - else (PROTON_VERSION LESS ${required_version}) - message(STATUS "Qpid proton found, amqp 1.0 support enabled") - set (amqp_default ON) - endif (PROTON_VERSION LESS ${required_version}) + if (PROTON_VERSION LESS ${minimum_version}) + message(STATUS "Qpid proton ${PROTON_VERSION} is too old, require ${minimum_version} - ${maximum_version}; amqp 1.0 support not enabled") + else (PROTON_VERSION LESS ${minimum_version}) + if (PROTON_VERSION GREATER ${maximum_version}) + message(STATUS "Qpid proton ${PROTON_VERSION} is too new, require ${minimum_version} - ${maximum_version}; amqp 1.0 support not enabled") + else (PROTON_VERSION GREATER ${maximum_version}) + message(STATUS "Qpid proton found, amqp 1.0 support enabled") + set (amqp_default ON) + endif (PROTON_VERSION GREATER ${maximum_version}) + endif (PROTON_VERSION LESS ${minimum_version}) else (PROTON_FOUND) message(STATUS "Qpid proton not found, amqp 1.0 support not enabled") endif (PROTON_FOUND) |
