From fd09c12e3b3f4e999089a26e8dac2eea31cb9705 Mon Sep 17 00:00:00 2001 From: Henry Fredrick Schreiner Date: Fri, 1 Dec 2017 07:23:21 -0500 Subject: [PATCH] Adding version macro, preparing for release --- CHANGELOG.md | 3 ++- include/CLI/CLI.hpp | 2 ++ include/CLI/Version.hpp | 17 +++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 include/CLI/Version.hpp diff --git a/CHANGELOG.md b/CHANGELOG.md index 529e156d..4ba4324c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ -## Version 1.3 (in progress) +## Version 1.3 +* Added a version macro, `CLI11_VERSION`, along with `*_MAJOR`, `*_MINOR`, and `*_PATCH`, for programmatic access to the version. * Reworked the way defaults are set and inherited; explicit control given to user with `->option_defaults()` [#48](https://github.com/CLIUtils/CLI11/pull/48) * Hidden options now are based on an empty group name, instead of special "hidden" keyword [#48](https://github.com/CLIUtils/CLI11/pull/48) * `parse` no longer returns (so `CLI11_PARSE` is always usable) [#37](https://github.com/CLIUtils/CLI11/pull/37) diff --git a/include/CLI/CLI.hpp b/include/CLI/CLI.hpp index d13f8402..53a0cef2 100644 --- a/include/CLI/CLI.hpp +++ b/include/CLI/CLI.hpp @@ -6,6 +6,8 @@ // CLI Library includes // Order is important for combiner script +#include "CLI/Version.hpp" + #include "CLI/StringTools.hpp" #include "CLI/Error.hpp" diff --git a/include/CLI/Version.hpp b/include/CLI/Version.hpp new file mode 100644 index 00000000..5b658ae5 --- /dev/null +++ b/include/CLI/Version.hpp @@ -0,0 +1,17 @@ +#pragma once + +// Distributed under the 3-Clause BSD License. See accompanying +// file LICENSE or https://github.com/CLIUtils/CLI11 for details. + + +namespace CLI { + +// Note that all code in CLI11 must be in a namespace, even if it just a define. + +#define CLI11_VERSION_MAJOR 1 +#define CLI11_VERSION_MINOR 3 +#define CLI11_VERSION_PATCH 0 +#define CLI11_VERSION "1.3.0" + + +} // namespace CLI