From 022d0f55cd23e876d7082948b08c1e7b11790e65 Mon Sep 17 00:00:00 2001 From: silverweed Date: Tue, 15 Jul 2025 15:42:01 +0200 Subject: [PATCH 1/3] [cmake] don't build Gui when minimal=on --- CMakeLists.txt | 4 +++- test/CMakeLists.txt | 4 +++- tree/CMakeLists.txt | 4 +++- tree/ntuplebrowse/test/CMakeLists.txt | 4 ++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ef201ea2eb43d..5a484e4b79573 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 019b779c760fe..ab977ca96afd1 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -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 + ROOT_EXECUTABLE(guitest guitest.cxx LIBRARIES RIO Gui Gpad Hist) +endif() #---hsimple------------------------------------------------------------------------------------ #ROOT_EXECUTABLE(hsimple hsimple.cxx LIBRARIES RIO Tree Hist) diff --git a/tree/CMakeLists.txt b/tree/CMakeLists.txt index 286aea89dccd7..4fde2c6875f80 100644 --- a/tree/CMakeLists.txt +++ b/tree/CMakeLists.txt @@ -6,7 +6,9 @@ add_subdirectory(tree) add_subdirectory(treeplayer) -add_subdirectory(treeviewer) +if(NOT minimal) # gui is not built in minimal + add_subdirectory(treeviewer) +endif() if(webgui) add_subdirectory(webviewer) endif() diff --git a/tree/ntuplebrowse/test/CMakeLists.txt b/tree/ntuplebrowse/test/CMakeLists.txt index 87c6dc0d144bd..515b4f0e1a596 100644 --- a/tree/ntuplebrowse/test/CMakeLists.txt +++ b/tree/ntuplebrowse/test/CMakeLists.txt @@ -6,4 +6,8 @@ # @author Jakob Blomer CERN +if(NOT minimal) # gui is not built in minimal + return() +endif() + ROOT_ADD_GTEST(ntuple_browse ntuple_browse.cxx LIBRARIES Core Gui ROOTNTuple ROOTNTupleBrowse) From 19c1dffb4a86bb9c01dbd1ffb24cc226ccd41c38 Mon Sep 17 00:00:00 2001 From: Silverweed <7806878+silverweed@users.noreply.github.com> Date: Thu, 17 Jul 2025 11:04:36 +0000 Subject: [PATCH 2/3] Update tree/ntuplebrowse/test/CMakeLists.txt Co-authored-by: Bertrand Bellenot --- tree/ntuplebrowse/test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tree/ntuplebrowse/test/CMakeLists.txt b/tree/ntuplebrowse/test/CMakeLists.txt index 515b4f0e1a596..fda4cc313acdf 100644 --- a/tree/ntuplebrowse/test/CMakeLists.txt +++ b/tree/ntuplebrowse/test/CMakeLists.txt @@ -6,7 +6,7 @@ # @author Jakob Blomer CERN -if(NOT minimal) # gui is not built in minimal +if(minimal) # gui is not built in minimal return() endif() From 85348303991579dc93b22530295944868b01555c Mon Sep 17 00:00:00 2001 From: silverweed Date: Fri, 18 Jul 2025 11:32:42 +0200 Subject: [PATCH 3/3] [cmake] User TARGET Gui instead of minimal --- CMakeLists.txt | 2 +- test/CMakeLists.txt | 2 +- tree/CMakeLists.txt | 2 +- tree/ntuplebrowse/test/CMakeLists.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a484e4b79573..42d397af53ed7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -399,7 +399,7 @@ add_subdirectory (io) add_subdirectory (net) add_subdirectory (graf2d) add_subdirectory (graf3d) -if(NOT minimal) +if(TARGET Gui) add_subdirectory (gui) endif() add_subdirectory (montecarlo) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ab977ca96afd1..7eec45ad3a22d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -68,7 +68,7 @@ ROOT_EXECUTABLE(eventexe MainEvent.cxx LIBRARIES Event RIO Tree TreePlayer Hist ROOT_ADD_TEST(test-event COMMAND eventexe) #---guitest------------------------------------------------------------------------------------ -if(NOT minimal) # gui is not built in minimal +if(TARGET Gui) ROOT_EXECUTABLE(guitest guitest.cxx LIBRARIES RIO Gui Gpad Hist) endif() diff --git a/tree/CMakeLists.txt b/tree/CMakeLists.txt index 4fde2c6875f80..3147bf29deb41 100644 --- a/tree/CMakeLists.txt +++ b/tree/CMakeLists.txt @@ -6,7 +6,7 @@ add_subdirectory(tree) add_subdirectory(treeplayer) -if(NOT minimal) # gui is not built in minimal +if(TARGET Gui) add_subdirectory(treeviewer) endif() if(webgui) diff --git a/tree/ntuplebrowse/test/CMakeLists.txt b/tree/ntuplebrowse/test/CMakeLists.txt index fda4cc313acdf..b8087e312c1d3 100644 --- a/tree/ntuplebrowse/test/CMakeLists.txt +++ b/tree/ntuplebrowse/test/CMakeLists.txt @@ -6,7 +6,7 @@ # @author Jakob Blomer CERN -if(minimal) # gui is not built in minimal +if(NOT TARGET Gui) # gui is not built in minimal return() endif()