{"id":15991077,"url":"https://github.com/friendlyanon/cmake-init-codegen","last_synced_at":"2026-01-02T03:31:52.916Z","repository":{"id":68573957,"uuid":"451560344","full_name":"friendlyanon/cmake-init-codegen","owner":"friendlyanon","description":"Code generation using a program in the source tree","archived":false,"fork":false,"pushed_at":"2022-01-24T17:52:03.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-11T08:12:52.715Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/friendlyanon.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":"2022-01-24T17:17:46.000Z","updated_at":"2022-01-24T17:38:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"426fa42f-2674-4447-bfb4-47f0c31b5813","html_url":"https://github.com/friendlyanon/cmake-init-codegen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friendlyanon%2Fcmake-init-codegen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friendlyanon%2Fcmake-init-codegen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friendlyanon%2Fcmake-init-codegen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friendlyanon%2Fcmake-init-codegen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/friendlyanon","download_url":"https://codeload.github.com/friendlyanon/cmake-init-codegen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243437965,"owners_count":20290864,"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":[],"created_at":"2024-10-08T05:41:41.803Z","updated_at":"2026-01-02T03:31:47.869Z","avatar_url":"https://github.com/friendlyanon.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# codegen\n\nThis project was generated by [cmake-init][1].  \nIt's heavily stripped down to focus on showing how to compile and use a tool\nthat is checked into the project for code generation.\n\nThere is a program in [`tools/parse`](tools/parse), which does some processing\nto an input and writes it to an output, both of which are provided from the\ncommand-line.\n\nThis time around, there is no superbuild orchestration via CMake and the tool\nis simply installed to a prefix, then wired up to the consuming project. For\nsuch a superbuild, see [another example project][2].\n\nThe tool is found in the [root CMakeLists.txt](CMakeLists.txt#L16) and then\nused in a custom command.  \nDo note that build systems that CMake uses do not track changes to the\nexecutable(s) used in custom commands and adding a file level dependency will\nresult in an always stale node, which can result in constant, potentially\nexpensive regenerations via the tool. If the external tool changes and you wish\nto rerun the custom commands that use it, then you must manually clear the\noutput(s) or add some custom logic around this. The latter is usually not\nrequired, as it is a solution to situations when the tool is in under heavy\ndevelopment. The lazy approach would be having a dedicated output directory per\ntool, which can be easily deleted to trigger commands using a specific tool.\n\nNote that while normally it is pointless to add headers to targets as sources,\nwhen that header is a generated file, it must be added as a source to the\ntarget to establish a dependency, otherwise the header would not be generated.\n\n[1]: https://github.com/friendlyanon/cmake-init\n[2]: https://github.com/friendlyanon/cmake-init-gif-engine\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffriendlyanon%2Fcmake-init-codegen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffriendlyanon%2Fcmake-init-codegen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffriendlyanon%2Fcmake-init-codegen/lists"}