Commit a06c730f authored by Pádraig Ó Conbhuí's avatar Pádraig Ó Conbhuí
Browse files

external: Add CLI11 v1.8.0 as external dependency.

parents 7a1370d0 96fe07de
branches:
only:
- master
install:
- git submodule update --init --recursive
- set PATH=C:\Python36;%PATH%
- cmake --version
- pip install conan
- conan user
- conan --version
build_script:
- mkdir build
- cd build
- ps: cmake .. -DCLI11_WARNINGS_AS_ERRORS=ON -DCLI11_SINGLE_FILE_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_GENERATOR="Visual Studio 14 2015"
- ps: cmake --build .
- cd ..
- conan create . CLIUtils/CLI11
test_script:
- cd build
- ps: ctest --output-on-failure -C Debug
notifications:
- provider: Webhook
url: https://webhooks.gitter.im/e/0185e91c5d989a476d7b
on_build_success: false
on_build_failure: true
on_build_status_changed: true
steps:
- task: CMake@1
inputs:
cmakeArgs: .. -DCLI11_WARNINGS_AS_ERRORS=ON -DCLI11_SINGLE_FILE=$(cli11.single) -DCLI11_CXX_STD=$(cli11.std) -DCLI11_SINGLE_FILE_TESTS=$(cli11.single) -DCMAKE_BUILD_TYPE=$(cli11.build_type) $(cli11.options)
displayName: 'Configure'
- script: cmake --build .
displayName: 'Build'
workingDirectory: build
steps:
# Note that silkeh/clang does not include ca-certificates, so check the shasum for verification
- bash: |
wget --no-check-certificate "https://cmake.org/files/v3.14/cmake-3.14.3-Linux-x86_64.tar.gz"
echo "29faa62fb3a0b6323caa3d9557e1a5f1205614c0d4c5c2a9917f16a74f7eff68 cmake-3.14.3-Linux-x86_64.tar.gz" | shasum -sca 256
displayName: Download CMake
- task: ExtractFiles@1
inputs:
archiveFilePatterns: 'cmake*.tar.gz'
destinationFolder: 'cmake_program'
displayName: Extract CMake
- bash: echo "##vso[task.prependpath]$(Build.SourcesDirectory)/cmake_program/cmake-3.14.3-Linux-x86_64/bin"
displayName: Add CMake to PATH
steps:
- script: ctest --output-on-failure -C $(cli11.build_type) -T test
displayName: 'Test'
workingDirectory: build
- task: PublishTestResults@2
inputs:
testResultsFormat: 'cTest'
testResultsFiles: '**/Test.xml'
#!/bin/sh
################################################################################
# Title : generateDocumentationAndDeploy.sh
# Date created : 2016/02/22
# Notes :
# Author : Jeroen de Bruijn
# Preconditions:
# - Packages doxygen doxygen-doc doxygen-latex doxygen-gui graphviz
# must be installed.
# - Doxygen configuration file must have the destination directory empty and
# source code directory with a $(TRAVIS_BUILD_DIR) prefix.
# - An gh-pages branch should already exist. See below for mor info on hoe to
# create a gh-pages branch.
#
# Required global variables:
# - TRAVIS_BUILD_NUMBER : The number of the current build.
# - TRAVIS_COMMIT : The commit that the current build is testing.
# - DOXYFILE : The Doxygen configuration file.
# - TRAVIS_REPO_SLUG : The username / reponame for the repository.
# - GH_REPO_TOKEN : Secure token to the github repository.
#
# For information on how to encrypt variables for Travis CI please go to
# https://docs.travis-ci.com/user/environment-variables/#Encrypted-Variables
# or https://gist.github.com/vidavidorra/7ed6166a46c537d3cbd2
# For information on how to create a clean gh-pages branch from the master
# branch, please go to https://gist.github.com/vidavidorra/846a2fc7dd51f4fe56a0
#
# This script will generate Doxygen documentation and push the documentation to
# the gh-pages branch of a repository specified by GH_REPO_REF.
# Before this script is used there should already be a gh-pages branch in the
# repository.
#
################################################################################
################################################################################
##### Setup this script and get the current gh-pages branch. #####
echo 'Setting up the script...'
# Exit with nonzero exit code if anything fails
set -e
GH_REPO_ORG=$(echo $TRAVIS_REPO_SLUG | cut -d "/" -f 1)
GH_REPO_NAME=$(echo $TRAVIS_REPO_SLUG | cut -d "/" -f 2)
GH_REPO_REF="github.com/$GH_REPO_ORG/$GH_REPO_NAME.git"
# Create a clean working directory for this script.
# Get the current gh-pages branch
cd docs
git clone -b gh-pages https://git@$GH_REPO_REF html
cd html
##### Configure git.
# Set the push default to simple i.e. push only the current branch.
git config --global push.default simple
# Pretend to be an user called Travis CI.
git config user.name "Travis CI"
git config user.email "travis@travis-ci.org"
# Remove everything currently in the gh-pages branch.
# GitHub is smart enough to know which files have changed and which files have
# stayed the same and will only update the changed files. So the gh-pages branch
# can be safely cleaned, and it is sure that everything pushed later is the new
# documentation.
rm -rf *
# Need to create a .nojekyll file to allow filenames starting with an underscore
# to be seen on the gh-pages site. Therefore creating an empty .nojekyll file.
# Presumably this is only needed when the SHORT_NAMES option in Doxygen is set
# to NO, which it is by default. So creating the file just in case.
echo "" > .nojekyll
################################################################################
##### Generate the Doxygen code documentation and log the output. #####
echo 'Generating Doxygen code documentation...'
# Redirect both stderr and stdout to the log file AND the console.
cd ..
doxygen $DOXYFILE 2>&1 | tee doxygen.log
################################################################################
##### Upload the documentation to the gh-pages branch of the repository. #####
# Only upload if Doxygen successfully created the documentation.
# Check this by verifying that the html directory and the file html/index.html
# both exist. This is a good indication that Doxygen did it's work.
if [ -d "html" ] && [ -f "html/index.html" ]; then
cd html
echo 'Uploading documentation to the gh-pages branch...'
# Add everything in this directory (the Doxygen code documentation) to the
# gh-pages branch.
# GitHub is smart enough to know which files have changed and which files have
# stayed the same and will only update the changed files.
git add --all
# Commit the added files with a title and description containing the Travis CI
# build number and the GitHub commit reference that issued this build.
git commit -m "Deploy code docs to GitHub Pages Travis build: ${TRAVIS_BUILD_NUMBER}" -m "Commit: ${TRAVIS_COMMIT}"
# Force push to the remote gh-pages branch.
# The ouput is redirected to /dev/null to hide any sensitive credential data
# that might otherwise be exposed.
git push --force "https://${GH_REPO_TOKEN}@${GH_REPO_REF}" > /dev/null 2>&1
else
echo '' >&2
echo 'Warning: No documentation (html) files have been found!' >&2
echo 'Warning: Not going to push the documentation to GitHub!' >&2
exit 1
fi
#!/bin/env sh
# (Source me)
set -evx
DOXYGEN_URL="http://doxygen.nl/files/doxygen-1.8.15.src.tar.gz"
cd "${DEPS_DIR}"
if [[ ! -f "${DEPS_DIR}/doxygen/build/bin/doxygen" ]] ; then
echo "Downloading Doxygen"
mkdir -p doxygen
travis_retry wget --no-check-certificate --quiet -O - "${DOXYGEN_URL}" | tar --strip-components=1 -xz -C doxygen
cd doxygen
mkdir -p build
cd build
cmake ..
make -j2
fi
export PATH="${DEPS_DIR}/doxygen/build/bin:${PATH}"
cd "${TRAVIS_BUILD_DIR}"
set +evx
#!/bin/env sh
# (Source me)
set -evx
LCOV_URL="http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.13.orig.tar.gz"
cd "${DEPS_DIR}"
if [[ ! -f "${DEPS_DIR}/lcov/bin/lcov" ]] ; then
echo "Downloading lcov"
mkdir -p lcov
travis_retry wget --no-check-certificate --quiet -O - "${LCOV_URL}" | tar --strip-components=1 -xz -C lcov
fi
export PATH="${DEPS_DIR}/lcov/bin:${PATH}"
cd "${TRAVIS_BUILD_DIR}"
set +evx
#!/usr/bin/env bash
echo -en "travis_fold:start:script.build\\r"
echo "Building..."
STD=$1
shift
set -evx
mkdir -p build
cd build
cmake .. -DCLI11_WARNINGS_AS_ERRORS=ON -DCLI11_SINGLE_FILE=ON -DCLI11_CXX_STD=$STD -DCLI11_SINGLE_FILE_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=ccache $@
cmake --build . -- -j2
set +evx
echo -en "travis_fold:end:script.build\\r"
echo -en "travis_fold:start:script.test\\r"
echo "Testing..."
set -evx
ctest --output-on-failure
set +evx
echo -en "travis_fold:end:script.test\\r"
#!/usr/bin/env bash
echo -en "travis_fold:start:script.build\\r"
echo "Building..."
set -evx
cd ${TRAVIS_BUILD_DIR}
mkdir -p build
cd build
cmake .. -DCLI11_SINGLE_FILE_TESTS=OFF -DCLI11_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Coverage
cmake --build . -- -j2
cmake --build . --target CLI11_coverage
set +evx
echo -en "travis_fold:end:script.build\\r"
echo -en "travis_fold:start:script.lcov\\r"
echo "Capturing and uploading LCov..."
set -evx
lcov --directory . --capture --output-file coverage.info # capture coverage info
lcov --remove coverage.info '*/tests/*' '*/examples/*' '*gtest*' '*gmock*' '/usr/*' --output-file coverage.info # filter out system
lcov --list coverage.info #debug info
# Uploading report to CodeCov
bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
set +evx
echo -en "travis_fold:end:script.lcov\\r"
Language: Cpp
BasedOnStyle: LLVM
# AccessModifierOffset: -2
# AlignAfterOpenBracket: Align
# AlignConsecutiveAssignments: false
# AlignConsecutiveDeclarations: false
# AlignEscapedNewlinesLeft: false
# AlignOperands: true
# AlignTrailingComments: true
# AllowAllParametersOfDeclarationOnNextLine: true
# AllowShortBlocksOnASingleLine: false
# AllowShortCaseLabelsOnASingleLine: false
# AllowShortFunctionsOnASingleLine: All
# AllowShortIfStatementsOnASingleLine: false
# AllowShortLoopsOnASingleLine: false
# AlwaysBreakAfterDefinitionReturnType: None
# AlwaysBreakAfterReturnType: None
# AlwaysBreakBeforeMultilineStrings: false
# AlwaysBreakTemplateDeclarations: false
BinPackArguments: false
BinPackParameters: false
# BraceWrapping:
# AfterClass: false
# AfterControlStatement: false
# AfterEnum: false
# AfterFunction: false
# AfterNamespace: false
# AfterObjCDeclaration: false
# AfterStruct: false
# AfterUnion: false
# BeforeCatch: false
# BeforeElse: false
# IndentBraces: false
# BreakBeforeBinaryOperators: None
# BreakBeforeBraces: Attach
# BreakBeforeTernaryOperators: true
# BreakConstructorInitializersBeforeComma: false
# BreakAfterJavaFieldAnnotations: false
# BreakStringLiterals: true
ColumnLimit: 120
# CommentPragmas: '^ IWYU pragma:'
# ConstructorInitializerAllOnOneLineOrOnePerLine: false
# ConstructorInitializerIndentWidth: 4
# ContinuationIndentWidth: 4
# Cpp11BracedListStyle: true
# DerivePointerAlignment: false
# DisableFormat: false
# ExperimentalAutoDetectBinPacking: false
# ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
# IncludeIsMainRegex: '$'
# IndentCaseLabels: false
IndentWidth: 4
# IndentWrappedFunctionNames: false
# JavaScriptQuotes: Leave
# JavaScriptWrapImports: true
# KeepEmptyLinesAtTheStartOfBlocks: true
# MacroBlockBegin: ''
# MacroBlockEnd: ''
# MaxEmptyLinesToKeep: 1
# NamespaceIndentation: None
# ObjCBlockIndentWidth: 2
# ObjCSpaceAfterProperty: false
# ObjCSpaceBeforeProtocolList: true
# PenaltyBreakBeforeFirstCallParameter: 19
# PenaltyBreakComment: 300
# PenaltyBreakFirstLessLess: 120
# PenaltyBreakString: 1000
# PenaltyExcessCharacter: 1000000
# PenaltyReturnTypeOnItsOwnLine: 60
# PointerAlignment: Right
# ReflowComments: true
SortIncludes: false
# SpaceAfterCStyleCast: false
# SpaceAfterTemplateKeyword: true
# SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: Never
# SpaceInEmptyParentheses: false
# SpacesBeforeTrailingComments: 1
# SpacesInAngles: false
# SpacesInContainerLiterals: true
# SpacesInCStyleCastParentheses: false
# SpacesInParentheses: false
# SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 4
UseTab: Never
#Checks: '*,-clang-analyzer-alpha.*'
#Checks: '-*,google-readability-casting,llvm-namespace-comment,performance-unnecessary-value-param,llvm-include-order,misc-throw-by-value-catch-by-reference,readability-container-size-empty,google-runtime-references,modernize*'
Checks: '-*,llvm-namespace-comment,readability-container-size-empty,misc-throw-by-value-catch-by-reference,modernize*,google-readability-casting'
HeaderFilterRegex: '.*hpp'
CheckOptions:
- key: readability-braces-around-statements.ShortStatementLines
value: '1'
ignore:
- "tests"
- "examples"
root = true
[*]
indent_style = space
indent_size = 4
insert_final_newline = true
end_of_line = lf
trim_trailing_whitespace = true
[*.yml]
indent_size = 2
Thanks for considering to write a Pull Request (PR) for CLI11! Here are a few guidelines to get you started:
Make sure you are comfortable with the license; all contributions are licensed under the original license.
## Adding functionality
Make sure any new functions you add are are:
* Documented by `///` documentation for Doxygen
* Mentioned in the instructions in the README, though brief mentions are okay
* Explained in your PR (or previously explained in an Issue mentioned in the PR)
* Completely covered by tests
In general, make sure the addition is well thought out and does not increase the complexity of CLI11 needlessly.
## Things you should know:
* Once you make the PR, tests will run to make sure your code works on all supported platforms
* The test coverage is also measured, and that should remain 100%
* Formatting should be done with clang-format, otherwise the format check will not pass. However, it is trivial to apply this to your PR, so don't worry about this check. If you do have clang-format, just run `scripts/check_style.sh`
* Everything must pass clang-tidy as well, run with `-DCLANG_TIDY_FIX-ON` (make sure you use a single threaded build process!)
Note that the style check is really just:
```bash
git ls-files -- '.cpp' '.hpp' | xargs clang-format -i -style=file
```
And, if you want to always use it, feel free to install the git hook provided in scripts.
## For developers releasing to Conan.io
This is now done by the CI system on tagged releases. Previously, the steps to make a Conan.io release were:
```bash
conan remove '*' # optional, I like to be clean
conan create . cliutils/stable
conan upload "*" -r cli11 --all
```
Here I've assumed that the remote is `cli11`.
a.out*
*.swp
/*build*
/test_package/build
/Makefile
/CMakeFiles/*
/cmake_install.cmake
[submodule "extern/googletest"]
path = extern/googletest
url = ../../google/googletest.git
[submodule "extern/sanitizers"]
path = extern/sanitizers
url = ../../arsenm/sanitizers-cmake
[submodule "extern/json"]
path = extern/json
url = ../../nlohmann/json.git
language: cpp
dist: trusty
# Exclude ghpages,
# but even better, don't build branch and PR, just PR
# Include tags starting with v and a digit
branches:
only:
- master
- /^v\d/
cache:
apt: true
directories:
- "${TRAVIS_BUILD_DIR}/deps/doxygen"
matrix:
include:
# Default clang
- compiler: clang
script:
- .ci/make_and_test.sh 11
- .ci/make_and_test.sh 14
- .ci/make_and_test.sh 17
# Docs and clang 3.5
- compiler: clang
env:
- DEPLOY_MAT=yes
addons:
apt:
packages:
- clang-3.5
install:
- export CC=clang-3.5
- export CXX=clang++-3.5
script:
- .ci/make_and_test.sh 11
after_success:
- export DOXYFILE=$TRAVIS_BUILD_DIR/docs/Doxyfile
- export DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- |
if [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]
then
. .ci/build_doxygen.sh
.ci/build_docs.sh
fi
# GCC 7 and coverage (8 does not support lcov, wait till 9 and new lcov)
- compiler: gcc
env:
- GCC_VER=7
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- curl
- lcov
install:
- export CC=gcc-7
- export CXX=g++-7
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- cd $TRAVIS_BUILD_DIR
- ". .ci/build_lcov.sh"
- ".ci/run_codecov.sh"
script:
- .ci/make_and_test.sh 11 -DCLI11_EXAMPLE_JSON=ON
- .ci/make_and_test.sh 14 -DCLI11_EXAMPLE_JSON=ON
- .ci/make_and_test.sh 17 -DCLI11_EXAMPLE_JSON=ON
# GCC 4.7 and Conan
- compiler: gcc
env:
- GCC_VER=4.7
addons:
apt:
packages:
- g++-4.7
install:
- export CC=gcc-4.7
- export CXX=g++-4.7
- python -m pip install --user conan
- conan user
script:
- .ci/make_and_test.sh 11
after_success:
- conan create . cliutils/stable
- |
if [ "${TRAVIS_TAG}" ]
then
conan remote add origin https://api.bintray.com/conan/cliutils/CLI11
conan user -p ${BINFROG_API_KEY} -r origin henryiii
conan upload "*" -c -r origin --all
fi
# GCC 4.8
- compiler: gcc
env:
- GCC_VER=4.8
addons:
apt:
packages:
- g++-4.8
install:
- export CC=gcc-4.8
- export CXX=g++-4.8
script:
- .ci/make_and_test.sh 11
install: skip
script:
- .ci/make_and_test.sh 11
- .ci/make_and_test.sh 14
deploy:
provider: releases
api_key:
secure: L1svZ5J+RiR67dj1fNk/XiZRvYfGJC4c5/dKSvDH+yuKSzZ6ODaTiVmYF8NtMJ7/3AQenEa0OuRBVQ0YpngFz3ugIcRsGCDUHtCMK/Bti0+6ZFdICbqcv6W3BlRIM8s7EOBPhjfbCV+ae7xep9B24HmwBPKukMFjDIj4nwBsmwCHZK9iNFtfaW2J2cr2TJo7QPY01J0W1k/boaj91KzHf9UuhEH8KYqp7szv+6kV00W8bRBtugw419dIm25eXFXgXDT9s/OA7qXV7o5FXWWpkyJ5AINVbY9DerkYag5TStrdOyKk+S1FexRG6TMG4L4Jyu/QxQGhMdu0m1yRCLvIekGtWLDnjNrI2SZrd5HbKprQ0O8j1770Is4q5blVPqAZ6O9jVMJRtVEaYbsJwItz1BJWkPT4S9GFbDL1dq2Z5jR2f5gd/cz2yYH56b47iYHWtzSqEfVhsXiN+atD+tWyQFA4Q/av0bGHwJ6LX0A1q0OCHruUMoxcw1QKfYtV1bkf/folL4Z4Hx3CL+NB0Lkqs8LFsQHxODP4a26I5DS/kaDHofotho8wsWlKFDtonZa+CExORGFFMPnGRz2qX5tMgGoo84wcqrprfoQv2llqeUr3gISPl2qxrljAhj3/Dcl7iI7k0Er7Ji8ENpgjSec4aqnBx8Ke2yaDEmBvwbouFCM=
skip_cleanup: true
file: build/include/CLI11.hpp
on:
repo: CLIUtils/CLI11
tags: true
condition: "$DEPLOY_MAT = yes"
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/bbdb3befce4c00448d24
on_success: change
on_failure: always
on_start: never
env:
global:
- secure: cY0OI609iTAxLRYuYQnNMi+H6n0dBwioTAoFXGGRTnngw2V9om3UmY5eUu4HQEQsQZovHdYpNhlSgRmdwQ4UqSp3FGyrwobf0kzacV4bVnMDeXDmHt8RzE5wP/LwDd8elNF6RRYjElY99f0k0FyXVd0fIvuVkGKQECNLOtEk0jQo+4YTh7dhuCxRhBYgTbNiRL6UJynfrcK0YN+DQ+8CJNupu2VxgaEpCSngTfvDHLcddcrXwpvn3MPc3FsDUbtN389ZCIe41qqIL0ATv46DQaTw4FOevyVfRyrBOznONoGCVeAYKL6VBdrk01Fh6aytF5zgI3hKaKobgEn+QFfzR6l68c6APvqA0Qv39iLjuh6KbdIV2YsqXfyt6FBgqP2xZuNEZW1jZ8LxUOLl2I40UEh87nFutvnSbfIzN+FcLrajm2H2jV2kZGNKAMx+4qxkZuXSre4JPkENfJm2WNFAKlqPt4ZSEQarkDYzZPcEr2I9fbGjQYVJICoN4LikCv9K5z7ujpTxCTNbVpQWZcEOT6QQBc6Vml/N/NKAIl9o2OeTLiXCmT31+KQMeO492KYNQ6VmkeqrVhGExOUcJdNyDJV9C+3mSekb3Sq78SneYRKDechkWbMl0ol07wGTdBwQQwgaorjRyn07x1rDxpPr3z19/+eubnpPUW4UQ5MYsjs=
- secure: G6H5HA9pPUgsd96A+uvTxbLjR1rcT9NtxsknIkFDfzGDpffn6wVX+kCIQLf9zFDnQnsfYA/4piiuoBN5U5C7HQrh9UCvBVptXjWviea0Y7CRbMJZpw2rPvXWQtrFNzYkaV7kdJ5B0Mmvh6rcH/I8gKFrkdjF7i7sfzWdFWRU5QXfxXOk2n+xCXX6uFemxHH9850XEjVtnU7YYUebQFaoTYLLy05nlt9JaEF84wfJljY/SJX7I9gpNLtizE9MpJylnrwUeL66OqFievmjL3/bWpPUBjUF0WdtXYlVDja7O582FQDs94ofgqeGieGIMQ0VuovpbQOJSdjs5XHZwu2ce6HZxtOhJJqw6xEwbq43ZdofAlJ5GUEOgrr+j25zIDkdzOhliDKJtw5ysmmTUKEcZ36iWbCE0YP/IC42yOV9oOP6UkgbuwpVDdxAFRgLZLahW9Ok+c1PlzIauPxv+jIEI4rSEEJRKZG2JK3TXUdhd58mHBfQMNjKQMF+Y2wCCGjfMO0q4SgvBhYyb4oBTxEqnc2Pzh2DJdNzRFsV7ktsQSRglHGVI+1XTmQ+2kbBzNOQBLjOuRvDZENUhyxPKGZDHyAOMlVvYm8vvWebM1/F3YgDb/tPh33+EGSvpKkCZ5nUxB5e605H6gdYlNKNhuWKlEKTo2/kF0D39gAUCIcGbzw=
- CCACHE_CPP2: yes
This diff is collapsed.
cmake_minimum_required(VERSION 3.4)
# Note: this is a header only library. If you have an older CMake than 3.4,
# just add the CLI11/include directory and that's all you need to do.
# Make sure users don't get warnings on a tested (3.4 to 3.14) version
# of CMake. For most of the policies, the new version is better (hence the change).
# We don't use the 3.4...3.14 syntax because of a bug in a version of MSVC
if(${CMAKE_VERSION} VERSION_LESS 3.14)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
else()
cmake_policy(VERSION 3.14)
endif()
set(VERSION_REGEX "#define CLI11_VERSION[ \t]+\"(.+)\"")
# Read in the line containing the version
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/include/CLI/Version.hpp"
VERSION_STRING REGEX ${VERSION_REGEX})
# Pick out just the version
string(REGEX REPLACE ${VERSION_REGEX} "\\1" VERSION_STRING "${VERSION_STRING}")
# Add the project
project(CLI11 LANGUAGES CXX VERSION ${VERSION_STRING})
# Special target that adds warnings. Is not exported.
add_library(CLI11_warnings INTERFACE)