Import Geant4 11.1.0.beta source tree
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
# - G4interfaces category build
|
||||
include(basic/sources.cmake)
|
||||
include(common/sources.cmake)
|
||||
|
||||
geant4_global_library_target(NAME G4interfaces
|
||||
COMPONENTS
|
||||
basic/sources.cmake
|
||||
common/sources.cmake)
|
||||
geant4_add_category(G4interfaces MODULES G4UIbasic G4UIcommon)
|
||||
|
||||
+31
-14
@@ -1,20 +1,37 @@
|
||||
-------------------------------------------------------------------
|
||||
# Category interfaces History
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
|
||||
which **must** added in reverse chronological order (newest at the top).
|
||||
It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
Category History file
|
||||
---------------------
|
||||
This file should be used by G4 developers and category coordinators
|
||||
to briefly summarize all major modifications introduced in the code
|
||||
and keep track of all category-tags.
|
||||
It DOES NOT substitute the CVS log-message one should put at every
|
||||
committal in the CVS repository !
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
## 2022-05-03 Ben Morgan (interfaces-V11-00-06)
|
||||
- Preliminary build support for Qt5 and Qt6
|
||||
|
||||
## 2022-04-13 Ben Morgan (interfaces-V11-00-05)
|
||||
- Add dependency on Qt5 Widgets to G4UIcommon
|
||||
|
||||
## 2022-03-22 Ben Morgan (interfaces-V11-00-04)
|
||||
- Use geant4_module_sources to add optional sources
|
||||
- Add required G4VIS_USE_VTK_QT flag here instead of G4visVtk
|
||||
|
||||
## 2022-02-09 Gabriele Cosmo (interfaces-V11-00-03)
|
||||
- Fixed compilation warning on Intel compiler for shadowing data.
|
||||
|
||||
## 2022-01-30 John Allison (interfaces-V11-00-02)
|
||||
- `G4InteractorMessenger`: Prevent propagation of /gui/ commands to workers.
|
||||
|
||||
## 2022-01-28 Ben Morgan (interfaces-V11-00-01)
|
||||
- Replace `geant4_global_library_target` with direct file inclusion and
|
||||
call to `geant4_add_category` to define library build from source modules.
|
||||
|
||||
## 2021-12-10 Ben Morgan (interfaces-V11-00-00)
|
||||
- Change to new Markdown History format.
|
||||
|
||||
---
|
||||
|
||||
# History entries prior to 11.0
|
||||
|
||||
11 November 2021 - Koichi Murakami (interfaces-V10-07-23)
|
||||
- Add verbose setting in G4UIExecutive [BZ-2402]
|
||||
|
||||
@@ -1,87 +1,53 @@
|
||||
# - G4UIbasic module build definition
|
||||
|
||||
# Module has optional sources
|
||||
|
||||
# List those always built
|
||||
set(G4INTERFACES_BASIC_MODULE_HEADERS
|
||||
G4UIArrayString.hh
|
||||
G4UIExecutive.hh
|
||||
G4UIcsh.hh
|
||||
G4UIterminal.hh
|
||||
G4VUIshell.hh)
|
||||
|
||||
set(G4INTERFACES_BASIC_MODULE_SOURCES
|
||||
G4UIArrayString.cc
|
||||
G4UIExecutive.cc
|
||||
G4UIcsh.cc
|
||||
G4UIterminal.cc
|
||||
G4VUIshell.cc)
|
||||
|
||||
|
||||
set(G4INTERFACES_BASIC_MODULE_LINK_LIBRARIES )
|
||||
set(G4INTERFACES_BASIC_MODULE_COMPILE_DEFINITIONS )
|
||||
|
||||
# Tcsh only on UNIX style systems, but always built here
|
||||
if(UNIX)
|
||||
list(APPEND G4INTERFACES_BASIC_MODULE_HEADERS G4UItcsh.hh)
|
||||
list(APPEND G4INTERFACES_BASIC_MODULE_SOURCES G4UItcsh.cc)
|
||||
endif()
|
||||
|
||||
# Win32 terminal only for MSVC builds, but always built here
|
||||
if(MSVC)
|
||||
list(APPEND G4INTERFACES_BASIC_MODULE_HEADERS G4UIWin32.hh)
|
||||
list(APPEND G4INTERFACES_BASIC_MODULE_SOURCES G4UIWin32.cc)
|
||||
|
||||
# Definition required by G4UIexecutive
|
||||
list(APPEND G4INTERFACES_BASIC_MODULE_COMPILE_DEFINITIONS G4UI_BUILD_WIN32_SESSION)
|
||||
endif()
|
||||
|
||||
# Qt only if selected.
|
||||
if(GEANT4_USE_QT)
|
||||
list(APPEND G4INTERFACES_BASIC_MODULE_HEADERS G4UIQt.hh)
|
||||
list(APPEND G4INTERFACES_BASIC_MODULE_SOURCES G4UIQt.cc)
|
||||
|
||||
# Add the definition required by G4UIexecutive
|
||||
list(APPEND G4INTERFACES_BASIC_MODULE_COMPILE_DEFINITIONS G4UI_BUILD_QT_SESSION)
|
||||
|
||||
# Add the extra libraries
|
||||
list(APPEND G4INTERFACES_BASIC_MODULE_LINK_LIBRARIES Qt5::Gui Qt5::Widgets Qt5::Core)
|
||||
endif()
|
||||
|
||||
# Xm and only on UNIX and if selected
|
||||
if(UNIX AND GEANT4_USE_XM)
|
||||
list(APPEND G4INTERFACES_BASIC_MODULE_HEADERS G4UIXm.hh)
|
||||
list(APPEND G4INTERFACES_BASIC_MODULE_SOURCES G4UIXm.cc)
|
||||
|
||||
# Add the compile definition needed by G4UIexecutive
|
||||
list(APPEND G4INTERFACES_BASIC_MODULE_COMPILE_DEFINITIONS G4UI_BUILD_XM_SESSION)
|
||||
|
||||
# Need the X11 and Motif libraries
|
||||
list(APPEND G4INTERFACES_BASIC_MODULE_LINK_LIBRARIES
|
||||
Motif::Xm
|
||||
X11::SM X11::ICE X11::X11 X11::Xext X11::Xmu X11::Xt
|
||||
)
|
||||
endif()
|
||||
|
||||
# Define the Geant4 Module.
|
||||
geant4_add_module(G4UIbasic
|
||||
PUBLIC_HEADERS
|
||||
${G4INTERFACES_BASIC_MODULE_HEADERS}
|
||||
G4UIArrayString.hh
|
||||
G4UIExecutive.hh
|
||||
G4UIcsh.hh
|
||||
G4UIterminal.hh
|
||||
G4VUIshell.hh
|
||||
SOURCES
|
||||
${G4INTERFACES_BASIC_MODULE_SOURCES})
|
||||
|
||||
geant4_module_compile_definitions(G4UIbasic PRIVATE ${G4INTERFACES_BASIC_MODULE_COMPILE_DEFINITIONS})
|
||||
G4UIArrayString.cc
|
||||
G4UIExecutive.cc
|
||||
G4UIcsh.cc
|
||||
G4UIterminal.cc
|
||||
G4VUIshell.cc)
|
||||
|
||||
geant4_module_link_libraries(G4UIbasic
|
||||
PUBLIC
|
||||
G4UIcommon
|
||||
G4intercoms
|
||||
G4globman
|
||||
${G4INTERFACES_BASIC_MODULE_LINK_LIBRARIES}
|
||||
${timemory_LIBRARIES})
|
||||
|
||||
# List any source specific properties here
|
||||
# Tcsh only on UNIX style systems, but always built here
|
||||
if(UNIX)
|
||||
geant4_module_sources(G4UIbasic PUBLIC_HEADERS G4UItcsh.hh SOURCES G4UItcsh.cc)
|
||||
endif()
|
||||
|
||||
# Win32 terminal only for MSVC builds, but always built here
|
||||
if(MSVC)
|
||||
# Ensure that the CommCtrl library is loaded in Windows
|
||||
geant4_module_sources(G4UIbasic PUBLIC_HEADERS G4UIWin32.hh SOURCES G4UIWin32.cc)
|
||||
geant4_module_compile_definitions(G4UIbasic PRIVATE G4UI_BUILD_WIN32_SESSION)
|
||||
geant4_module_link_libraries(G4UIbasic PUBLIC COMCTL32)
|
||||
endif()
|
||||
|
||||
# Qt only if selected.
|
||||
if(GEANT4_USE_QT)
|
||||
geant4_module_sources(G4UIbasic PUBLIC_HEADERS G4UIQt.hh SOURCES G4UIQt.cc)
|
||||
geant4_module_compile_definitions(G4UIbasic PRIVATE G4UI_BUILD_QT_SESSION)
|
||||
geant4_module_link_libraries(G4UIbasic PUBLIC Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Core)
|
||||
endif()
|
||||
|
||||
# Xm and only on UNIX and if selected
|
||||
if(UNIX AND GEANT4_USE_XM)
|
||||
geant4_module_sources(G4UIbasic PUBLIC_HEADERS G4UIXm.hh SOURCES G4UIXm.cc)
|
||||
geant4_module_compile_definitions(G4UIbasic PUBLIC G4UI_BUILD_XM_SESSION)
|
||||
geant4_module_link_libraries(G4UIbasic
|
||||
PUBLIC
|
||||
Motif::Xm
|
||||
X11::SM X11::ICE X11::X11 X11::Xext X11::Xmu X11::Xt)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -364,17 +364,16 @@ void G4UIXm::CommandEnteredCallback (
|
||||
|
||||
XmString cps = ((XmCommandCallbackStruct*)a_data)->value;
|
||||
char* ss = XmConvertCompoundStringToString(cps,0);
|
||||
G4String command (ss);
|
||||
G4String scommand (ss);
|
||||
XtFree (ss);
|
||||
|
||||
if(This->fHelp==true) {
|
||||
exitHelp = true;
|
||||
This->fHelp = ConvertStringToInt(command.data(),This->fHelpChoice);
|
||||
This->fHelp = ConvertStringToInt(scommand.data(),This->fHelpChoice);
|
||||
} else {
|
||||
This->ApplyShellCommand (command,exitSession,exitPause);
|
||||
This->ApplyShellCommand (scommand,exitSession,exitPause);
|
||||
}
|
||||
|
||||
//a_widget = NULL; Not used (1st argument). Comment out to avoid compiler warnings. (JA)
|
||||
a_tag = NULL;
|
||||
}
|
||||
/***************************************************************************/
|
||||
|
||||
@@ -1,67 +1,38 @@
|
||||
# - G4UIcommon module build definition
|
||||
|
||||
# Module has optional sources
|
||||
|
||||
# List those always built
|
||||
set(G4INTERFACES_COMMON_MODULE_HEADERS
|
||||
G4InteractorMessenger.hh
|
||||
G4VBasicShell.hh
|
||||
G4VInteractiveSession.hh
|
||||
G4VInteractorManager.hh)
|
||||
|
||||
set(G4INTERFACES_COMMON_MODULE_SOURCES
|
||||
G4InteractorMessenger.cc
|
||||
G4VBasicShell.cc
|
||||
G4VInteractiveSession.cc
|
||||
G4VInteractorManager.cc)
|
||||
|
||||
set(G4INTERFACES_COMMON_MODULE_LINK_LIBRARIES )
|
||||
set(G4INTERFACES_COMMON_MODULE_COMPILE_DEFINITIONS )
|
||||
|
||||
# Add Qt if required
|
||||
if(GEANT4_USE_QT)
|
||||
list(APPEND G4INTERFACES_COMMON_MODULE_HEADERS G4Qt.hh)
|
||||
list(APPEND G4INTERFACES_COMMON_MODULE_SOURCES G4Qt.cc)
|
||||
|
||||
# It uses Qt core and gui(?) libs
|
||||
list(APPEND G4INTERFACES_COMMON_MODULE_LINK_LIBRARIES
|
||||
Qt5::Gui Qt5::Core)
|
||||
endif()
|
||||
|
||||
# Win32 option - always built when we're using MSVC
|
||||
if(MSVC)
|
||||
# Add the sources
|
||||
list(APPEND G4INTERFACES_COMMON_MODULE_HEADERS G4Win32.hh)
|
||||
list(APPEND G4INTERFACES_COMMON_MODULE_SOURCES G4Win32.cc)
|
||||
endif()
|
||||
|
||||
# X11 options - we only need this for Xm (and Inventor, which activates XM)
|
||||
if(UNIX AND GEANT4_USE_XM)
|
||||
# Add the sources
|
||||
list(APPEND G4INTERFACES_COMMON_MODULE_HEADERS G4Xt.hh)
|
||||
list(APPEND G4INTERFACES_COMMON_MODULE_SOURCES G4Xt.cc)
|
||||
|
||||
# It uses the X11 libs?
|
||||
list(APPEND G4INTERFACES_COMMON_MODULE_LINK_LIBRARIES
|
||||
X11::SM X11::ICE X11::X11 X11::Xext X11::Xmu X11::Xt
|
||||
)
|
||||
endif()
|
||||
|
||||
if(GEANT4_USE_VTK)
|
||||
list(APPEND G4INTERFACES_COMMON_MODULE_LINK_LIBRARIES
|
||||
${VTK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
# Define the Geant4 Module.
|
||||
geant4_add_module(G4UIcommon
|
||||
PUBLIC_HEADERS
|
||||
${G4INTERFACES_COMMON_MODULE_HEADERS}
|
||||
G4InteractorMessenger.hh
|
||||
G4VBasicShell.hh
|
||||
G4VInteractiveSession.hh
|
||||
G4VInteractorManager.hh
|
||||
SOURCES
|
||||
${G4INTERFACES_COMMON_MODULE_SOURCES})
|
||||
G4InteractorMessenger.cc
|
||||
G4VBasicShell.cc
|
||||
G4VInteractiveSession.cc
|
||||
G4VInteractorManager.cc)
|
||||
|
||||
geant4_module_link_libraries(G4UIcommon
|
||||
PUBLIC
|
||||
G4intercoms
|
||||
G4globman
|
||||
# These are PUBLIC until use in client code better understood
|
||||
${G4INTERFACES_COMMON_MODULE_LINK_LIBRARIES})
|
||||
geant4_module_link_libraries(G4UIcommon PUBLIC G4intercoms G4globman)
|
||||
|
||||
# Add Qt if required
|
||||
if(GEANT4_USE_QT)
|
||||
geant4_module_sources(G4UIcommon PUBLIC_HEADERS G4Qt.hh SOURCES G4Qt.cc)
|
||||
geant4_module_link_libraries(G4UIcommon PUBLIC Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets)
|
||||
endif()
|
||||
|
||||
# Win32 option - always built when we're using MSVC
|
||||
if(MSVC)
|
||||
geant4_module_sources(G4UIcommon PUBLIC_HEADERS G4Win32.hh SOURCES G4Win32.cc)
|
||||
endif()
|
||||
|
||||
# X11 options - we only need this for Xm (and Inventor, which activates XM)
|
||||
if(UNIX AND GEANT4_USE_XM)
|
||||
geant4_module_sources(G4UIcommon PUBLIC_HEADERS G4Xt.hh SOURCES G4Xt.cc)
|
||||
geant4_module_link_libraries(G4UIcommon PUBLIC X11::SM X11::ICE X11::X11 X11::Xext X11::Xmu X11::Xt)
|
||||
endif()
|
||||
|
||||
if(GEANT4_USE_VTK)
|
||||
geant4_module_compile_definitions(G4UIcommon PRIVATE G4VIS_USE_VTK_QT)
|
||||
geant4_module_link_libraries(G4UIcommon PUBLIC ${VTK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
@@ -47,7 +47,9 @@ G4InteractorMessenger::G4InteractorMessenger (
|
||||
|
||||
G4UIparameter* parameter;
|
||||
|
||||
interactorDirectory = new G4UIdirectory("/gui/");
|
||||
// gui commands should *not* be broadcast to workers
|
||||
G4bool propagateToWorkers;
|
||||
interactorDirectory = new G4UIdirectory("/gui/",propagateToWorkers=false);
|
||||
interactorDirectory->SetGuidance("UI interactors commands.");
|
||||
|
||||
// /gui/addMenu :
|
||||
|
||||
Reference in New Issue
Block a user