Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement conditional compilation -DWITH_MODULEMD=OFF #1521

Merged
merged 4 commits into from
Jul 1, 2024

Conversation

kontura
Copy link
Contributor

@kontura kontura commented May 31, 2024

For: #1031

It also adds a copr build packit job to build with modules disabled to ensure the build keeps working.

CMakeLists.txt Outdated Show resolved Hide resolved
@kontura kontura force-pushed the module-no-compile branch 2 times, most recently from ea7ee4d to 0a0b5e8 Compare June 12, 2024 11:26
@kontura kontura marked this pull request as draft June 14, 2024 05:23
When WITH_MODULEMD is turned off module sources are not compiled and
module headers are not installed.

Public API in non-module headers (base.hpp and goal.hpp) is still
available but throws an exception when used.
Another option would be to also hide the functions in non-module headers
but in order to ensure the headers always match the compiled library (so
they don't depend on the user not defining `WITH_MODULEMD`) they would
have to be configured via a constant at compile time. For example using
cmake to `configure_file` turning them into `.in` files.
@kontura kontura marked this pull request as ready for review June 25, 2024 10:56
Copy link
Member

@jan-kolarik jan-kolarik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for adjusting the PR! It would be also great to have it tested against CI (without the module-related tests). I will create a follow-up issue for that.

Merged via the queue into rpm-software-management:main with commit 97c295d Jul 1, 2024
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants