Squashed 'libs/cli11/' content from commit dcbcb47
git-subtree-dir: libs/cli11 git-subtree-split: dcbcb4721dda5dab0a56d9faaaee50e6a30f7758
This commit is contained in:
10
tests/mesonTest/README.md
Normal file
10
tests/mesonTest/README.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# CLI11 Meson test / example
|
||||
|
||||
Requirements: meson, ninja
|
||||
|
||||
## Build
|
||||
|
||||
```bash
|
||||
meson build
|
||||
ninja -C build
|
||||
```
|
||||
17
tests/mesonTest/main.cpp
Normal file
17
tests/mesonTest/main.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
// Copyright (c) 2017-2021, University of Cincinnati, developed by Henry Schreiner
|
||||
// under NSF AWARD 1414736 and by the respective contributors.
|
||||
// All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
#include <CLI/CLI.hpp>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
CLI::App app{"App description"};
|
||||
|
||||
std::string filename = "default";
|
||||
app.add_option("-f,--file", filename, "A help string");
|
||||
|
||||
CLI11_PARSE(app, argc, argv);
|
||||
return 0;
|
||||
}
|
||||
5
tests/mesonTest/meson.build
Normal file
5
tests/mesonTest/meson.build
Normal file
@@ -0,0 +1,5 @@
|
||||
project('mesonTest', ['c', 'cpp'], default_options: ['cpp_std=c++11'])
|
||||
|
||||
cli11_dep = subproject('CLI11').get_variable('CLI11_dep')
|
||||
|
||||
mainExe = executable('main', ['main.cpp'], dependencies: [cli11_dep])
|
||||
Reference in New Issue
Block a user