Skip to content

Commit

Permalink
Added version in source. (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Chen authored May 19, 2020
1 parent d17642d commit c644b77
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
5 changes: 5 additions & 0 deletions common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ cc_library(
name = "stdint",
hdrs = ["stdint.h"],
)

cc_library(
name = "version",
hdrs = ["version.h"],
)
31 changes: 31 additions & 0 deletions common/version.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright (c) 2020 IOTA Stiftung
* https://github.com/iotaledger/iota_common
*
* Refer to the LICENSE file for licensing information
*/

#ifndef __COMMON_VERSION_H__
#define __COMMON_VERSION_H__

#ifdef __cplusplus
extern "C" {
#endif

#define IOTA_COMMON_VERSION_MAJOR 1
#define IOTA_COMMON_VERSION_MINOR 1
#define IOTA_COMMON_VERSION_MICRO 0
#define IOTA_COMMON_VERSION_SPECIAL "beta"

#define VER_STR0(s) #s
#define VER_STR(s) VER_STR0(s)

#define IOTA_COMMON_VERSION \
VER_STR(IOTA_COMMON_VERSION_MAJOR) \
"." VER_STR(IOTA_COMMON_VERSION_MINOR) "." VER_STR(IOTA_COMMON_VERSION_MICRO) "-" IOTA_COMMON_VERSION_SPECIAL

#ifdef __cplusplus
}
#endif

#endif // __COMMON_VERSION_H__

0 comments on commit c644b77

Please sign in to comment.