CopernicaMarketingSoftware / AMQP-CPP

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

Add version header with AMQPCPP_VERSION preprocessor symbol #496

Open Chardrazle opened 1 year ago

Chardrazle commented 1 year ago

A bit of cmake machinery that stamps out a "version.h" file based on the existing values in CMakeLists.txt. The _versiontemplate.h file is used to construct the version header. The initial "version.h" file is created in the build (binary) dir so as not to pollute the source tree. It is installed into ".../include/amqpcpp/".

EmielBruijntjes commented 1 year ago

What would the recommended workflow be when we bring out a new version? Currently, after I brought out a new version, I already (manually) update the version numbers in Makefile and CMakeLists.txt to prepare for the next version.

Chardrazle commented 1 year ago

Does anything change? Presumably at the point where you’ve decided the release is ready, that’s the snapshot point where the values in the make files truly represent that version (as opposed to working towards). You then set the tag to mark it. After that you update the values for the next targeted version. If I were to download, say, v4.3.20, the VERSION_XYZ values in its CMakeLists.txt file specify 4, 3 and 20. So a cmake, make, make install will always be bound to those values.