From 4ac791b225dc148cda5b0fe519ceb438da79e0bd Mon Sep 17 00:00:00 2001 From: Evan Lojewski Date: Sun, 1 Mar 2020 22:14:00 -0700 Subject: build: Add version information to output files. (#52) --- utils/bin2c/main.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'utils/bin2c/main.cpp') diff --git a/utils/bin2c/main.cpp b/utils/bin2c/main.cpp index c494421..a8da108 100644 --- a/utils/bin2c/main.cpp +++ b/utils/bin2c/main.cpp @@ -10,7 +10,7 @@ /// //////////////////////////////////////////////////////////////////////////////// /// -/// @copyright Copyright (c) 2019, Evan Lojewski +/// @copyright Copyright (c) 2019-2020, Evan Lojewski /// @cond /// /// All rights reserved. @@ -47,6 +47,10 @@ #include #include #include +#include + +#define VERSION_STRING STRINGIFY(VERSION_MAJOR) "." STRINGIFY(VERSION_MINOR) "." STRINGIFY(VERSION_PATCH) + using namespace std; using optparse::OptionParser; @@ -83,7 +87,9 @@ int main(int argc, char const *argv[]) { ofstream outfile; ifstream infile; - OptionParser parser = OptionParser().description("Binary to C Header utility"); + OptionParser parser = OptionParser().description("Binary to C Header utility v" VERSION_STRING); + + parser.version(VERSION_STRING); parser.add_option("-i", "--input") .dest("input") -- cgit v1.2.3