{"id":16110273,"url":"https://github.com/franneck94/cprojecttemplate","last_synced_at":"2025-08-21T11:14:34.220Z","repository":{"id":64152474,"uuid":"477276258","full_name":"franneck94/CProjectTemplate","owner":"franneck94","description":"C project template with unit-tests, documentation, ci-testing and workflows.","archived":false,"fork":false,"pushed_at":"2024-03-10T08:50:22.000Z","size":209,"stargazers_count":22,"open_issues_count":0,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-14T19:36:10.392Z","etag":null,"topics":["cmake","coverage","logging","testing"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/franneck94.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-03T08:06:55.000Z","updated_at":"2025-05-29T18:25:12.000Z","dependencies_parsed_at":"2024-10-31T21:41:51.705Z","dependency_job_id":"c8f487cd-d8a3-4500-ba77-12aa49049553","html_url":"https://github.com/franneck94/CProjectTemplate","commit_stats":null,"previous_names":[],"tags_count":4,"template":true,"template_full_name":null,"purl":"pkg:github/franneck94/CProjectTemplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franneck94%2FCProjectTemplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franneck94%2FCProjectTemplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franneck94%2FCProjectTemplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franneck94%2FCProjectTemplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/franneck94","download_url":"https://codeload.github.com/franneck94/CProjectTemplate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franneck94%2FCProjectTemplate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271469223,"owners_count":24765124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmake","coverage","logging","testing"],"created_at":"2024-10-09T19:36:40.620Z","updated_at":"2025-08-21T11:14:34.157Z","avatar_url":"https://github.com/franneck94.png","language":"CMake","readme":"# Template For C Projects\n\n![C++](https://img.shields.io/badge/C%2B%2B-11%2F14%2F17%2F20%2F23-blue)\n![License](https://img.shields.io/github/license/franneck94/CProjectTemplate)\n![Linux Build](https://github.com/franneck94/CProjectTemplate/workflows/Ubuntu%20CI%20Test/badge.svg)\n\nThis is a template for C++ projects. What you get:\n\n- Library, executable and test code separated in distinct folders.\n- Use of modern CMake for building and compiling.\n- External libraries fetched by CMake or cloned by Git.\n- Unit testing using [Unity](https://github.com/ThrowTheSwitch/Unity)\n- General purpose libraries:\n  - [log](https://github.com/rxi/log.c)\n  - [argparse](https://github.com/cofyc/argparse)\n- Continuous integration testing and coverage reports with Github Actions.\n- Code documentation with [Doxygen](http://www.stack.nl/~dimitri/doxygen/).\n- Tooling: Clang-Format, Cmake-Format, Clang-tidy, Sanitizers\n\n## Structure\n\n``` text\n├── CMakeLists.txt\n├── app\n│   ├── CMakesLists.txt\n│   └── main.cc\n├── cmake\n│   └── cmake modules\n├── docs\n│   ├── Doxyfile\n│   └── html/\n├── external\n│   ├── CMakesLists.txt\n│   ├── ...\n├── src\n│   ├── CMakesLists.txt\n│   ├── foo/\n│   └── bar/\n└── tests\n    ├── CMakeLists.txt\n    └── main.c\n```\n\nLibrary code goes into [src/](src/), main program code in [app/](app) and tests go in [tests/](tests/).\n\n## Software Requirements\n\n- CMake 3.21+\n- GNU Makefile\n- Doxygen\n- Conan or VCPKG\n- MSVC 2017 (or higher), G++9 (or higher), Clang++9 (or higher)\n- Optional: Code Coverage (only on GNU|Clang): gcovr\n- Optional: Makefile, Doxygen, Conan, VCPKG\n\n## Building\n\nFirst, clone this repo and do the preliminary work:\n\n```shell\ngit clone --recursive https://github.com/franneck94/CppProjectTemplate\nmake prepare\n```\n\n- App Executable\n\n```shell\ncd build\ncmake -DCMAKE_BUILD_TYPE=Release ..\ncmake --build . --config Release --target main\ncd app\n./main\n```\n\n- Unit testing\n\n```shell\ncd build\ncmake -DCMAKE_BUILD_TYPE=Debug ..\ncmake --build . --config Debug --target unit_tests\ncd tests\n./unit_tests\n```\n\n- Documentation\n\n```shell\ncd build\ncmake -DCMAKE_BUILD_TYPE=Debug ..\ncmake --build . --config Debug --target docs\n```\n\n- Code Coverage (Unix only)\n\n```shell\ncd build\ncmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON ..\ncmake --build . --config Debug --target coverage\n```\n\nFor more info about CMake see [here](./README_cmake.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffranneck94%2Fcprojecttemplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffranneck94%2Fcprojecttemplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffranneck94%2Fcprojecttemplate/lists"}