CopernicaMarketingSoftware / AMQP-CPP

C++ library for asynchronous non-blocking communication with RabbitMQ
Apache License 2.0
864 stars 334 forks source link

Question: when is the cmake version aligned with the tag? #487

Closed Chardrazle closed 1 year ago

Chardrazle commented 1 year ago

We recently ran into the "consumer-cancel" scenario on a clustered rabbitmq system, so thanks for the recent work on this (23/Nov/2022). The current version in the CMakeLists.txt file is at 4.3.15, but the latest git tag sits at 4.3.18. The recent consumer-cancel work is later than the last tag.

This is a question rather than issue, but when is the choice made to update the cmake file to align with the tag?

EmielBruijntjes commented 1 year ago

Oh this was just a mistake. When I bring out a new version I often forget about the version numbers is the source code. I just updated the makefile and cmakelists.txt to 4.3.19 so that this will be fixed in the upcoming release (I don't know when this will be).

Chardrazle commented 1 year ago

Would it be possible to make a preprocessor symbol available, with the version? Should be relatively trivial to add to the definitions.

E.g. hex-style 0xMMNNPP cmake can do the maths to get the value:

math(EXPR AMQPCPP_VERSION "${VERSION_MAJOR} << 16 | ${VERSION_MINOR} << 8 | ${VERSION_PATCH}" OUTPUT_FORMAT HEXADECIMAL)

Sorry for adding to a closed issue; would you prefer a feature request?

EmielBruijntjes commented 1 year ago

@Chardrazle Yes, that could be helpful