Skip to content

resolver: Allow 'options' to apply to module-sets to allow default options in sample configs without forcing modules to be built.

Michael Pyne requested to merge work/mpyne/setify-options-blocks into master

The changes in this branch allow for 'options' blocks to apply to entire module-sets, while allowing these options to be later overridden (by a later 'options' block or by a later module or module-set definition).

As with normal 'options' blocks, these don't add the new modules to the build or update list, so these can be used to provide default options that can still be overridden later by the user. See the updated test case for a deeper example.

Once added here we can possibly remove some 'module-set' references in the sample config files by replacing them with appropriate 'options' settings and then letting the user add a module-set entry as appropriate if they wish to build the module.

Use by adding the 'repository kde-projects' and 'use-modules' entries as appropriate, example:

options kf6-frameworks
    repository kde-projects
    use-modules frameworks

    cmake-options -DBUILD_QT6=ON -DBUILD_QT5=OFF
end options

Note that unlike with module/module-sets, there is no separate declaration keyword.

Aside from the test suite I have successfully tested by rebuilding by KF5 install but I think more testing or review by others would be helpful before I merge into master.

Merge request reports