{"id":32564200,"url":"https://github.com/cirquit/cpp-template","last_synced_at":"2025-10-29T03:55:57.030Z","repository":{"id":80313612,"uuid":"100203381","full_name":"cirquit/cpp-template","owner":"cirquit","description":null,"archived":false,"fork":false,"pushed_at":"2019-03-24T17:19:32.000Z","size":114,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-10T03:01:08.188Z","etag":null,"topics":["cmake","cpp","template"],"latest_commit_sha":null,"homepage":null,"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/cirquit.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-08-13T20:40:41.000Z","updated_at":"2019-03-20T13:32:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"c6f69c1f-a5fa-47cd-a487-65941f8a71b9","html_url":"https://github.com/cirquit/cpp-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cirquit/cpp-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cirquit%2Fcpp-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cirquit%2Fcpp-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cirquit%2Fcpp-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cirquit%2Fcpp-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cirquit","download_url":"https://codeload.github.com/cirquit/cpp-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cirquit%2Fcpp-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281556917,"owners_count":26521572,"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-10-29T02:00:06.901Z","response_time":59,"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","cpp","template"],"created_at":"2025-10-29T03:55:31.147Z","updated_at":"2025-10-29T03:55:57.023Z","avatar_url":"https://github.com/cirquit.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## C++ Template\n\nThis template project consists of a single library, an executable that uses the library and tests for the library with the `catch` framework. `CMake` is used for the build system.\n\n### How to use this template\n\n```bash\n\u003e git clone https://github.com/cirquit/cpp-template\n\u003e cd cpp-template\n\u003e rm .git\n\u003e cd ..\n\u003e mv cpp-template \u003cyour-project-name\u003e\n\u003e cd \u003cyour-project-name\u003e\n\u003e vim CMakeLists.txt \n(modify the project/lib/executable/unique_debug_id name in the first 6 lines)\n```\n\nIt should look like this,:\n\n```cmake\nset(PROJECT_NAME CppTemplate) # your project name\nset(UNIQUE_DEBUG_ID CT) # this is the suffix which will be used for unique identification for our macros like DEBUG_MSG_${UNIQUE_DEBUG_ID} \nset(EXEC_NAME cpp-exec) # a name for your executable, if you have one\nset(CPP_LIB_NAME cpp) # a unique library name\nset(TEST_NAME cpp-test) # your executable name for tests\n```\n\nAdditionally, rename the `library/example-header.h` for your needs and rename it in the corresponding `library/CMakeLists.txt`. Same goes for the `tests/example-test.cpp`\n\nTo install your library you need to change the line 9 in `library/CMakeLists.txt`:\n\n```\n     $\u003cBUILD_INTERFACE:${CPP_TEMPLATE_SOURCE_DIR}/library\u003e # for headers when building\n```\n\nthe `CPP_TEMPLATE_SOURCE_DIR` has to be `\u003cYOUR_PROJECT_NAME\u003e_SOURCE_DIR` in caps and underscore for camelcase (in my case `CppTemplate`).\n\n### Build\n\n```bash\n\u003e mkdir build \u0026\u0026 cd build\n\u003e cmake .. -DDEBUG_LEVEL=[0,1,2] -DENABLE_TESTS=[ON/OFF] -DENABLE_OPTIMIZATIONS=[ON/OFF]\n\u003e make\n\u003e ./src/[your-exe-name]\n\u003e ./test/[your-test-name]\n```\n\n### Install \u0026 link against this library \n\n```bash\n\u003e sudo make Install\n```\n\nAdd this to the `CMakeLists.txt` file in your other project. Adapt the name and the version number (default 1.0)\n\n```cmake\nfind_package(\u003cyour-library-name\u003e 1.0 REQUIRED)\n```\n\n### Documentation\n\nTo create the documentation and open in your browser, run:\n\n```bash\n\u003e doxygen doxygen.config\n\u003e cd Documentation/html\n\u003e firefox index.html\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcirquit%2Fcpp-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcirquit%2Fcpp-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcirquit%2Fcpp-template/lists"}