All the stories begin at installation

news2024/11/15 17:25:47

Before installation, there are some key points about Conan:

  1. “Conan is a dependency and package manager for C and C++ languages.”
  2. “With full binary management, Conan can create and reuse any number of different binaries (for different configurations like architectures, compiler versions, etc.) for any number of different versions of a package, using exactly the same process in all platforms.”
  3. “As it is decentralized, it is easy to run your own server to host your own packages and binaries privately, without needing to share them.”
  4. On the server side: “The free JFrog Artifactory Community Edition (CE) is the recommended Conan server to host your own packages privately under your control.”
  5. On the client side: What one needs is a Conan client.
  6. Simply put, JFrog for server and Conan for client.
  7. “Conan is a decentralized package manager with a client-server architecture. This means that clients can fetch packages from, as well as upload packages to, different servers (“remotes”), similar to the “git” push-pull model to/from git remotes.”
  8. “At a high level, the servers are just storing packages. They do not build nor create the packages. The packages are created by the client, and if binaries are built from sources, that compilation is also done by the client application.”
    在这里插入图片描述
  9. “The Conan client: this is a console/terminal command-line application, containing the heavy logic for package creation and consumption. Conan client has a local cache for package storage, and so it allows you to fully create and test packages offline. You can also work offline as long as no new packages are needed from remote servers.”
  10. “JFrog Artifactory Community Edition (CE) is the recommended Conan server to host your own packages privately under your control. It is a free community edition of JFrog Artifactory for Conan packages, including a WebUI, multiple auth protocols (LDAP), Virtual and Remote repositories to create advanced topologies, a Rest API, and generic repositories to host any artifact.”
  11. “ConanCenter is a central public repository where the community contributes packages for popular open-source libraries like Boost, Zlib, OpenSSL, Poco, etc.”
    在这里插入图片描述
  12. The basic unit of conan project is a package. And a package is defined by a file “conanfile.py” that defines the package’s dependencies, sources, how to build the binaries from sources, etc. One package “conanfile.py” recipe can generate any arbitrary number of binaries, one for each different platform and configuration: operating system, architecture, compiler, build type, etc.
  13. “These binaries can be created and uploaded to a server with the same commands in all platforms, having a single source of truth for all packages and not requiring a different solution for every different operating system.”
  14. “Installation of packages from servers is also very efficient. Only the necessary binaries for the current platform and configuration are downloaded, not all of them. If the compatible binary is not available, the package can be built from sources in the client too.”

An example about conanfile.py

from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout


class HelloConan(ConanFile):
    name = "hello"
    version = "0.1"

    # Optional metadata
    license = "<Put the package license here>"
    author = "<Put your name here> <And your email here>"
    url = "<Package recipe repository url here, for issues about the package>"
    description = "<Description of Hello here>"
    topics = ("<Put some tag here>", "<here>", "<and here>")

    # Binary configuration
    settings = "os", "compiler", "build_type", "arch"
    options = {"shared": [True, False], "fPIC": [True, False]}
    default_options = {"shared": False, "fPIC": True}

    # Sources are located in the same place as this recipe, copy them to the recipe
    exports_sources = "CMakeLists.txt", "src/*", "include/*"

    def config_options(self):
        if self.settings.os == "Windows":
            del self.options.fPIC

    def layout(self):
        cmake_layout(self)

    def generate(self):
        tc = CMakeToolchain(self)
        tc.generate()

    def build(self):
        cmake = CMake(self)
        cmake.configure()
        cmake.build()

    def package(self):
        cmake = CMake(self)
        cmake.install()

    def package_info(self):
        self.cpp_info.libs = ["hello"]

The directory structure of a Conan package

2024/01/20  21:52    <DIR>          .
2024/01/20  21:52    <DIR>          ..
2023/05/01  17:30               235 CMakeLists.txt
2023/05/01  17:30             1,307 conanfile.py
2023/05/01  16:55    <DIR>          include
2023/05/01  17:01    <DIR>          src
               2 个文件          1,542 字节
               4 个目录 66,603,655,168 可用字节

Installation of Conan

# pip install conan

To install Conan using pip, you need Python>=3.6 distribution installed on your machine.

Installation of JFrog

Download jfrog-artifactory-cpp-ce-7.55.10-linux.tar.gz from web site https://conan.io/downloads, and the Decompression is the Installation.

References

  1. Conan Documentation --Release 1.58.0

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1402944.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

实时asr新服务串讲

1.背景及现状 工程方面目前语音相关服务存在大量重复代码&#xff0c;逻辑复杂&#xff0c;文档缺失&#xff0c;并且某些细节设计不合理。基于目前现状&#xff0c;代码业务与功能耦合严重&#xff0c;迭代困难&#xff0c;将来增加新的能力也需要改动音频数据相关代码&#x…

Vue 实例创建流程

✨ 专栏介绍 在当今Web开发领域中&#xff0c;构建交互性强、可复用且易于维护的用户界面是至关重要的。而Vue.js作为一款现代化且流行的JavaScript框架&#xff0c;正是为了满足这些需求而诞生。它采用了MVVM架构模式&#xff0c;并通过数据驱动和组件化的方式&#xff0c;使…

带大家做一个,易上手的家常葱爆牛肉

先准备一块牛肉 划水去冰 然后多清洗几次 尽力洗出血水 准备 大葱: 主要根据牛肉的量来。和我这块牛肉差不多的 三分之二根就够了。 三四个干辣椒 主要看你想让它有多辣 两瓣大蒜 大葱切段 干辣椒就原样就好 大蒜去皮切片 牛肉切片 起锅烧油 油烧热后 下牛肉翻炒 牛肉完全…

RPC框架简介

RPC定义 远程过程调用&#xff08;Remote Procedure Call&#xff09;。RPC的目的就是让构建分布式计算&#xff08;应用&#xff09;更加简单&#xff0c;在提供强大的调用远程调用的同时不失去简单的本地调用的语义简洁性 RPC整体架构 服务端启动时首先将自己的服务节点信息…

vue生命周期图示

详见&#xff1a;官网介绍

MyBatis 的XML实现方法(JAVA)

数据库表的结构如下&#xff1a; DROP DATABASE IF EXISTS test; CREATE DATABASE test DEFAULT CHARACTER SET utf8mb4; -- 使⽤数据数据 USE test; -- 创建表[⽤⼾表] DROP TABLE IF EXISTS userinfo; CREATE TABLE userinfo ( id INT ( 11 ) NOT NULL AUTO_INCREMENT, user…

【Linux】权限 !

Linux 权限 Liunx Linux 权限1 什么是权限1.1 Linux用户1.2 切换用户 2 权限管理2.1 文件访问者的分类2.2 文件类型和访问权限2.3 文件权限的设置方法chmod 命令chown 命令chgrp 命令umask 命令file 指令 2.4 目录权限粘滞位 3 权限总结 1 什么是权限 关于Linux的权限问题&…

vivado 接口、端口映射

接口 重要&#xff01;接口只能在“fpga”类型的&#xff1c;component&#xff1e;中定义。接口部分提供了<component>上所有可用物理接口的列表。<interfaces>部分包含嵌套在其中的一个或多个<interface>标记。一个接口是通过使用<port_map>标记由多…

OpenGL DIR

Mesa简介-CSDN博客 Mesa, also called Mesa3D and The Mesa 3D Graphics Library, is an open source software implementation of OpenGL, Vulkan, and other graphics API specifications. Mesa translates these specifications to vendor-specific graphics ha…

一维数组2和二维数组1

1.一维数组在内存中的储存 在前面创建的数组中&#xff0c;每个元素是怎么储存的呢&#xff1f;我们通过观察元素的地址来看看吧。 %p是用来打印地址的。 结果为&#xff1a; 由此可看出每个地址都相隔一个int类型的距离&#xff0c;可以看出数组在内存中是连续存放的。也就是…

2024美赛数学建模思路 - 案例:最短时间生产计划安排

文章目录 0 赛题思路1 模型描述2 实例2.1 问题描述2.2 数学模型2.2.1 模型流程2.2.2 符号约定2.2.3 求解模型 2.3 相关代码2.4 模型求解结果 建模资料 0 赛题思路 &#xff08;赛题出来以后第一时间在CSDN分享&#xff09; https://blog.csdn.net/dc_sinor?typeblog 1 模型…

51单片机驱动点阵屏

目录 1设计目的 2设计方案 2.1材料选择 2.2电源设计 2.3控制设计 3焊接调试 3.1焊接 3.2调试 4程序 1设计目的 此次设计的东西是一个点阵屏&#xff0c;通过点阵屏实现电梯屏幕功能。显示内容包括向上运行箭头和向下运行箭头&#xff0c;以及1-12的楼层。 2设计方案 …

龟兔再跑

欢迎来到程序小院 龟兔再跑 玩法&#xff1a;乌龟跳绳&#xff0c;点击鼠标左键乌龟跳跃&#xff0c;两只乌龟一直不停的甩绳子&#xff0c;另外一只乌龟从中跳过&#xff0c;赶快去跳绳吧^^。开始游戏https://www.ormcc.com/play/gameStart/255 html <div class"mai…

Vue开发者工具是什么?有哪些?

Vue开发者工具是什么&#xff1f; Vue开发者工具是用于Vue.js开发的浏览器扩展&#xff0c;提供了许多有用的功能和工具&#xff0c;帮助开发者更轻松地开发和调试Vue.js应用程序。 Vue开发者工具的功能特点有哪些&#xff1f; 1、组件树视图&#xff1a;Vue开发者工具可以显…

STM32-调用 vTaskStartScheduler API 后出现 HardFault

STM32 移植 FreeRTOS 后调用 vTaskStartScheduler() 后出现 HardFault 异常。 原因分析&#xff1a; FreeRTOS 配置头文件 FreeRTOSConfig.h 中与中断有关的配置和通过系统接口 void NVIC_PriorityGroupConfig(uint32_t NVIC_PriorityGroup) 设置的中断分组冲突。 /* The lo…

Java NIO (三)NIO Channel类

1 概述 前面提到&#xff0c;Java NIO中一个socket连接使用一个Channel来表示。从更广泛的层面来说&#xff0c;一个通道可以表示一个底层的文件描述符&#xff0c;例如硬件设备、文件、网络连接等。然而&#xff0c;远不止如此&#xff0c;Java NIO的通道可以更加细化。例如&a…

Python并发编程的概念和重要性

并发编程是一种编程方式&#xff0c;它允许在单台处理器上同时处理多个任务或操作。这些任务可以在单个处理器上通过时间分片技术实现&#xff0c;也可以在多核或多处理器系统上真正地并行执行。并发性对于提高系统资源利用率、提升应用程序性能以及改善用户体验都至关重要。 并…

计算机网络-分层结构,协议,接口,服务

文章目录 总览为什么要分层怎样分层正式认识分层概念小结 总览 为什么要分层 发送文件前要做的准备工作很多 把这个准备工作分层小问题解决&#xff0c;也就分层解决 怎样分层 每层相互独立&#xff0c;每层做的工作不同 界面自然清晰&#xff0c;层与层之间的接口能够体现…

JS-日期对象

日期对象&#xff1a;用来表示时间的对象 作用&#xff1a;可以得到当前系统时间 实例化 在代码中发现了new关键字时&#xff0c;一般将这个操作称为实例化 创建一个时间对象并获取时间 1&#xff09;获得当前时间 const datenew Date() 2)获得指定时间 const datenew D…

蓝桥杯理历年真题 —— 数学

1. 买不到的数目 这道题目&#xff0c;考得就是一个日常数学的积累&#xff0c;如果你学过这个公式的话&#xff0c;就是一道非常简单的输出问题&#xff1b;可是如果没学过&#xff0c;就非常吃亏&#xff0c;在考场上只能暴力求解&#xff0c;或是寻找规律。这就要求我们什么…