mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:27:45 +00:00
Meta: Add support for declaring components
Components are a group of build targets that can be built and installed separately. Whether a component should be built can be configured with CMake arguments: -DBUILD_<NAME>=ON|OFF, where <NAME> is the name of the component (in all caps). Components can be marked as REQUIRED if they're necessary for a minimally functional base system or they can be marked as RECOMMENDED if they're not strictly necessary but are useful for most users. A component can have an optional description which isn't used by the build system but may be useful for a configuration UI. Components specify the TARGETS which should be built when the component is enabled. They can also specify other components which they depend on (with DEPENDS). This also adds the BUILD_EVERYTHING CMake variable which lets the user build all optional components. For now this defaults to ON to make the transition to the components-based build system easier. The list of components is exported as an INI file in the build directory (e.g. Build/i686/components.ini). Fixes #8048.
This commit is contained in:
parent
70697a5999
commit
0dd03413d6
4 changed files with 105 additions and 9 deletions
|
@ -270,6 +270,8 @@ There are some optional features that can be enabled during compilation that are
|
|||
- `PRECOMPILE_COMMON_HEADERS`: precompiles some common headers to speedup compilation.
|
||||
- `ENABLE_KERNEL_LTO`: builds the kernel with link-time optimization.
|
||||
- `INCLUDE_WASM_SPEC_TESTS`: downloads and includes the WebAssembly spec testsuite tests
|
||||
- `BUILD_<component>`: builds the specified component, e.g. `BUILD_HEARTS` (note: must be all caps). Check the components.ini file in your build directory for a list of available components. Make sure to run `ninja clean` and `rm -rf Build/i686/Root` after disabling components.
|
||||
- `BUILD_EVERYTHING`: builds all optional components, overrides other `BUILD_<component>` flags when enabled
|
||||
|
||||
Many parts of the SerenityOS codebase have debug functionality, mostly consisting of additional messages printed to the debug console. This is done via the `<component_name>_DEBUG` macros, which can be enabled individually at build time. They are listed in [this file](../Meta/CMake/all_the_debug_macros.cmake).
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue