You can edit almost every page by Creating an account. Otherwise, see the FAQ.

Conan (software)

From EverybodyWiki Bios & Wiki

Script error: No such module "AfC submission catcheck".


Conan
Developer(s)Diego Rodriguez-Losada,
Luis Martinez de Bartolome
Initial releaseJanuary 12, 2015; 9 years ago (2015-01-12)[1]
Stable release
1.36.0[2] / April 28, 2021; 3 years ago (2021-04-28)
Written inPython
Engine
    Operating systemCross-platform
    TypePackage manager
    LicenseMIT License
    Websiteconan.io

    Search Conan (software) on Amazon.

    Overview[edit]

    Conan is an application-level package manager for the C and C++ programming languages which provides a standard architecture for managing dependencies of C/C++ software and required libraries. This includes a Client application for local Conan operations, and a Server application for hosting Conan repositories enables the sharing of Conan packages across machines. ConanCenter is the canonical public central repository for open-source Conan packages.

    Project History[edit]

    Conan was developed by Diego Rodriguez-Losada Gonzalez and Luis Martinez de Bartolome, who continue to manage the project. They began development in 2015 and made the initial release of 0.4.0 on December 1, 2015.[1] In November 2016, the commercial software company JFrog, Inc. acquired the Conan project,[3] and provide the resources for ongoing development of ConanCenter. Despite this, the Conan project remains open-source.

    Design[edit]

    Like many other package managers, Conan is designed using a client-server model. Users interact with the Client via the command-line, and the Server runs as a network service which listens for connections from the client and responds to requests (primarily to search, upload, and download packages). However, Conan is different from other package managers in its package model. In C and C++ projects, each unique build configuration can produce unique binary artifacts. Thus, Conan's model is uniquely designed to allow a single logical "package reference" to represent any number of unique "binary packages", each of which can be stored, uploaded, and downloaded individually for maximum efficiency. Conan implements this model using a novel a hashing algorithm which takes build configuration data as inputs and produces a unique string known as a "package id" to represent and store each unique binary package. This algorithm also incorporates some user-definable values which enables package authors and package consumers to control which binaries are considered "compatible" and used together in a given build.

    Server Implementations[edit]

    The Conan server API is an open-source API specification which can be implemented separately from the Conan project itself. The following commercial repository hosting applications and services have implemented the Conan server API into their existing platforms.

    Ecosystem Adoption[edit]

    The C and C++ programming languages are central to a long list of open-source and commercial ecosystems. Due to a historical lack of both a standard build system and a standard application-level package manager, most of these ecosystems use a diverse mix of proprietary tools and strategies for dependency management. Developers and tool makers within each of these ecosystems must address a number of common problems which Conan also solves, such as automation for building open-source and private project from source, management of multiple build configurations, binary caching for and others. Many of these developers and tool makers have begun to support integration with Conan as a new unified way to achieve these problems.

    Here is a list of significant public announcements, tutorials, documents, and blog posts from different ecosystems which demonstrate support or adoption of Conan:

    Qt
    Qt is a suite of tools developed and distributed by Qt Group which enable developers to build and run C and C++ software, and is used in a wide variety of ecosystems including desktop, IOT, automotive, and web applications, as well as being used for general-purpose programming. It is best known for it's advanced cross-platform technology for creating graphical user interfaces (aks GUIs). Qt supports Conan for dependency management [8] as of Qt 6.0.
    ARM Forge
    Arm Forge is a suite of tools developed and distributed by Arm Ltd. which enable developers to build and run C and C++ software on machines with Arm processors. The Arm Forge team uses and supports Conan for dependency management [9] both in their own development environment, and as part of the ecosystem used by Arm Forge users.
    Unreal Engine
    Unreal Engine is the leading game engine in the world, developed by Epic Games which enables users to create games and other simulations using C and C++. The conan-ue4cli enables developers working in unreal to use Conan to provide dependencies to Unreal projects.[10]

    Platform Compatibility[edit]

    The Conan client is a cross-platform application, meaning that can be run on all common consumer operating systems such as Windows, Linux, and macOS. It can also run on most commercial and server operating systems such as FreeBSD, Solaris, and various Unix variants.

    Build-System Compatibility[edit]

    At their core, package managers typically integrate closely with build systems. There are dozens of build systems in the C and C++ ecosystem, such as Make, CMake, and MSBuild to name a few. Conan provides native integration and support for 10 of the most common build systems for C and C++. It also provides features for users to add support for other build systems and strategies. Through this mechanism, Conan can be used with any build system.

    Syntax[edit]

    Commands[edit]

    Conan offers several subcommands which are common among other package managers:

    • search: Searches package recipes and binaries in the local cache or a remote repository.
    • install: Installs the requirements specified in a recipe (conanfile.py or conanfile.txt).
    • create: Builds a binary package for a recipe (conanfile.py).
    • remove: Removes packages or binaries matching pattern from local cache or remote repository.
    • upload: Uploads a recipe and binary packages to a remote.

    Conan also supports many other subcommands, which are covered exhaustively in the official documentation.

    Conan package definition (aka "Conan Recipe")[edit]

    A Conan recipe is a python Class which contains the instructions for creating a given package.

    from conans import ConanFile
    
    class MyPackageConan(ConanFile):
        name = "mypackage"
        version = "0.1.0"
    
        def export_sources(self):
            # capture the sources
            
        def requirements(self):
            # define dependencies
    
        def generate(self):
            # convert conan variables into build-system files
    
        def build(self):
            # invoke the build system, reading generated files
    
        def package(self):
            # copy artifacts from “build” to “package” directory
    
        def package_info(self):
           # declare what is in the package for consumers
    

    Upon invocation of the conan create command, Conan will call each of these methods in the appropriate order and produce a new package.

    Conan build configuration definition (aka "Conan Profile")[edit]

    A Conan profile is a text file with an INI file syntax, which is the primary mechanism for declaring build configurations with Conan. The configuration items in the profile are passed to a variety of other tools during the build and packaging process.

    Here is a simple example of a profile used to build for Windows platform:

    [settings]
    os=Windows
    arch=x86_64
    build_type=Release
    compiler=Visual Studio
    compiler.version=16
    compiler.runtime=MD
    [options]
    [env]
    [build_requires]
    cmake/3.19.0
    

    Here is a simple example of a profile used to build for Linux platform:

    [settings]
    os=Linux
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.version=7
    compiler.libcxx=libstdc++11
    [options]
    [env]
    [build_requires]
    cmake/3.19.0
    

    Here is a complex example of a profile used to build for the QNX platform:

    QNX_BASE=/lhome/user/tools/qnx/qnx700
    QNX_CONFIGURATION=/lhome/user/.qnx
    
    [settings]
    os=Neutrino
    os.version=7.0
    arch=armv8
    compiler=qcc
    compiler.version=5.4
    compiler.libcxx=cxx
    [options]
    *:shared=False
    [build_requires]
    qnx_sdp/6.5.0
    [env]
    PATH=[$QNX_BASE/host/linux/x86_64/usr/bin,$QNX_CONFIGURATION/bin,$QNX_BASE/jre/bin]
    LD_LIBRARY_PATH=[$QNX_BASE/host/linux/x86_64/usr/lib]
    CC=$QNX_BASE/host/linux/x86_64/usr/bin/qcc
    CXX=$QNX_BASE/host/linux/x86_64/usr/bin/q++
    CMAKE_C_COMPILER=$QNX_BASE/host/linux/x86_64/usr/bin/qcc
    CMAKE_CXX_COMPILER=$QNX_BASE/host/linux/x86_64/usr/bin/q++
    QNX_HOST=$QNX_BASE/host/linux/x86_64
    QNX_TARGET=$QNX_BASE/target/qnx7
    MAKEFLAGS=-I$QNX_BASE/target/qnx7/usr/include
    

    References[edit]

    1. 1.0 1.1 "Initial Release: 0.4.0".
    2. "Latest Release: 1.36.0".
    3. "Conan joins JFrog".
    4. "Conan Repositories support on JFrog Artifactory".
    5. "Conan Repositories support on Sonatype Nexus".
    6. "Conan Repositories support on Gitlab".
    7. "Conan Repositories support on Cloudsmith".
    8. "Qt 6 Additional Libraries via Package Manager". qt.io. Retrieved May 1, 2021.
    9. "Driving C/C++ Developer use cases for Arm with Conan". arm.com. Retrieved May 1, 2021.
    10. "Cross-platform library integration in Unreal Engine 4". adamrehn.com. Retrieved May 1, 2021.

    External links[edit]




    This article "Conan (software)" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Conan (software). Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.