{"id":17362213,"url":"https://github.com/lnd3/bs","last_synced_at":"2025-10-27T17:31:19.839Z","repository":{"id":192305960,"uuid":"686465677","full_name":"lnd3/bs","owner":"lnd3","description":"A tiny yet capable project generation system for c++","archived":false,"fork":false,"pushed_at":"2024-11-19T23:56:27.000Z","size":35,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-19T23:17:17.880Z","etag":null,"topics":["build-system","cmake","cpp","lightweight","tiny"],"latest_commit_sha":null,"homepage":"","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/lnd3.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":"2023-09-02T22:12:05.000Z","updated_at":"2024-08-06T18:03:34.000Z","dependencies_parsed_at":"2023-09-04T03:58:11.546Z","dependency_job_id":"9254084e-0478-4538-8898-08a7370391c3","html_url":"https://github.com/lnd3/bs","commit_stats":null,"previous_names":["lnd3/bs"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnd3%2Fbs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnd3%2Fbs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnd3%2Fbs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnd3%2Fbs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lnd3","download_url":"https://codeload.github.com/lnd3/bs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238533288,"owners_count":19488159,"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":["build-system","cmake","cpp","lightweight","tiny"],"created_at":"2024-10-15T19:37:25.583Z","updated_at":"2025-10-27T17:31:19.459Z","avatar_url":"https://github.com/lnd3.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bs\nA project generation tool for library package modules and dependencies.\n\nThe main purpose of `bs` is to provide a simpler interface (compared to raw cmake) to construct hierarchial project dependencies with as little cmake interaction as possible.\n\n### Main functions\n* `bs_init()`\n* `bs_configure_packages(\u003cpackage_rel_dir\u003e [\u003cused_package\u003e...])`\n* `bs_generate_package(\u003cpkg_name\u003e [\u003cdependency_target\u003e...])`\n\n### Support functions\n* `bs_truncate_path(\u003croot_path\u003e \u003cfull_path\u003e)`\n* `bs_set_pedantic_flags(\u003cpkg_name\u003e)`\n* `bs_copy_to_binary_dir(\u003crelative_path\u003e)`\n\n### Typical usage:\n```\ncmake_minimum_required (VERSION 3.0.2)\nlist(APPEND CMAKE_MODULE_PATH \u003cCMAKE_CURRENT_LIST_DIR\u003e/cmake)\ninclude(bs)\nbs_init()\nset(PACKAGE_NAMES\n\tlogging\n\ttesting\n)\n# packages in folder \"packages\"\nbs_configure_packages(\"packages\" \"${PACKAGE_NAMES}\")\n```\n\n### Packages\nCall `bs_generate_package()` in the `CMakeLists.txt` file within the current package folder with the name of the package.\nProvide any necessary dependencies (targets) that the package depend upon.\nThe generator does not care if the target is internally or externally defined, any available targets can be utilized as dependencies.\nPackage interdependency is not managed and should be designed hierarchially by the user to avoid circular dependencies.\n\nYour packages are expected to have a specific layout. See below.\nAll folders in a package are scanned recursively.\n\n### Package folder layout of a package 'pkg_name'\n  `\u003cpkg_name\u003e`\n  * include\n  * source\n  * tests\n  * CMakeLists.txt\n\n  include\n  * `\u003cpkg_name\u003e` (use a folder named \u003cpkg_name\u003e to add structure to the include path)\n  * `\u003cpkg_name\u003e/\u003cfurther structure etc\u003e`\n\n  source\n  * common (required for all portable translation units)\n  * `\u003cother platform names\u003e`\n\n  tests\n  * common (source folder for tests)\n  * data (test data folder accessed in tests with \"./tests/data)\n\nPlatform specific packages are named as the following \n `\u003cpackage name\u003e\u003cCONFIG_PLATFORM\u003e`\nand depend on the platform agnostic package `\u003cpkg_name\u003e` by default\n\n### Example package CMakeLists.txt file\n```\ncmake_minimum_required (VERSION 3.0.2)\nproject(\u003cpkg_name\u003e)\nset(deps [\u003clibrary targets\u003e...])\nbs_generate_package(\u003cpkg_name\u003e \"${deps}\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flnd3%2Fbs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flnd3%2Fbs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flnd3%2Fbs/lists"}