Squashed 'libs/CommService/' content from commit 7ccc0fc
git-subtree-dir: libs/CommService git-subtree-split: 7ccc0fce88bbc5969df060058cf0fb57abe3bcf9
This commit is contained in:
16
libs/CLI11/test_package/CMakeLists.txt
Normal file
16
libs/CLI11/test_package/CMakeLists.txt
Normal 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)
|
||||
21
libs/CLI11/test_package/conanfile.py
Normal file
21
libs/CLI11/test_package/conanfile.py
Normal 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)
|
||||
20
libs/CLI11/test_package/example.cpp
Normal file
20
libs/CLI11/test_package/example.cpp
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user