Skip to content

Commit 0d9789b

Browse files
authored
[test] Migrate old Makefiles to CMake
* [test] rm leftover Makefile * [test] rm leftover targets fix compilation * [test] fix RootIDE compilation * [test] migrate RootIDE test to CMake * [test] fix rhtml compilation * [test] migrate rhtml test to cmake * [test] fix histviewer compilation * [test] migrate HistViewer to CMake
1 parent dff03c8 commit 0d9789b

17 files changed

Lines changed: 121 additions & 713 deletions

test/RootIDE/CMakeLists.txt

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Copyright (C) 1995-2026, Rene Brun and Fons Rademakers.
2+
# All rights reserved.
3+
#
4+
# For the licensing terms see $ROOTSYS/LICENSE.
5+
# For the list of contributors see $ROOTSYS/README/CREDITS.
6+
7+
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
8+
9+
project(RootIDE)
10+
11+
find_package(ROOT REQUIRED)
12+
13+
set(CMAKE_CXX_FLAGS ${ROOT_CXX_FLAGS})
14+
15+
include_directories(${ROOT_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR})
16+
17+
set(SOURCES
18+
main.cxx
19+
TGRootIDE.cxx
20+
)
21+
22+
set(HEADERS TGRootIDE.h)
23+
24+
ROOT_GENERATE_DICTIONARY(RIDEDict ${HEADERS} LINKDEF LinkDef.h)
25+
file(COPY ${HEADERS} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
26+
27+
add_executable(RIDE ${SOURCES} RIDEDict.cxx)
28+
target_link_libraries(RIDE ROOT::Core ROOT::Rint ROOT::Gui ROOT::GuiHtml ROOT::Thread ROOT::RIO ROOT::Hist ROOT::Gpad)
29+
set_target_properties(RIDE PROPERTIES ENABLE_EXPORTS 1)
30+
if(MSVC AND NOT CMAKE_GENERATOR MATCHES Ninja)
31+
add_custom_command(TARGET RIDE POST_BUILD
32+
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/RIDE.exe
33+
${CMAKE_CURRENT_BINARY_DIR}
34+
)
35+
set_target_properties(RIDE PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
36+
endif()
37+
38+
install(TARGETS RIDE RUNTIME DESTINATION ${PROJECT_NAME} COMPONENT applications)
39+
install(FILES ${HEADERS} DESTINATION ${PROJECT_NAME} COMPONENT headers)

test/RootIDE/Makefile

Lines changed: 0 additions & 68 deletions
This file was deleted.

test/RootIDE/Makefile.win32

Lines changed: 0 additions & 142 deletions
This file was deleted.

test/RootIDE/TGRootIDE.cxx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@
145145

146146

147147
#include "TROOT.h"
148+
#include "TVirtualX.h"
148149
#include "TApplication.h"
149150
#include "TSystem.h"
150151
#include "TMacro.h"
@@ -178,7 +179,6 @@
178179
#include "TUrl.h"
179180
#include "TSocket.h"
180181
#include "TImage.h"
181-
#include "THtml.h"
182182
#include "TRint.h"
183183
#include "TProcessID.h"
184184
#include "Getline.h"
@@ -596,8 +596,7 @@ void TGRootIDE::Build()
596596
fNbDoc = 0;
597597
fCurrentDoc = 0;
598598
fPid = gSystem->GetPid(); //TProcessID::GetSessionProcessID();
599-
fHtml = new THtml();
600-
599+
601600
SetCleanup(kDeepCleanup);
602601
fMenuBarLayout = new TGLayoutHints(kLHintsTop | kLHintsExpandX, 0, 0, 1, 1);
603602
fMenuBarItemLayout = new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0);
@@ -937,9 +936,9 @@ void TGRootIDE::LoadFile(char *fname)
937936
TString pathtmp = Form("%s/%s.html",
938937
gSystem->UnixPathName(gSystem->TempDirectory()),
939938
gSystem->BaseName(fname));
940-
fHtml->Convert(fname, fname,
939+
/*fHtml->Convert(fname, fname,
941940
gSystem->UnixPathName(gSystem->TempDirectory()),
942-
gSystem->UnixPathName(gSystem->TempDirectory()));
941+
gSystem->UnixPathName(gSystem->TempDirectory()));*/
943942
Selected(Form("file://%s", pathtmp.Data()));
944943
}
945944
//gSystem->Unlink(pathtmp.Data());

test/RootIDE/TGRootIDE.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ class TGTabElement;
4242
class TGVerticalFrame;
4343
class TGHorizontalFrame;
4444
class TGPictureButton;
45-
class THtml;
4645
class TGLabel;
4746
class TProcessID;
4847
class TGHtml;
@@ -126,7 +125,6 @@ class TGRootIDE : public TGMainFrame {
126125
TGComboBox *fComboBox; // url history combo box
127126
TGTextBuffer *fURLBuf; // url buffer
128127
TGTextEntry *fURL; // url text entry
129-
THtml *fHtml; // html doc
130128
TGHtml *fGuiHtml; // html widget
131129

132130
virtual void Build();

test/RootShower/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ file(COPY ".rootshowerrc" DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
3939

4040
add_executable(RootShower ${SOURCES} RootShowerDict.cxx ${RCFILE})
4141
target_link_libraries(RootShower ROOT::Core ROOT::Rint ROOT::Gui ROOT::RIO ROOT::Hist ROOT::Gpad
42-
ROOT::Graf ROOT::EG ROOT::Html ROOT::Geom ROOT::Tree
42+
ROOT::Graf ROOT::EG ROOT::Geom ROOT::Tree
4343
)
4444
set_target_properties(RootShower PROPERTIES ENABLE_EXPORTS 1)
4545
if(MSVC AND NOT CMAKE_GENERATOR MATCHES Ninja)

test/RootShower/Makefile

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)