1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-01-16 15:18:01 +00:00

Compare commits

...

5 Commits

Author SHA1 Message Date
allcontributors[bot]
a2bf5cdea2
docs: add samhocevar as a contributor (#479)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-06-14 11:37:34 -04:00
Henry Schreiner
b270058493 doc: changelog 2020-06-14 11:36:41 -04:00
Henry Schreiner
9f27da026e doc: changelog
[skip ci]
2020-06-14 11:35:04 -04:00
Sam Hocevar
2337bbf35d
Fix internal header include paths. (#475)
* Fix internal header include paths.

The extra leading "CLI/" part of include directives prevents the inclusion
of CLI.hpp from a relative directory without an extra -I or /I compiler
directive.

* Fix single header generation script.

Files included with "" should be relative to the header file location first.
2020-06-14 11:32:29 -04:00
Sam Hocevar
dccfb06d65
Fix default --version help message capitalisation. (#476)
The default help message for “--help” is capitalised, whereas the one
for “--version” was not:

    -h,--help                   Print this help message and exit
    -V,--version                display program version information and exit
2020-06-14 11:13:54 -04:00
14 changed files with 58 additions and 43 deletions

View File

@ -368,6 +368,15 @@
"contributions": [
"bug"
]
},
{
"login": "samhocevar",
"name": "Sam Hocevar",
"avatar_url": "https://avatars2.githubusercontent.com/u/245089?v=4",
"profile": "http://sam.hocevar.net/",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,

View File

@ -15,6 +15,8 @@
This is a patch version that backports fixes from the development of 2.0.
* Support relative inclusion [#475][]
* Fix cases where spaces in paths could break CMake support [#471][]
* Fix an issue with string conversion [#421][]
* Cross-compiling improvement for Conan.io [#430][]
* Fix option group default propagation [#450][]
@ -26,6 +28,8 @@ This is a patch version that backports fixes from the development of 2.0.
[#450]: https://github.com/CLIUtils/CLI11/pull/450
[#459]: https://github.com/CLIUtils/CLI11/pull/459
[#461]: https://github.com/CLIUtils/CLI11/pull/461
[#471]: https://github.com/CLIUtils/CLI11/pull/471
[#475]: https://github.com/CLIUtils/CLI11/pull/475
## Version 1.9: Config files and cleanup

View File

@ -927,6 +927,7 @@ This project was created by [Henry Schreiner](https://github.com/henryiii) and m
<td align="center"><a href="https://github.com/jsoref"><img src="https://avatars0.githubusercontent.com/u/2119212?v=4" width="100px;" alt=""/><br /><sub><b>Josh Soref</b></sub></a><br /><a href="#tool-jsoref" title="Tools">🔧</a></td>
<td align="center"><a href="https://github.com/geir-t"><img src="https://avatars3.githubusercontent.com/u/35292136?v=4" width="100px;" alt=""/><br /><sub><b>geir-t</b></sub></a><br /><a href="#platform-geir-t" title="Packaging/porting to new platform">📦</a></td>
<td align="center"><a href="https://ondrejcertik.com/"><img src="https://avatars3.githubusercontent.com/u/20568?v=4" width="100px;" alt=""/><br /><sub><b>Ondřej Čertík</b></sub></a><br /><a href="https://github.com/CLIUtils/CLI11/issues?q=author%3Acertik" title="Bug reports">🐛</a></td>
<td align="center"><a href="http://sam.hocevar.net/"><img src="https://avatars2.githubusercontent.com/u/245089?v=4" width="100px;" alt=""/><br /><sub><b>Sam Hocevar</b></sub></a><br /><a href="https://github.com/CLIUtils/CLI11/commits?author=samhocevar" title="Code">💻</a></td>
</tr>
</table>

View File

@ -20,14 +20,14 @@
#include <vector>
// CLI Library includes
#include "CLI/ConfigFwd.hpp"
#include "CLI/Error.hpp"
#include "CLI/FormatterFwd.hpp"
#include "CLI/Macros.hpp"
#include "CLI/Option.hpp"
#include "CLI/Split.hpp"
#include "CLI/StringTools.hpp"
#include "CLI/TypeTools.hpp"
#include "ConfigFwd.hpp"
#include "Error.hpp"
#include "FormatterFwd.hpp"
#include "Macros.hpp"
#include "Option.hpp"
#include "Split.hpp"
#include "StringTools.hpp"
#include "TypeTools.hpp"
namespace CLI {
@ -719,7 +719,7 @@ class App {
version_ptr_ = add_flag_callback(
flag_name,
[versionString]() { throw(CLI::CallForVersion(versionString, 0)); },
"display program version information and exit");
"Display program version information and exit");
version_ptr_->configurable(false);
}
@ -738,7 +738,7 @@ class App {
version_ptr_ = add_flag_callback(
flag_name,
[vfunc]() { throw(CLI::CallForVersion(vfunc(), 0)); },
"display program version information and exit");
"Display program version information and exit");
version_ptr_->configurable(false);
}

View File

@ -9,28 +9,28 @@
// CLI Library includes
// Order is important for combiner script
#include "CLI/Version.hpp"
#include "Version.hpp"
#include "CLI/Macros.hpp"
#include "Macros.hpp"
#include "CLI/StringTools.hpp"
#include "StringTools.hpp"
#include "CLI/Error.hpp"
#include "Error.hpp"
#include "CLI/TypeTools.hpp"
#include "TypeTools.hpp"
#include "CLI/Split.hpp"
#include "Split.hpp"
#include "CLI/ConfigFwd.hpp"
#include "ConfigFwd.hpp"
#include "CLI/Validators.hpp"
#include "Validators.hpp"
#include "CLI/FormatterFwd.hpp"
#include "FormatterFwd.hpp"
#include "CLI/Option.hpp"
#include "Option.hpp"
#include "CLI/App.hpp"
#include "App.hpp"
#include "CLI/Config.hpp"
#include "Config.hpp"
#include "CLI/Formatter.hpp"
#include "Formatter.hpp"

View File

@ -13,9 +13,9 @@
#include <utility>
#include <vector>
#include "CLI/App.hpp"
#include "CLI/ConfigFwd.hpp"
#include "CLI/StringTools.hpp"
#include "App.hpp"
#include "ConfigFwd.hpp"
#include "StringTools.hpp"
namespace CLI {

View File

@ -12,8 +12,8 @@
#include <string>
#include <vector>
#include "CLI/Error.hpp"
#include "CLI/StringTools.hpp"
#include "Error.hpp"
#include "StringTools.hpp"
namespace CLI {

View File

@ -13,7 +13,7 @@
#include <vector>
// CLI library includes
#include "CLI/StringTools.hpp"
#include "StringTools.hpp"
namespace CLI {

View File

@ -10,8 +10,8 @@
#include <string>
#include <vector>
#include "CLI/App.hpp"
#include "CLI/FormatterFwd.hpp"
#include "App.hpp"
#include "FormatterFwd.hpp"
namespace CLI {

View File

@ -11,7 +11,7 @@
#include <utility>
#include <vector>
#include "CLI/StringTools.hpp"
#include "StringTools.hpp"
namespace CLI {

View File

@ -15,11 +15,11 @@
#include <utility>
#include <vector>
#include "CLI/Error.hpp"
#include "CLI/Macros.hpp"
#include "CLI/Split.hpp"
#include "CLI/StringTools.hpp"
#include "CLI/Validators.hpp"
#include "Error.hpp"
#include "Macros.hpp"
#include "Split.hpp"
#include "StringTools.hpp"
#include "Validators.hpp"
namespace CLI {

View File

@ -11,8 +11,8 @@
#include <utility>
#include <vector>
#include "CLI/Error.hpp"
#include "CLI/StringTools.hpp"
#include "Error.hpp"
#include "StringTools.hpp"
namespace CLI {
namespace detail {

View File

@ -6,9 +6,9 @@
#pragma once
#include "CLI/Macros.hpp"
#include "CLI/StringTools.hpp"
#include "CLI/TypeTools.hpp"
#include "Macros.hpp"
#include "StringTools.hpp"
#include "TypeTools.hpp"
#include <cmath>
#include <cstdint>

View File

@ -128,6 +128,7 @@ def MakeHeader(
base_dir = os.path.abspath(os.path.join(DIR, include_dir))
main_header = os.path.join(base_dir, main_header)
header_dir = os.path.dirname(main_header)
licence_file = os.path.abspath(os.path.join(DIR, "../LICENSE"))
with open(licence_file) as f:
@ -138,7 +139,7 @@ def MakeHeader(
include_files = includes_local.findall(header)
headers = [HeaderFile(base_dir, inc) for inc in include_files]
headers = [HeaderFile(header_dir, inc) for inc in include_files]
single_header = reduce(add, headers)
if macro is not None: