Restarted the production of the app

This commit is contained in:
Henry Winkel
2023-08-09 15:23:10 +02:00
parent b71f3b3bdf
commit 55ad5000dd
970 changed files with 453 additions and 79862 deletions

View File

@@ -0,0 +1,16 @@
project(PackageTest CXX)
cmake_minimum_required(VERSION 3.1)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
message(STATUS "${CMAKE_PREFIX_PATH}")
find_package(CLI11 CONFIG REQUIRED)
add_executable(example example.cpp)
target_link_libraries(example CLI11::CLI11)

View File

@@ -0,0 +1,21 @@
from conans import ConanFile, CMake, tools
import os
class HelloTestConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake"
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def imports(self):
self.copy("*.dll", dst="bin", src="bin")
self.copy("*.dylib*", dst="bin", src="lib")
def test(self):
if not tools.cross_building(self.settings):
os.chdir("bin")
self.run(".%sexample" % os.sep)

View File

@@ -0,0 +1,20 @@
// This file is a "Hello, world!" CLI11 program
#include "CLI/CLI.hpp"
#include <iostream>
int main(int argc, char **argv) {
CLI::App app("Some nice description");
int x = 0;
app.add_option("-x", x, "an integer value")->capture_default_str();
bool flag;
app.add_flag("-f,--flag", flag, "a flag option");
CLI11_PARSE(app, argc, argv);
return 0;
}