{"id":16962502,"url":"https://github.com/threeal/cmake-starter","last_synced_at":"2026-03-18T23:02:02.041Z","repository":{"id":208978688,"uuid":"720477063","full_name":"threeal/cmake-starter","owner":"threeal","description":"A minimalistic template to start a new CMake project ","archived":false,"fork":false,"pushed_at":"2025-02-26T13:51:00.000Z","size":111,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T14:40:11.092Z","etag":null,"topics":["cmake","cmake-examples","cmake-modules","github-templates","template","template-project","templates"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/threeal.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":"2023-11-18T15:56:10.000Z","updated_at":"2025-02-26T13:51:02.000Z","dependencies_parsed_at":"2023-11-24T10:51:31.472Z","dependency_job_id":"498d98eb-ed61-46ad-8876-b5de64d9c731","html_url":"https://github.com/threeal/cmake-starter","commit_stats":null,"previous_names":["threeal/cmake-starter"],"tags_count":10,"template":true,"template_full_name":"threeal/project-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threeal%2Fcmake-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threeal%2Fcmake-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threeal%2Fcmake-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threeal%2Fcmake-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/threeal","download_url":"https://codeload.github.com/threeal/cmake-starter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244826032,"owners_count":20516673,"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-examples","cmake-modules","github-templates","template","template-project","templates"],"created_at":"2024-10-13T23:06:57.193Z","updated_at":"2026-01-04T09:04:47.272Z","avatar_url":"https://github.com/threeal.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- TODO: Replace the content of this file with the new project description. --\u003e\n\n# CMake Starter\n\nA minimalistic template to start a new [CMake](https://cmake.org/) project.\n\nThis template provides a minimal sample CMake project that supports installation and testing. The project mainly consists of a CMake module that provides functions for use by other CMake projects.\n\nIn this template, the sample project is named `MyProject`, which includes a sample `MyProject.cmake` module. The module contains a sample `git_clone` function that can be used to clone a [Git](https://git-scm.com/) repository to a specific directory.\n\n## Key Features\n\n- Provides a minimalistic CMake project with installation and testing support.\n- Tests CMake variables and functions using [Assertion.cmake](https://github.com/threeal/assertion-cmake/tree/v1.0.0).\n- Preconfigured [Dependabot](https://docs.github.com/en/code-security/dependabot) and [GitHub Actions](https://github.com/features/actions) workflows.\n\n## Usage Guide\n\nThe following guide shows how to use this template to start a new CMake project, from creation to release.\n\n### Create a New Project\n\nFollow [this link](https://github.com/new?template_name=cmake-starter\u0026template_owner=threeal) to create a new project using this template. It will create a new repository based on this template. Refer to [this documentation](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template) for more information about creating a new repository from a template in GitHub.\n\nAlternatively, you can also clone this repository locally to start using this template.\n\n### Choose a License\n\nBy default, this template is [unlicensed](https://unlicense.org/). Before modifying this template, it is suggested to replace the [`LICENSE`](./LICENSE) file with the license that will be used by the new project. Refer to [this documentation](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository) for more information about licensing a repository.\n\nAlternatively, you can also remove the `LICENSE` file or leave it as is to mark the new project as unlicensed.\n\n### Fill in Information\n\nDo the following steps to replace all the sample information from the template with the new project information:\n- Replace the content of this `README.md` file with the description of the new project. Refer to [this documentation](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes) for more information about adding READMEs to a project.\n- Rename the main module file ([`cmake/MyProject.cmake`](./cmake/MyProject.cmake)) to match the correct project name.\n- Modify the test files ([`test/test_git_clone.cmake`](./test/test_git_clone.cmake)) to include the correct main module file.\n- Modify the [`CMakeLists.txt`](./CMakeLists.txt) file as follows:\n  - Replace the project name, version, description, and homepage URL.\n  - Rename the options to be prefixed with the correct project name.\n  - Modify to include the correct main module file.\n  - Rename the package config file to be prefixed with the correct project name and modify it to include the correct main module file.\n  - Rename the package config version file to be prefixed with the correct project name.\n  - Modify to install the correct files to the correct destination.\n- Modify the [`CMakePresets.json`](./CMakePresets.json) file as follows:\n  - Rename the options to be prefixed with the correct project name.\n\n\u003e Note: You can also search for the `TODO` comments for a list of information that needs to be replaced.\n\n### Developing Modules\n\nModify the contents of the main module file ([`cmake/MyProject.cmake`](./cmake/MyProject.cmake)) with variables or functions provided by the new CMake project. If you are new to CMake, refer to [this documentation](https://cmake.org/cmake/help/v3.21/index.html) for more information about CMake.\n\nAdditional module files can be added under the [`cmake`](./cmake) directory. Just ensure the new module files are included in the build and install lists in the [`CMakeLists.txt`](./CMakeLists.txt) file.\n\nAfter writing the module files, you can build the project using the following command:\n\n```sh\ncmake --preset default\n```\n\n### Testing Modules\n\nRename and modify the sample test file ([`test/test_git_clone.cmake`](./test/test_git_clone.cmake)) to test the variables and functions provided by the module files. The sample test file uses the [Assertion.cmake](https://github.com/threeal/assertion-cmake/tree/v1.0.0) module for testing CMake projects. Refer to [this documentation](https://github.com/threeal/assertion-cmake/tree/v1.0.0#assertion-example) for more information about testing CMake projects using Assertion.cmake.\n\nMore test files can also be added under the [`test`](./test) directory. Just make sure to add the new test files to the test list in the [`CMakeLists.txt`](./CMakeLists.txt) file.\n\nAfter writing the test files, you can test the project using the following command:\n\n```sh\ncmake --preset development\nctest --preset development\n```\n\n### Cut a Release\n\nWhen everything is complete, run the following command to package the project:\n\n```sh\ncpack --preset default\n```\n\nThe project will be packaged into the `build/*.tar.gz` file, which can be included in the release files. Before releasing, ensure that this project is at the correct version and has been pushed to the upstream repository. Refer to [this documentation](https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases) for more information about releasing a project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreeal%2Fcmake-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthreeal%2Fcmake-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreeal%2Fcmake-starter/lists"}