1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-04-30 20:53:52 +00:00

Output tag too

This commit is contained in:
Henry Fredrick Schreiner 2017-02-06 14:40:52 -05:00
parent 9e142893b7
commit 82a9523f71
2 changed files with 8 additions and 2 deletions

View File

@ -28,7 +28,9 @@ So, this library was designed to provide a great syntax, good compiler compatibi
## Installing
To use, copy CLI11.hpp into your include directory, and you are set. This is combined from the source files for every release.
To use, there are two methods.
1. Copy `CLI11.hpp` from the [most recent release](https://github.com/henryiii/CLI11/releases) into your include directory, and you are set. This is combined from the source files for every release.
2. To be added.
To build the tests, get the entire directory and use CMake:

View File

@ -7,6 +7,7 @@ from __future__ import print_function, unicode_literals
import re
import argparse
from pathlib import Path
from subprocess import check_output
includes_local = re.compile(r"""^#include "(.*)"$""", re.MULTILINE)
includes_system = re.compile(r"""^#include \<(.*)\>$""", re.MULTILINE)
@ -14,6 +15,8 @@ includes_system = re.compile(r"""^#include \<(.*)\>$""", re.MULTILINE)
DIR = Path(__file__).resolve().parent
BDIR = DIR.parent / 'include'
TAG = check_output(['git', 'describe', '--tags', '--always'], cwd=str(DIR)).decode("utf-8")
def MakeHeader(out):
main_header = BDIR / 'CLI/CLI.hpp'
with main_header.open() as f:
@ -40,10 +43,11 @@ def MakeHeader(out):
// file LICENSE or https://github.com/henryiii/CLI11 for details.
// This file was generated using MakeSingleHeader.py in CLI11/scripts
// from: {tag}
// This has the complete CLI library in one file.
{header_list}
{output}'''.format(header_list=header_list, output=output)
{output}'''.format(header_list=header_list, output=output, tag=TAG)
with Path(out).open('w') as f:
f.write(output)