Add CATCH_VERSION_* defines for external use

I wonder how much use they will actually see, but their cost is
fairly minor.

Closes #1131
This commit is contained in:
Martin Hořeňovský
2018-01-26 20:27:19 +01:00
parent ca2455e6e6
commit 44dbda9f01
3 changed files with 35 additions and 0 deletions

View File

@@ -106,6 +106,20 @@ int main( int argc, char* argv[] )
See the [Clara documentation](https://github.com/philsquared/Clara/blob/master/README.md) for more details.
## Version detection
Catch provides a triplet of macros providing the header's version,
* `CATCH_VERSION_MAJOR`
* `CATCH_VERSION_MINOR`
* `CATCH_VERSION_PATCH`
these macros expand into a single number, that corresponds to the appropriate
part of the version. As an example, given single header version v2.3.4,
the macros would expand into `2`, `3`, and `4` respectively.
---
[Home](Readme.md#top)