Skip to content

[cmake] allow disabling Gui #19381

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

silverweed
Copy link
Contributor

This Pull request:

Adds a gui build option that allows disabling the Gui library. It is meant to be used in conjunction with minimal=on as no effort is made to make sure that the option is coherent with the set of other options, meaning turning the gui off by itself won't automatically disable all its dependent modules. However, when minimal is on, everything works fine.

Rationale

When someone builds with minimal=on they don't care about graphics (otherwise they'd use gminimal) and building the graphics libraries is a waste of time. AFAIK, the gui already doesn't work when building with minimal=on, so we can spare time by not building it.

Ideally we should be able to also disable graf2d and graf3d, however too many core packages depend on them to be as easily doable (we'd have to disable half of the math/tree/hist modules and rethink modules.idx and hsimple.root), so that'll remain a wish for the future.

Checklist:

  • tested changes locally
  • updated the docs (if necessary)

@silverweed silverweed self-assigned this Jul 15, 2025
@silverweed silverweed requested a review from bellenot as a code owner July 15, 2025 14:52
@silverweed silverweed changed the title [cmake] allow disabling gui [cmake] allow disabling Gui Jul 15, 2025
@vepadulano
Copy link
Member

Just a fly-by comment

the gui already doesn't work when building with minimal=on

I can confirm this

Copy link

github-actions bot commented Jul 15, 2025

Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit 8534830.

♻️ This comment has been updated with latest results.

Copy link
Member

@bellenot bellenot left a comment

Choose a reason for hiding this comment

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

Thanks Jack!

@silverweed
Copy link
Contributor Author

@bellenot @dpiparo Following Stephan's suggestion, instead of using a new build option I'm now directly checking for NOT minimal, which has 2 benefits:

  • avoids introducing a new build option
  • avoids unsupported cases where one has gui=off but without minimal=on

Co-authored-by: Bertrand Bellenot <bellenot@users.noreply.github.com>
@bellenot
Copy link
Member

@bellenot @dpiparo Following Stephan's suggestion, instead of using a new build option I'm now directly checking for NOT minimal, which has 2 benefits:

  • avoids introducing a new build option
  • avoids unsupported cases where one has gui=off but without minimal=on

I fully agree!

@silverweed silverweed added the clean build Ask CI to do non-incremental build on PR label Jul 23, 2025
@silverweed silverweed closed this Jul 23, 2025
@silverweed silverweed reopened this Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clean build Ask CI to do non-incremental build on PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants