GithubHelp home page GithubHelp logo

conan_study's Introduction

Conan Introduction and Demo

Summary

This repository provides a brief introduction to Conan, and some a demo of some basic operations. It was created to be used at community events such as C++ meetups and conferences. There is a presentation which goes along with it.

docker_compose environment

In order to make the examples in this repository reproducible, a docker-compose.yml file has been added to the root directory. It provides two docker containers:

  • conan-terminal-demo
  • artifactory-ce-demo

The conan-terminal-demo container is provided for users to run the examples in a completely isolated linux environment. It is not strictly required to use this environment, we simply provide it as an option.

The artifactory-ce-demo container is used for the upload_package example and provides a remote conan repository to push packages to. This is done to demonstrate examples of working with remotes, without users needing to go through any additional steps such as provisioning online services, and setting up credentials. Artifactory CE docker container provides a turn-key solution which is perfect for our case here.

Examples

Each example should work properly across all platforms. Each provides a script in the root directory named demo_commands which executes the whole example (both .bat and .sh versions of the script are provided).

cmake_find_package example

This example demonstrates the extremely simple case of using Conan packages in a CMake project. It uses the Boost C++ libraries as a dependency. It uses CMake's "Find Package" feature to depend on the Boost::regex component specifically.

One of the highlights of this example is that the CMakeLists.txt has no special code or configuration related to Conan. The use of Conan to provide the dependencies is completely transparent.

create_package

This example takes the same project and source code and demonstrates how to create a Conan package from it. It does this by adding a Conan recipe which defines how to build the project and capture the build artifacts. Finally, the example shows how to run the final executable from the Conan package directory using Conan's virtual environments feature.

upload_package

This is a very simple example which shows the commands needed to upload a package to a remote repository. It also demonstrates other relevant commands related to remotes.

more_to_come

In the future, it's likely that we'll add more examples to this repository, which are all cross-platform tested and work within the demo environment. If you would like to add examples for future users, contributions are definitely welcome!

conan_study's People

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.