{"id":24772498,"url":"https://github.com/challanger524/template-cpp","last_synced_at":"2025-08-09T03:10:14.690Z","repository":{"id":274311558,"uuid":"922527131","full_name":"Challanger524/template-cpp","owner":"Challanger524","description":"Clean C++ CMake Ninja VSCode template","archived":false,"fork":false,"pushed_at":"2025-02-20T14:29:02.000Z","size":17,"stargazers_count":8,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T20:44:51.798Z","etag":null,"topics":["cmake","cmake-presets","cpp","cpp23","ninja","ninja-build","pch","precompiled-header","rebase-warning","template","vscode","vscode-settings"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Challanger524.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-01-26T13:08:19.000Z","updated_at":"2025-02-20T14:29:05.000Z","dependencies_parsed_at":"2025-01-26T14:37:53.745Z","dependency_job_id":null,"html_url":"https://github.com/Challanger524/template-cpp","commit_stats":null,"previous_names":["challanger524/template-cpp"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Challanger524%2Ftemplate-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Challanger524%2Ftemplate-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Challanger524%2Ftemplate-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Challanger524%2Ftemplate-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Challanger524","download_url":"https://codeload.github.com/Challanger524/template-cpp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248092209,"owners_count":21046432,"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","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","cmake-presets","cpp","cpp23","ninja","ninja-build","pch","precompiled-header","rebase-warning","template","vscode","vscode-settings"],"created_at":"2025-01-29T04:23:08.723Z","updated_at":"2025-04-09T18:50:34.912Z","avatar_url":"https://github.com/Challanger524.png","language":"C++","readme":"# Template C++ CMake\n\n`С++` `CMake` `CMakePresets` `Ninja` `EditorConfig` `VS Code` `PCH` `app`\n\nFeel free to pick any part or snippet you find interesting.\n\n- `CMakeLists.txt`- [CMake overview](https://cgold.readthedocs.io/en/latest/overview/cmake-can.html) - decent examples and information source\n- [`CMakePresets.json`](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) - build configure **presets** used in `CMakeLists.txt` via `cacheVariables`\n  - `msvc-dbg`: MSVC - debug\n  - `gcc-dbg`: GCC - debug\n  - `clang-dbg`: Clang - debug\n  - some conditional presets with sanitizers (like: `gcc-san`, `clang-san-addr`, `clang-san-mem`)\n- `src/` - place for project' source `.cpp` files that are recursively globbed in [`CMakeLists.txt:26`](CMakeLists.txt#L26)\n  - `config.hpp` - (optional) precompiled header with source-wide C++ defines\n- `.code-workspace` - useful VS Code settings\n\n### Branches (diff):\n\nCompare branches: https://github.com/Challanger524/template-cpp/compare\n\n- [std/c++_gnu++](https://github.com/Challanger524/template-cpp/compare/main..std/c%2B%2B_gnu%2B%2B) ([?](https://github.com/Challanger524/template-cpp/compare/main...std/c++_gnu++))\n\n\n\u003e GitHub compares for branch names with slash `/` may be ill-formed, as shown in (?) link\n\n### Other C++ examples\n\n\u003e Remark: I did not find any sane and useful C++ starting templates - they simply  don't exist.\n\u003e For comparison, just take a look on what Golang community pulled out:\n\u003e - [Organizing a Go module](https://go.dev/doc/modules/layout) - **official** golang project layout guideline\n\u003e - https://github.com/golang-standards/project-layout - big detailed repo and layout showcase\n\u003e - https://github.com/evrone/go-clean-template - same + readme contains pretty images\n\n\u003cdetails\u003e\u003csummary\u003eProjects and libraries (unfinished section)\u003c/summary\u003e\n\nSince there no useful templates outside - real projects are the only source of examples.\n\n- https://github.com/nlohmann/json - `Lib` `json` `c++` `readme.md`(very decent)\n- ...\n\nhttps://www.reddit.com/r/cpp_questions/comments/n73n32/presenting_a_c_project_on_github_elegantly/\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eTemplates examples and demos\u003c/summary\u003e\n\n- https://github.com/TheCherno/ProjectTemplate - `Premake` `\"Core/App\" architecture`\n- https://github.com/edumentab/cpp-project-example - `CMake` `JetBrains` `GTest`\n- https://github.com/fnl/cpp-project-template - `CMake`(nested) `gitmodules` `Catch2` `cxxopts`\n- https://github.com/erayaydin/cpp-structure  - `GNU Make` `project layout`\n- https://github.com/karvozavr/multi-module-cpp-project-example - `CMake` `multi-project` `Catch2`\n- https://github.com/jblort/cpp-project-template - `CMake` `Conan` `lib`+`app` `Catch2`\n- https://github.com/ssciwr/cpp-project-template - `CMake` `CI/CD` `Doxygen` `Catch2`\n- https://github.com/Jamagas/CMake - `CMake` `GTest`\n\n##### Avoid this BS:\n- https://github.com/pvanhoof/dir-examples - the most ugly project layout example on the net - `Meson` `qmake` `GNU Make` `CMake`(4 levels of nestiness)\n\u003c/details\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchallanger524%2Ftemplate-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchallanger524%2Ftemplate-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchallanger524%2Ftemplate-cpp/lists"}