Adding to version checking macros

master
Paul Sutton 9 years ago
parent 524cc20236
commit 83af2f9cd1

@ -21,4 +21,4 @@
SET(SRSLTE_VERSION_MAJOR 001) SET(SRSLTE_VERSION_MAJOR 001)
SET(SRSLTE_VERSION_MINOR 000) SET(SRSLTE_VERSION_MINOR 000)
SET(SRSLTE_VERSION_PATCH 000) SET(SRSLTE_VERSION_PATCH 000)
SET(SRSLTE_VERSION "${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR}.${SRSLTE_VERSION_PATCH}") SET(SRSLTE_VERSION_STRING "${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR}.${SRSLTE_VERSION_PATCH}")

@ -32,7 +32,20 @@
#define SRSLTE_VERSION_MAJOR @SRSLTE_VERSION_MAJOR@ #define SRSLTE_VERSION_MAJOR @SRSLTE_VERSION_MAJOR@
#define SRSLTE_VERSION_MINOR @SRSLTE_VERSION_MINOR@ #define SRSLTE_VERSION_MINOR @SRSLTE_VERSION_MINOR@
#define SRSLTE_VERSION_PATCH @SRSLTE_VERSION_PATCH@ #define SRSLTE_VERSION_PATCH @SRSLTE_VERSION_PATCH@
#define SRSLTE_VERSION @SRSLTE_VERSION@ #define SRSLTE_VERSION_STRING @SRSLTE_VERSION_STRING@
#define SRSLTE_VERSION_ENCODE(major, minor, patch) ( \
((major) * 10000) \
+ ((minor) * 100) \
+ ((patch) * 1))
#define SRSLTE_VERSION SRSLTE_VERSION_ENCODE( \
SRSLTE_VERSION_MAJOR, \
SRSLTE_VERSION_MINOR, \
SRSLTE_VERSION_PATCH)
#define SRSLTE_VERSION_CHECK(major,minor,patch) \
(SRSLTE_VERSION >= SRSLTE_VERSION_ENCODE(major,minor,patch))
#include "srslte/config.h" #include "srslte/config.h"

Loading…
Cancel
Save