kainjow/Mustache

Add a version define/const in hpp.

Closed this issue · 4 comments

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

How about this? #55

@mgautierfr Can you please give a feedback here?

Thanks @kelson42 but I've already give a feedback on #55

@mgautierfr Sorry missed it. Thx.