hyperscan
hyperscan copied to clipboard
Export HS_VERSION in the public include files
Hello, I'm asking if it is possible to include the Hyperscan version define somewhere in the public headers?
This information is essential if using of the new API function (in particular, I was thinking about hs_lit* functions). In theory, this could be checked on a configure stage by some CMake test in my case, but that would make it much more expensive as I would need to link C++ library during configure phase.
Having HS_VERSION macros will resolve this issue and this is the common technique used by many libraries.
Sure, we'll add that.
@vstakhov Hi, are you suggesting to put the entire version number in a public header, to avoid getting that number by doing cmake step (as version number is now defined in CMakeList.txt) which is not very practical for some scenarios like using Hyperscan via lib package rather than source code?
Please correct us if we misunderstood.
Yes, I have seen it in Cmake files and it will work for embedded Hyperscan.
However, in the vast majority of the cases Hyperscan is provided as a library in the system (e.g. by package manager). The common sense is to have version number in the public include file or/and in the pkg-config export.
I would be happy with either option: the first will let me use direct #if VER > 0xYYYYYYUL ... #endif
and the former will let me decide on build phase.