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 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,9 @@ add_subdirectory (io)
add_subdirectory (net)
add_subdirectory (graf2d)
add_subdirectory (graf3d)
add_subdirectory (gui)
if(NOT minimal)
add_subdirectory (gui)
endif()
add_subdirectory (montecarlo)
if(geom)
add_subdirectory (geom)
Expand Down
4 changes: 3 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ ROOT_EXECUTABLE(eventexe MainEvent.cxx LIBRARIES Event RIO Tree TreePlayer Hist
ROOT_ADD_TEST(test-event COMMAND eventexe)

#---guitest------------------------------------------------------------------------------------
ROOT_EXECUTABLE(guitest guitest.cxx LIBRARIES RIO Gui Gpad Hist)
if(NOT minimal) # gui is not built in minimal
Copy link
Member

@hageboeck hageboeck Jul 17, 2025

Choose a reason for hiding this comment

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

I would bind this to the target, so no further changes are required if we would ever touch the build options again. Also, no further comments are needed.

Suggested change
if(NOT minimal) # gui is not built in minimal
if(TARGET Gui)

ROOT_EXECUTABLE(guitest guitest.cxx LIBRARIES RIO Gui Gpad Hist)
endif()

#---hsimple------------------------------------------------------------------------------------
#ROOT_EXECUTABLE(hsimple hsimple.cxx LIBRARIES RIO Tree Hist)
Expand Down
4 changes: 3 additions & 1 deletion tree/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

add_subdirectory(tree)
add_subdirectory(treeplayer)
add_subdirectory(treeviewer)
if(NOT minimal) # gui is not built in minimal
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if(NOT minimal) # gui is not built in minimal
if(TARGET Gui)

add_subdirectory(treeviewer)
endif()
if(webgui)
add_subdirectory(webviewer)
endif()
Expand Down
4 changes: 4 additions & 0 deletions tree/ntuplebrowse/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@

# @author Jakob Blomer CERN

if(minimal) # gui is not built in minimal
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if(minimal) # gui is not built in minimal
if(NOT TARGET Gui)

return()
endif()

ROOT_ADD_GTEST(ntuple_browse ntuple_browse.cxx LIBRARIES Core Gui ROOTNTuple ROOTNTupleBrowse)
Loading