{"id":19329421,"url":"https://github.com/jameswalmsley/cmake-kconfig","last_synced_at":"2025-08-13T06:06:45.154Z","repository":{"id":64874550,"uuid":"241490127","full_name":"jameswalmsley/cmake-kconfig","owner":"jameswalmsley","description":"Minimal Kconfig cmake integration (Adapted from Zephyr RTOS).","archived":false,"fork":false,"pushed_at":"2023-08-30T05:56:36.000Z","size":149,"stargazers_count":56,"open_issues_count":3,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-02T04:23:25.438Z","etag":null,"topics":["c","cmake","configuration","configuration-management","embedded","kconfig"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/jameswalmsley.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":"2020-02-18T23:32:00.000Z","updated_at":"2025-03-25T18:50:50.000Z","dependencies_parsed_at":"2024-11-10T02:28:16.043Z","dependency_job_id":"899f97e3-4758-4bae-b86a-2cafb835d82f","html_url":"https://github.com/jameswalmsley/cmake-kconfig","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/jameswalmsley%2Fcmake-kconfig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jameswalmsley%2Fcmake-kconfig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jameswalmsley%2Fcmake-kconfig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jameswalmsley%2Fcmake-kconfig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jameswalmsley","download_url":"https://codeload.github.com/jameswalmsley/cmake-kconfig/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250328473,"owners_count":21412626,"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":["c","cmake","configuration","configuration-management","embedded","kconfig"],"created_at":"2024-11-10T02:28:08.868Z","updated_at":"2025-04-22T21:31:46.290Z","avatar_url":"https://github.com/jameswalmsley.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cmake-kconfig\n\nMinimal cmake project with kconfig integration adapted from Zephyr.\n\n# Example\n\nDefault build using a provided configurations called `test`.\n\n```\nmkdir build\ncd build\ncmake -GNinja -DBOARD=test ..\nninja\n```\n\nNote the above uses the config provided by:\n```\nconfigs/test_defconfig\n```\n\nUpdating the configuration:\n\n```\nninja menuconfig\n```\n\nThis will bring up an interactive menu to turn options on/off and it will\nsave a .config file in the build directory.\n\nThe test_defconfig can be updated by copying the build/.config file to\nconfigs/test_defconfig and committing.\n\nBefore any targets are built an autoconf.h header file is generated under:\n\n```\nbuild/kconfig/include/generate/autoconf.h\n```\n\nThis is allows everything to have a common configuration.\n\n## Cmake\n```\nif(CONFIG_TEST_OPTION)\n    message(\"Config test_option is enabled\")\nendif()\n```\n\n## Make\n```\n-include build/.config\n\nifeq ($(CONFIG_TEST_OPTION),y)\nobjs += src/test_option.o\nendif\n```\n\n## C/C++ ...\n\n```\n#include \u003cautoconf.h\u003e\n\n#ifdef CONFIG_TEST_OPTION\n// Code built for option.\n#endif\n```\n# Kconfig\n\nKconfig is Brilliant! It manages a unified configuration separately from\nthe main source code that can be used with the build system and source code.\n\nIt is the best-in-class configuration management tool that exists for embedded\nC code, period.\n\nIt allows dependencies to be defined between different config options.\nAnd the best thing is, some really smart people have worked all this out before,\nso we get a really powerful system for little effort/cost.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjameswalmsley%2Fcmake-kconfig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjameswalmsley%2Fcmake-kconfig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjameswalmsley%2Fcmake-kconfig/lists"}