{"id":31923652,"url":"https://github.com/fletcher/c-boilermaker","last_synced_at":"2025-10-13T23:56:11.600Z","repository":{"id":66885746,"uuid":"254902634","full_name":"fletcher/c-boilermaker","owner":"fletcher","description":"Boilerplate C project template using CMake, CuTest and more, to simplify creating new projects.  Successor to my older c-template boilerplate.","archived":false,"fork":false,"pushed_at":"2025-05-03T23:19:36.000Z","size":138,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-04T00:20:59.399Z","etag":null,"topics":["astyle","boilerplate","c","cmake","cpack","macos","xcode"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fletcher.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,"zenodo":null}},"created_at":"2020-04-11T15:56:29.000Z","updated_at":"2025-05-03T23:13:56.000Z","dependencies_parsed_at":"2024-07-26T00:53:39.267Z","dependency_job_id":"348a2a21-c3f1-439f-ac87-67081374dbc5","html_url":"https://github.com/fletcher/c-boilermaker","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/fletcher/c-boilermaker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fletcher%2Fc-boilermaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fletcher%2Fc-boilermaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fletcher%2Fc-boilermaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fletcher%2Fc-boilermaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fletcher","download_url":"https://codeload.github.com/fletcher/c-boilermaker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fletcher%2Fc-boilermaker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017193,"owners_count":26086017,"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-13T02:00:06.723Z","response_time":61,"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":["astyle","boilerplate","c","cmake","cpack","macos","xcode"],"created_at":"2025-10-13T23:55:39.124Z","updated_at":"2025-10-13T23:56:11.593Z","avatar_url":"https://github.com/fletcher.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## About ##\n\n|            |                           |  \n| ---------- | ------------------------- |  \n| Title:     | libBoilermaker        |  \n| Author:    | Fletcher T. Penney       |  \n| Date:      | 2020-04-11 |  \n| Copyright: | Copyright © 2020 Fletcher T. Penney.    |  \n| Version:   | 1.0.0      |  \n\n\n## Introduction ##\n\nSeveral years ago I created [c-template] as a quick way to initialize new\nprojects with a standardized directory structure, a default CMake\nconfiguration, and more. It turned out to be incredibly useful, and I learned\na lot about CMake in the process.\n\nIf I had it to do over again, there were a few things I would do differently.\nI learned a bit more about integrating CMake with Xcode.  I learned, well a\nlot of things, actually.\n\nThis is the successor to that project.\n\n`c-boilermaker` is a boilerplate setup that does most of the things that\n`c-template` does, but it does them better:\n\n*\tStandardized directory structure\n*\tSupport for CuTest unit testing\n*\tSupport for building Xcode projects\n\n\nIt fixes a few things that did not work well before:\n\n*\tBuilding frameworks for Xcode no longer require manually fixing the `Copy\n\tFiles` in `Build Phases` every time the project is rebuilt.\n\n*\tThere are separate branches for plain libraries/frameworks (`master`), macOS\n\tapplications (`mac-app`), and macOS document-based applications\n\t(`mac-app-doc-based`). This allows easily creating new macOS applications\n\tusing the same setup used for plain C projects, which is something that the\n\told system was not good at.\n\n*\tThe `CMakeLists.txt` file is better organized, with better differentiation\n\tbetween what should be customized for each project, and what should be left\n\talone.\n\nThe tighter integration with Xcode and macOS applications was important to me.\nThe more experience I get with various aspects of programming, the more\nconvinced I am that focusing on plain text source files is the way to go.  Let\nother tools handle the creationg of complex file formats based on those\nsimpler source files.  This includes working with `CMakeLists.txt` instead of\nan Xcode `.xcodeproj` file.  Or building GUIs programmatically instead of with\ninterface builder (actually, it's even better with an additional layer of\nabstraction that converts a simple text description of a GUI into the code to\nbuild the GUI for you, but that's another story...)\n\nThis allows me to do a couple of things:\n\n*\tIt is easy to ensure that the Xcode project is \"right\" when it is built from\n\tscratch whenever you want.  This requires a better understanding of what\n\tyou're doing rather than randomly changing settings in Xcode and hoping for\n\tthe best.\n\n*\tIt allows me to easily build the same project via Xcode on macOS, or from\n\tthe commandline via `make`. This allows two independent ways of compiling,\n\twhich will sometimes identify different potential problems.  Throw in\n\t`xcodebuild` from the command-line, and you have another quasi-indepent way\n\tof building.\n\nThe main issue right now is that Xcode Storyboard files are tricky to get\nright.  Xcode handles converting a plain text version of a Storyboard into a\ncompiled version for you.  But Cmake doesn't do that when building via `make`.\nAnd compiling in advance causes CMake not to install the directory as a\nresource.  I will continue to look into this, but honestly my preference is\nnot to use Storyboards in the first place, so I will probably focus on that\nroute instead.  I welcome suggestions on this aspect if anyone has any good\nideas.\n\nThere are a few things that have not been implemented yet:\n\n*\tDoxygen support for integrated documentation\n*\tGithub gh-pages support for automatically placing documenation into github\n*\t*nix -\u003e Windows cross-platform compiling\n*\tiOS CMake toolchain support\n\nI intend to add these things as I come to need them so I can try to implement\nthem in as thoughtful a way as possible.  I've started using this for new\nprojects, and so far it is working great.  Over time, I will start migrating\nsome of my older projects as well, but may leave well enough alone for some of\nthem.\n\n\n[c-template]: https://github.com/fletcher/c-template\n\n\n## Flavors ##\n\nThere are several different branches of this project, each of which is\ncustomized for a different purpose:\n\n*\t`master` -- default branch that builds a static framework.  This should be\n\tusable for macOS and iOS (not tested on iOS yet), as well as other systems\n\t(as a static library)\n\n*\t`mac-app` -- modified to create a macOS application.\n\n*\t`mac-app-doc-based` -- modified version of `mac-app` to create a macOS\n\tdocument-based application.  I have used this as a starting point for a new\n\tversion of an existing macOS application, and it is working great. \n\n*\t`ios-app` -- modified to create an IOS application.  Works in my tests, but\n\tI have not done anything \"real\" with it yet.  Needs more fleshing out.\n\n*\t`ios-app-doc-based` -- document-based application for iOS.  Works in quick\n\ttests, but again, the iOS flavors have not been used for anything \"real\"\n\tyet, but I plan to start working on an iOS port of an app relatively soon\n\tthat will help flesh this out.\n\n\n## How to Use This Template ##\n\nI use a short shell script to create a new git repo and initialize with the\ndesired branch of the boilerplate template:\n\n\t#!/bin/sh\n\n\tgit init new-project\n\n\tcd new-project\n\n\tgit remote add \"template\" https://github.com/fletcher/c-boilermaker.git\n\n\tgit pull template mac-app\n\n\tgit flow init -d\n\n\tgit checkout develop\n\n\nIt also initializes git flow using the default settings, and moves to the\ndevelopment branch.  By storing the `template` branch, I can later use `git\npull template` in order to update the project with any fixes or improvements I\nmake to the upstream boilermaker template (being careful with merge conflict\nresolution of course.)\n\n\n## How to Build ##\n\n### macOS ###\n\nYou can automatically build Xcode projects:\n\n*\t`make xcode` -- regular build\n*\t`make xcode-test` -- build `run_tests` to perform CuTest unit tests\n\nThe Xcode projects can then be opened in Xcode, or you can build from\nthe command line via `xcodebuild`.\n\n\n### Other ###\n\n*\t`make` -- regular build\n*\t`make-test` -- build `run_tests` to perform CuTest unit tests\n\nThese steps configure a build directory, but you still have to perform\nthe actual compilation.  Once you perform either step above, `cd build`\nor `cd build-test` and then `make` (and `./run_tests` or `ctest` or\n`make test` for the unit testing variant).\n\n\n### Storyboards ###\n\nIf you are using macOS storyboards, they need to be compiled first.\nXcode handles this automatically.  It would be possible to add this\nbehavior to CMake, but would add complexity for something that is\nunlikely to be really necessary.\n\nTo compile you, can use a command like:\n\n\tibtool --compile Main.storyboardc Main.storyboard\n\n\n## License ##\n\n\tMIT License\n\t\n\tCopyright (c) 2020 Fletcher T. Penney\n\t\n\tPermission is hereby granted, free of charge, to any person obtaining a copy\n\tof this software and associated documentation files (the \"Software\"), to deal\n\tin the Software without restriction, including without limitation the rights\n\tto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\tcopies of the Software, and to permit persons to whom the Software is\n\tfurnished to do so, subject to the following conditions:\n\t\n\tThe above copyright notice and this permission notice shall be included in all\n\tcopies or substantial portions of the Software.\n\t\n\tTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\tIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\tFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\tAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\tLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\tOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n\tSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffletcher%2Fc-boilermaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffletcher%2Fc-boilermaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffletcher%2Fc-boilermaker/lists"}