Add a version define/const in hpp.
Closed this issue · 4 comments
mgautierfr commented
It would be nice to have a mustache version available in the code.
(It is currently present in the comments but it is not easy to use/parse).
Something like #define MUSTACHE_VERSION "4.1"
It would allow build script to check the mustache version at configure step.
For example, using meson syntax (not tested) :
compiler = meson.get_compiler('cpp')
if not compiler.check_header('mustache.hpp')
error("Cannot find mustache")
endif
result = compiler.run("#include <iostream>\n#include <mustache.hpp>\nint main() { std::cout << MUSTACHE_VERSION << std::endl; }")
mustache_version = result.stdout()
if not mustache_version.version_compare(">=4.1")
error("Mustache is too old")
endif
kelson42 commented
@mgautierfr Can you please give a feedback here?
mgautierfr commented
kelson42 commented
@mgautierfr Sorry missed it. Thx.