Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jgsogo/template-cpp-project
A C++ project using CMake and connected to a _central_ repository of Conan recipes
https://github.com/jgsogo/template-cpp-project
cmake conan cpp template
Last synced: 19 days ago
JSON representation
A C++ project using CMake and connected to a _central_ repository of Conan recipes
- Host: GitHub
- URL: https://github.com/jgsogo/template-cpp-project
- Owner: jgsogo
- License: mit
- Created: 2022-01-07T09:49:17.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-07-17T09:03:50.000Z (over 2 years ago)
- Last Synced: 2024-11-02T07:51:43.329Z (2 months ago)
- Topics: cmake, conan, cpp, template
- Language: CMake
- Homepage:
- Size: 40 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
> ## After installing this template
> This is just a template to start working in a C++ project. It includes basic folder
> structure using CMake and Catch2 test framework. It also included some basic Conan files
> to grab dependencies and start working with CIs.
>
> Search for TODO comments to apply the changes that are required to your specific project
> and spend some time having a look to '.github/workflows' files to adjust them to your needs
> (usually you can just remove all files starting with underscore).
>
> Most of this template is designed to work together with 'https://github.com/jgsogo/conan-recipes'
> repository, you might need to move some of those files to your own organization.
>
> In order to work with `jgsogo/conan-recipes` there are two secrets expected in this repository:
> * `APP_RECIPES_APP_ID`:
> * `APP_RECIPES_PRIVATE_KEY`:
>
> These secreats are used by `.github/workflows/published_release.yml` to open a PR to
> `jgsogo/conan-recipes` when a new release is published in this repository.
>[![Build and tests](https://github.com/jgsogo/template-cpp-project/actions/workflows/ci.yml/badge.svg?event=push)](https://github.com/jgsogo/template-cpp-project/actions/workflows/ci.yml)
[![Build and tests](https://github.com/jgsogo/template-cpp-project/actions/workflows/conan_package.yml/badge.svg?event=push)](https://github.com/jgsogo/template-cpp-project/actions/workflows/ci.yml)## Consume the library
This library is available as a Conan package in my personal remote repository. To consume it, you just
need to add the remote:```
conan remote add sogo https://sogo.jfrog.io/artifactory/api/conan/conan-center
conan install /@jgsogo/stable
```Or, add the remote and list the reference in your `conanfile.txt/py` file.
## Build and run locally
```
mkdir cmake-build-xxxx && cd cmake-build-xxxx
``````
conan lock create --profile:host=../.conan/profiles/cpp20 --profile:build=default --lockfile=../lockfile.json --lockfile-out=lockfile.json --name=cpp-project --version=0.1 ../conanfile.txt --build --update
``````
conan install --lockfile=lockfile.json ../conanfile.txt --build=missing --generator=virtualenv
```## Update dependencies
```
conan lock create --name=cpp-project --version=0.1 --base --lockfile-out lockfile.json --build --profile:host=.conan/profiles/cpp20 --profile:build=default conanfile.txt
```