Skip to content

Commit

Permalink
added a convienience macro to get version
Browse files Browse the repository at this point in the history
  • Loading branch information
hariharan-devarajan committed Apr 30, 2024
1 parent 2da5082 commit b1bcd16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmake/gotcha_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
#define GOTCHA_VERSION_MAJOR (GOTCHA_VERSION / 100000)
#define GOTCHA_VERSION_MINOR ((GOTCHA_VERSION / 100) % 1000)
#define GOTCHA_VERSION_PATCH (GOTCHA_VERSION % 100)
#define GOTCHA_GET_VERSION(MAJOR, MINOR, PATCH) MAJOR * 100000 + MINOR * 100 + PATCH

#endif /* HPC_AIO_CONFIG_H */
2 changes: 2 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ The codes can use the macros like
#if GOTCHA_VERSION_MAJOR > 1 // this will check of version greater than 2.0.0
#endif
#if GOTCHA_VERSION > GOTCHA_GET_VERSION(1,0,6) // this will check of version greater than 1.0.6
#endif
Expand Down

0 comments on commit b1bcd16

Please sign in to comment.