Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/h1laryz/cxx_project_template
Template of a Modern C++ application with cmake, clang-tidy, clang-format, conan.
https://github.com/h1laryz/cxx_project_template
ci clang-format clang-tidy cmake conan makefile modern-cpp template template-project
Last synced: 21 days ago
JSON representation
Template of a Modern C++ application with cmake, clang-tidy, clang-format, conan.
- Host: GitHub
- URL: https://github.com/h1laryz/cxx_project_template
- Owner: h1laryz
- Created: 2024-02-20T12:32:18.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-02-21T03:20:37.000Z (11 months ago)
- Last Synced: 2024-10-31T20:07:18.992Z (2 months ago)
- Topics: ci, clang-format, clang-tidy, cmake, conan, makefile, modern-cpp, template, template-project
- Language: Makefile
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# cxx_project_template
Template of a Modern C++ application with cmake, clang-tidy, clang-format, conan.
## Download and Build
To create your own application based on this template follow the following steps:
1. Press the green "Use this template button" at the top of this github page
2. Clone the service `git clone your-service-repo && cd your-service-repo`
3. Give a propper name to your service and replace all the occurences of "cxx_project_template" string with that name
(could be done via `find . -not -path ".git/*" -not -path './build_*' -type f | xargs sed -i 's/cxx_project_template/YOUR_APPLICATION_NAME/g'`).## Makefile
Makefile contains typicaly useful targets for development:
* `make build-debug` - debug build of the service with all the assertions and sanitizers enabled
* `make build-release` - release build of the service with LTO
* `make test-debug` - does a `make build-debug` and runs all the tests on the result
* `make test-release` - does a `make build-release` and runs all the tests on the result
* `make format` - run clang-format checks for all the C++ sources
* `make format-fix` - run clang-format fixes for all the C++ sources
* `make clean` - cleans the object files
* `make dist-clean` - clean all, including the CMake cached configurations
* `make conan-setup` - does a installation of all conan dependencies (automatically runs during `make build-debug` or `make build-release`)
* `make lint` - does a clang-tidy checks
* `make lint-fix` does a clang-tidy fixesEdit `Makefile.local` to change the default configuration and build options.