File: build

package info (click to toggle)
cli11 2.1.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,592 kB
  • sloc: cpp: 19,206; python: 140; sh: 64; makefile: 12; ruby: 6
file content (42 lines) | stat: -rwxr-xr-x 811 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh
# autopkgtest check: very few things to test without other subcommands
# (C) 2021 Jose Luis Rivero
# Author: Jose Luis Rivero <jrivero@osrfoundation.org>

set -e

WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR

cat <<EOF > CMakeLists.txt
cmake_minimum_required(VERSION 3.5)

project(cli_test VERSION 1.0.0)

find_package(CLI11 2.0.0 REQUIRED)
add_executable(cli_test cli_test.cc)
EOF

cat <<EOF2 > cli_test.cc
#include <CLI/CLI.hpp>
#include <string>

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;
}
EOF2

cmake .
echo "configure: OK"
make
echo "build: OK"

./cli_test
echo "cli_test run: OK"