{"id":17816297,"url":"https://github.com/dgellow/cmake-template","last_synced_at":"2025-04-02T08:25:40.194Z","repository":{"id":70151942,"uuid":"357665253","full_name":"dgellow/cmake-template","owner":"dgellow","description":"GitHub repository template for C++ projects, based on CMake, vcpkg, and VSCode","archived":false,"fork":false,"pushed_at":"2021-04-13T19:54:18.000Z","size":2,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T22:06:56.811Z","etag":null,"topics":["cmake","cmake-template","cpp","cpp-template","template","vcpkg","vscode"],"latest_commit_sha":null,"homepage":"https://sam.elborai.me/blog/vscode-cpp-dev-environment-2020","language":"CMake","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/dgellow.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":"2021-04-13T19:22:30.000Z","updated_at":"2023-03-15T00:13:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"57075381-ae8c-48f7-996e-9531e3e8afe7","html_url":"https://github.com/dgellow/cmake-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgellow%2Fcmake-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgellow%2Fcmake-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgellow%2Fcmake-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgellow%2Fcmake-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dgellow","download_url":"https://codeload.github.com/dgellow/cmake-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246779744,"owners_count":20832448,"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-template","cpp","cpp-template","template","vcpkg","vscode"],"created_at":"2024-10-27T16:37:06.253Z","updated_at":"2025-04-02T08:25:40.176Z","avatar_url":"https://github.com/dgellow.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Template: C++, CMake, and vcpkg\n\nBased on [this blog post](https://sam.elborai.me/blog/vscode-cpp-dev-environment-2020) where I describe how to setup a modern and cross-platform C++ environment.\n\nFeatures:\n\n- CMake config for library, executable, and test.\n- Depends on Catch2 and fmt installed from vcpkg.\n- VSCode setup (config and extension recommendations)\n\nNote (from [the author](https://github.com/dgellow)): Some of my personal settings are hardcoded.\n\n\n## Build\n\nFirst configure via `cmake` (where `DCMAKE_TOOLCHAIN_FILE` matches your vcpkg path):\n\n```\n$ cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=C:/Users/Sam/Development/vcpkg/scripts/buildsystems/vcpkg.cmake\n```\n\nIf that was successful, build via `cmake --build`:\n\n```\n$ cmake --build build\n$ ./build/Debug/main.exe\nGreetings stranger. Or should I say: Hello world!\n```\n\nRun tests via `ctest`:\n\n```\n$ cd build\n$ ctest --output-on-failure\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgellow%2Fcmake-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdgellow%2Fcmake-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgellow%2Fcmake-template/lists"}