This project is a template for a C++ project using Conan for dependency management and CMake as the build system. It provides a preconfigured development environment for easy use.
- C++ compiler (e.g., GCC, Clang, MSVC)
- CMake (minimum version 3.16)
- Conan (minimum version 2.0)
- Python (if managing Conan with Python)
-
Prepare Conan environment using the provided profiles
conan profile detect conan install . --build=missing- Prepared profiles for different machines and compilers are located under
./profiles
- Prepared profiles for different machines and compilers are located under
-
Build the project
conan build . -
Run the application
This depends on the output folder and the build type.
./build/Release/sample_app
cpp_template_conan/
├── CMakeLists.txt # Main CMake configuration file
├── conanfile.py # Conan package management
├── profiles/ # Conan profiles for different configurations
├── src/ # Source code directory
├── include/ # Header files
├── tests/ # Unit tests
├── .gitignore # Git ignore file
├── README.txt # This file
└── build/ # Build output (not versioned)
- Code Formatting:
.clang-formatdefines the coding style. - Dependencies: All external libraries are managed through Conan.
- Tests: Tests are located in the
tests/directory and should be written using Google Test.
This project is licensed under the MIT License. See LICENSE for details.