Import Geant4 10.4.0.beta source tree
This commit is contained in:
+19
-116
@@ -3,20 +3,20 @@
|
||||
#
|
||||
# 21st September 2010 Ben Morgan
|
||||
#
|
||||
# $Id: CMakeLists.txt 102581 2017-02-09 09:30:38Z gcosmo $
|
||||
# $Id: CMakeLists.txt 104643 2017-06-08 14:43:49Z gcosmo $
|
||||
#
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - Enforce an out-of-source builds before anything else
|
||||
#
|
||||
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
message(STATUS "Geant4 requires an out-of-source build.")
|
||||
message(STATUS "Please remove these files from ${CMAKE_BINARY_DIR} first:")
|
||||
message(STATUS "CMakeCache.txt")
|
||||
message(STATUS "CMakeFiles")
|
||||
message(STATUS "Once these files are removed, create a separate directory")
|
||||
message(STATUS "and run CMake from there")
|
||||
message(FATAL_ERROR "in-source build detected")
|
||||
message(STATUS "Geant4 requires an out-of-source build.")
|
||||
message(STATUS "Please remove these files from ${CMAKE_BINARY_DIR} first:")
|
||||
message(STATUS "CMakeCache.txt")
|
||||
message(STATUS "CMakeFiles")
|
||||
message(STATUS "Once these files are removed, create a separate directory")
|
||||
message(STATUS "and run CMake from there")
|
||||
message(FATAL_ERROR "in-source build detected")
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
@@ -26,20 +26,20 @@ cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
|
||||
|
||||
# - Any policy requirements should go here
|
||||
|
||||
# - Make overrides for default flags, so they appear in interfaces
|
||||
set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX
|
||||
${CMAKE_SOURCE_DIR}/cmake/Modules/Geant4MakeRules_cxx.cmake)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - Project definition and basic configuration
|
||||
#
|
||||
# Version handled manually as project(... VERSION ...) is not used
|
||||
# in tests/examples which are subprojects. All calls must use
|
||||
# the same form.
|
||||
project(Geant4)
|
||||
|
||||
# - Versioning. We do this here for now
|
||||
set(${PROJECT_NAME}_VERSION "10.3.1")
|
||||
set(${PROJECT_NAME}_VERSION_MAJOR "10")
|
||||
set(${PROJECT_NAME}_VERSION_MINOR "3")
|
||||
set(${PROJECT_NAME}_VERSION_PATCH "1")
|
||||
|
||||
set(${PROJECT_NAME}_VERSION_MAJOR 10)
|
||||
set(${PROJECT_NAME}_VERSION_MINOR 4)
|
||||
set(${PROJECT_NAME}_VERSION_PATCH 0)
|
||||
set(${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}")
|
||||
|
||||
# - Prepend our own CMake Modules to the search path
|
||||
# NB: if our custom modules include others that we don't supply, those in
|
||||
@@ -50,105 +50,8 @@ set(CMAKE_MODULE_PATH
|
||||
${CMAKE_MODULE_PATH})
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - Add functionality provided by standard and custom modules
|
||||
# See the documentation in each of these modules for further details.
|
||||
# - Include CMake category main module
|
||||
# Factored into category for convenience in tagging
|
||||
#
|
||||
# - Provide dependent options as these are needed for some Geant4 features
|
||||
include(CMakeDependentOption)
|
||||
|
||||
# - Provide general CMake utilities for Geant4.
|
||||
include(Geant4MacroUtilities)
|
||||
|
||||
# - Provide an 'uninstall' target.
|
||||
include(CMakeUninstallTarget)
|
||||
|
||||
# - Provide the 'validate_sources' target.
|
||||
include(Geant4ValidateSources)
|
||||
|
||||
# - Provide standard install directories permitting customization.
|
||||
include(Geant4InstallDirs)
|
||||
|
||||
# - Provide options to control how Geant4 libraries are built
|
||||
include(Geant4LibraryBuildOptions)
|
||||
|
||||
# - Provide interface to control use of optional components
|
||||
include(Geant4OptionalComponents)
|
||||
|
||||
# - Provide interface to control use of UI/Vis components
|
||||
# Written in a separate module from other optional components because
|
||||
# there are many complex options to handle.
|
||||
include(Geant4InterfaceOptions)
|
||||
|
||||
# - Provide options to enable wrapping of Geant4 by other languages
|
||||
include(Geant4Wrapping)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Add the source and environments subdirectories
|
||||
# source : Process all the Geant4 core targets
|
||||
# environments : Process optional wrappings of Geant4 (NOTYETIMPLEMENTED)
|
||||
add_subdirectory(source)
|
||||
#add_subdirectory(environments)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - Perform all post build tasks
|
||||
# At the CMake level, this simply means that we must know about targets
|
||||
# and other properties processed in source and environments trees before
|
||||
# these tasks can be performed.
|
||||
#
|
||||
# - Installation of optional read-only architecture independent data files.
|
||||
# E.g. Examples, data libraries, documentation.
|
||||
# Done before toolchain generation because it may affect what we have to do
|
||||
# there!
|
||||
#
|
||||
include(Geant4InstallData)
|
||||
|
||||
# - Generate any Use/Config/Support files here once everything else has
|
||||
# been processed e.g. "UseGeant4.cmake", "Geant4Config.cmake", library
|
||||
# dependencies etc.
|
||||
# - Geant4Make
|
||||
include(Geant4ToolchainBackwardCompatibility)
|
||||
|
||||
# - 'geant4-config'
|
||||
include(Geant4ConfigureConfigScript)
|
||||
|
||||
# - Geant4Config.cmake
|
||||
include(Geant4BuildProjectConfig)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - Testing configuration.
|
||||
# Done here, as projects under 'tests' require Geant4Config.
|
||||
if(GEANT4_ENABLE_TESTING)
|
||||
include(Geant4CTest)
|
||||
add_subdirectory(tests)
|
||||
if(EXISTS ${CMAKE_SOURCE_DIR}/benchmarks)
|
||||
add_subdirectory(benchmarks)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - Examples build/install
|
||||
# NB: Build of examples is a *testing* proceedure. It is *not* intended
|
||||
# that examples be built and installed as part of a full Geant4 install.
|
||||
if(GEANT4_BUILD_EXAMPLES)
|
||||
set(Geant4_DIR ${CMAKE_BINARY_DIR} CACHE PATH "Current build directory")
|
||||
add_subdirectory(examples)
|
||||
endif()
|
||||
|
||||
# - Install example code to datarootdir
|
||||
install(DIRECTORY examples
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Geant4-${Geant4_VERSION}
|
||||
COMPONENT Examples
|
||||
PATTERN "CVS" EXCLUDE
|
||||
PATTERN ".svn" EXCLUDE
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - CPack-aging
|
||||
include(Geant4CPackBase)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Final output - show what's been enabled so that user knows what's
|
||||
# happening - also useful for later problem solving!
|
||||
#
|
||||
GEANT4_PRINT_ENABLED_FEATURES()
|
||||
include(G4CMakeMain)
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+169
-4
@@ -31,14 +31,179 @@ add this in the documentation for the changed file as [BUGFIX #BUGNUMBER].
|
||||
|
||||
----------------------------------------------------------
|
||||
|
||||
21st February 2017 - Gunter Folger (cmake-V10-02-39)
|
||||
- Switch to PhotonEvaporation 4.3.2
|
||||
12th June 2017 - Ben Morgan (cmake-V10-03-23)
|
||||
- Remove support for modulefile generation, as not used and
|
||||
generated files not compatible with relocatability. It's
|
||||
expected that software stack managers will generate a
|
||||
modulefile file according to their requirements.
|
||||
|
||||
3rd February 2017 - Gunter Folger (cmake-V10-02-38)
|
||||
- Switch to
|
||||
9th June 2017 - Gabriele Cosmo (cmake-V10-03-22)
|
||||
- Corrected exporting of external packages paths from VecGeom.
|
||||
|
||||
8th June 2017 - Gunter Folger (cmake-V10-03-21)
|
||||
- Modules/Geant4DatasetDefinitions.cmake: switch to G4EMLOW6.54
|
||||
|
||||
31st May 2017 - Gunter Folger (cmake-V10-03-20)
|
||||
- Modules/Geant4DatasetDefinitions.cmake: switch to RealSurface 2.1
|
||||
|
||||
30th May 2017 - Gabriele Cosmo (cmake-V10-03-19)
|
||||
- Modules/Geant4OptionalComponents.cmake: added VECGEOM_EXTERNAL_INCLUDES
|
||||
to include directories for USolids/VecGeom enabled build, in order to
|
||||
allow for detection of external packages paths from VecGeom (e.g. Vc if
|
||||
Vetor backend is chosen at installation of VecGeom).
|
||||
|
||||
24th May 2017 - Gabriele Cosmo (cmake-V10-03-18)
|
||||
- Modules/Geant4OptionalComponents.cmake: appended VECGEOM_DEFINITIONS
|
||||
to GEANT4_USOLIDS_COMPILE_DEFINITIONS. Preparing for introducing direct
|
||||
dependency on VecGeom in G4U* wrappers, and deprecate USolids.
|
||||
|
||||
16th May 2017 - Ben Morgan (cmake-V10-03-17)
|
||||
- BUGFIX #1960: Do not set or modify DYLD_LIBRARY_PATH in basic and
|
||||
geant4make setup scripts on macOS.
|
||||
|
||||
2nd May 2017 - Gunter Folger (cmake-V10-03-16)
|
||||
- Update G4EMLOW data to 6.53
|
||||
|
||||
4th April 2017 - Gunter Folger (cmake-V10-03-15)
|
||||
- Update PhotonEvaporation data to 5.0
|
||||
|
||||
27th March 2017 - Gunter Folger (cmake-V10-03-14)
|
||||
- fix previous tag: the download file for RealSurface re-named
|
||||
from RealSurface to G4RealSurface, making this name is consistent
|
||||
with other datafiles.
|
||||
|
||||
23rd March 2017 - Gunter Folger (cmake-V10-03-13)
|
||||
- Update RealSurface data to 2.0
|
||||
|
||||
9th March 2017 - Gunter Folger (cmake-V10-03-12)
|
||||
- Modules/G4CMakeMain.cmake: add directory verification to testing
|
||||
|
||||
23rd February 2017 - Ben Morgan (cmake-V10-03-11)
|
||||
- Bugfix-1934
|
||||
- Templates/Geant4Config.cmake.in: Re-include CLHEP
|
||||
include directories when using external CLHEP. Needed
|
||||
to allow examples using ROOT to generate dictionaries
|
||||
as ROOT's CMake functions do not support usage requirements
|
||||
or generator expressions yet.
|
||||
|
||||
21st February 2017 - Gunter Folger (cmake-V10-03-10)
|
||||
base on tag cmake-V10-03-06, and only update History
|
||||
and Modules/Geant4DatasetDefinitions.cmake to trunk.
|
||||
Changes to above two files committed first in trunk.
|
||||
Then create branch cmake-V10-03-06_branch for tagging.
|
||||
- switch to PhotonEvaporation 4.3.2
|
||||
|
||||
|
||||
21st February 2017 - Gunter Folger (cmake-V10-03-09)
|
||||
rejected: as based on previous rejected tags
|
||||
- switch to PhotonEvaporation 4.3.2
|
||||
|
||||
10th February 2017 - Ben Morgan (cmake-V10-03-08)
|
||||
- Bugfix: Continuous identified issue on Windows and internal CLHEP.
|
||||
Way that DLLs are built means that target_include_directories are
|
||||
not propagated to intermediate archive library, causing builds
|
||||
to fail due to missing CLHEP headers.
|
||||
- Geant4OptionalComponents.cmake : Set CLHEP_INCLUDE_DIRS to internal
|
||||
path for CLHEP headers with using builtin CLHEP.
|
||||
- TODO: look at resolution via better DLL build process.
|
||||
|
||||
9th February 2017 - Ben Morgan (cmake-V10-03-07)
|
||||
- BUGFIX-1934
|
||||
- Incorporates all changes from branch cmake-bugfix-1934
|
||||
|
||||
8th February 2017 - Ben Morgan (branch cmake-bugfix-1934)
|
||||
- BUGFIX 1934
|
||||
- Note that this patch should not be applied to Geant4 < 10.3 without additional
|
||||
changes to support CLHEP's imported targets in versions =< 2.3.3.0.
|
||||
- See the comments in Geant4OptionalComponents.cmake for details.
|
||||
- Remove obsolete FindCLHEP.cmake module
|
||||
- Geant4OptionalComponents.cmake: Update Internal/System CLHEP selection
|
||||
- Prepend CLHEP_ROOT_DIR to CMAKE_PREFIX_PATH so that find_package's
|
||||
Config mode finds CLHEP as FindCLHEP did. Retain auto-activation
|
||||
of GEANT4_USE_SYSTEM_CLHEP if CLHEP_ROOT_DIR supplied.
|
||||
- Simplify System/Granular CLHEP selection using dependent options
|
||||
- Simplify location/setup of system CLHEP as CLHEP >= 2.3.3.0 provides
|
||||
CLHEP_LIBRARIES set with appropriate single/granular targets with
|
||||
full usage requirements.
|
||||
- Remove setting of GEANT4_USE_BUILTIN_CLHEP variable.
|
||||
- G4ConfigureCMakeHelpers.cmake: Remove install of deleted FindCLHEP module
|
||||
- Geant4Config.cmake.in: Update re-find of CLHEP to use find_package Config mode
|
||||
- Set CLHEP_DIR rather than CLHEP_ROOT_DIR.
|
||||
- Add new variable Geant4_system_clhep_FOUND set from expansion of
|
||||
buildtime GEANT4_USE_SYSTEM_CLHEP option.
|
||||
- Set value of Geant4_builtin_clhep_FOUND as boolean inverse of Geant4_system_clhep_FOUND
|
||||
|
||||
7th February 2017 - Ben Morgan (cmake-V10-03-06)
|
||||
- Restructure developer API scripts for clarity ready for new system
|
||||
- Merge Geant4MacroDefineModule.cmake and Geant4MacroLibraryTargets.cmake
|
||||
into single G4DeveloperAPI_OLD.cmake module
|
||||
- Create new G4DeveloperAPI.cmake module. This will be the eventual home
|
||||
for the new developer API, but for now it simply forwards to
|
||||
G4DeveloperAPI_OLD.cmake.
|
||||
- Leave Geant4MacroDefineModule and Geant4MacroLibraryTargets modules
|
||||
as stubs which simply forward to G4DeveloperAPI. At present these modules
|
||||
are included in several places, so maintaining their presence is required.
|
||||
- Include G4DeveloperAPI in top levl G4CMakeMain module.
|
||||
|
||||
3rd February 2017 - Gunter Folger (cmake-V10-03-05)
|
||||
- switch to
|
||||
- PhotonEvaporation 4.3.1
|
||||
- RadioactiveDecay 5.1.1
|
||||
|
||||
27th January 2017 - Ben Morgan (cmake-V10-03-04)
|
||||
- Refactor core Configure/Build and Client Script modules for
|
||||
clarity and cohesion.
|
||||
- Module renames and changes:
|
||||
- Modules/G4CMakeSettings.cmake (NEW)
|
||||
- Handles all core CMake behaviour and extensions
|
||||
- Modules/Geant4MacroUtilities.cmake -> Modules/G4CMakeUtilities.cmake
|
||||
- Rename to better reflect purpose
|
||||
- Modules/Geant4LibraryBuildOptions.cmake -> Modules/G4BuildSettings.cmake
|
||||
- Handles all core build/link options not dependent on externals
|
||||
- All functionality in Modules/Geant4BuildModes.cmake moved to this module
|
||||
- Modules/Geant4ToolchainBackwardCompatibility.cmake -> Modules/G4ConfigureGNUMakeHelpers.cmake
|
||||
- Rename to clearly identify task
|
||||
- Move all GMake related setup to this module
|
||||
- Modules/Geant4ConfigureConfigScript.cmake -> Modules/G4ConfigurePkgConfigHelpers.cmake
|
||||
- Rename to clearly identify task
|
||||
- Modules/Geant4BuildProjectConfig.cmake -> Modules/G4ConfigureCMakeHelpers.cmake
|
||||
- Rename to clearly identify task
|
||||
- Modules/Geant4CTest.cmake
|
||||
- All test-related options moved into file.
|
||||
|
||||
16th January 2017 - Ben Morgan (cmake-V10-03-03)
|
||||
- Remove/refactor obsolete CMake modules
|
||||
- Modules/CMakeMacroParseArguments.cmake: Remove as interface
|
||||
provided by CMake builtin CMakeParseArguments. Use builtin
|
||||
interface in modules:
|
||||
- FindROOT.cmake
|
||||
- Geant4MacroDefineModule.cmake
|
||||
- Geant4MacroLibraryTargets.cmake
|
||||
- Geant4MacroUtilities.cmake
|
||||
- UseGeant4_internal.cmake
|
||||
- Modules/Geant4InstallDirs.cmake: Remove as interface
|
||||
provided by CMake builtin GNUInstallDirs, included in
|
||||
G4CMakeMain.cmake
|
||||
- Modules/MacroEnsureVersion.cmake: Remove as unused, version
|
||||
comparison now supplied in CMake if()
|
||||
- Modules/ResolveCompilerPaths.cmake: Remove as unused.
|
||||
- Modules/Geant4BuildProjectConfig.cmake: Remove install
|
||||
of obsolete modules.
|
||||
|
||||
5th January 2017 - Gunter Folger (cmake-V10-03-02)
|
||||
- switch to EMLOW6.52
|
||||
|
||||
19th December 2016 - Gunter Folger (cmake-V10-03-01)
|
||||
- switch to EMLOW6.51
|
||||
|
||||
12th December 2016 - Ben Morgan (cmake-V10-03-00)
|
||||
- Modules/G4CMakeMain.cmake : New Module
|
||||
Refactor core implementation from top level CMake script into a module
|
||||
under the CMake category. This assists with tagging and upcoming
|
||||
modularization work, as changes will be tagged in category and
|
||||
can be made without requiring changes and co-working tag for
|
||||
top level script.
|
||||
|
||||
24th November 2016 - Gunter Folger (cmake-V10-02-37)
|
||||
- Switch to PhotonEvaporation 4.3
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
# - Finds ROOT instalation
|
||||
# This module sets up ROOT information
|
||||
# This module sets up ROOT information
|
||||
# It defines:
|
||||
# ROOT_FOUND If the ROOT is found
|
||||
# ROOT_INCLUDE_DIR PATH to the include directory (deprecated)
|
||||
# ROOT_INCLUDE_DIRS PATH to the include directory
|
||||
# ROOT_LIBRARIES Most common libraries
|
||||
# ROOT_LIBRARY_DIR PATH to the library directory
|
||||
# ROOT_LIBRARY_DIR PATH to the library directory
|
||||
# ROOT_BIN_DIR PATH to the excutables directory
|
||||
# ROOT_PYTHONVER Compatible python version string
|
||||
|
||||
# First search for ROOTConfig.cmake on the path defined via user setting
|
||||
# First search for ROOTConfig.cmake on the path defined via user setting
|
||||
# ROOT_DIR
|
||||
|
||||
if(EXISTS ${ROOT_DIR}/ROOTConfig.cmake)
|
||||
@@ -25,16 +25,16 @@ find_program(ROOT_CONFIG_EXECUTABLE root-config
|
||||
|
||||
if(NOT ROOT_CONFIG_EXECUTABLE)
|
||||
set(ROOT_FOUND FALSE)
|
||||
else()
|
||||
else()
|
||||
set(ROOT_FOUND TRUE)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${ROOT_CONFIG_EXECUTABLE} --prefix
|
||||
OUTPUT_VARIABLE ROOTSYS
|
||||
COMMAND ${ROOT_CONFIG_EXECUTABLE} --prefix
|
||||
OUTPUT_VARIABLE ROOTSYS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${ROOT_CONFIG_EXECUTABLE} --version
|
||||
COMMAND ${ROOT_CONFIG_EXECUTABLE} --version
|
||||
OUTPUT_VARIABLE ROOT_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
@@ -57,7 +57,7 @@ else()
|
||||
COMMAND ${ROOT_CONFIG_EXECUTABLE} --bindir
|
||||
OUTPUT_VARIABLE ROOT_BIN_DIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
|
||||
|
||||
#set(ROOT_LIBRARIES ${ROOT_LIBRARIES} -lThread -lMinuit -lHtml -lVMC -lEG -lGeom -lTreePlayer -lXMLIO -lProof)
|
||||
#set(ROOT_LIBRARIES ${ROOT_LIBRARIES} -lProofPlayer -lMLP -lSpectrum -lEve -lRGL -lGed -lXMLParser -lPhysics)
|
||||
@@ -75,18 +75,18 @@ endif()
|
||||
if (NOT ROOT_FOUND)
|
||||
if (ROOT_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "ROOT required, but not found")
|
||||
endif (ROOT_FIND_REQUIRED)
|
||||
endif (ROOT_FIND_REQUIRED)
|
||||
endif()
|
||||
|
||||
include(CMakeMacroParseArguments)
|
||||
include(CMakeParseArguments)
|
||||
find_program(ROOTCINT_EXECUTABLE rootcint PATHS $ENV{ROOTSYS}/bin)
|
||||
find_program(GENREFLEX_EXECUTABLE genreflex PATHS $ENV{ROOTSYS}/bin)
|
||||
find_package(GCCXML)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# function ROOT_GENERATE_DICTIONARY( dictionary
|
||||
# header1 header2 ...
|
||||
# LINKDEF linkdef1 ...
|
||||
# function ROOT_GENERATE_DICTIONARY( dictionary
|
||||
# header1 header2 ...
|
||||
# LINKDEF linkdef1 ...
|
||||
# OPTIONS opt1...)
|
||||
function(ROOT_GENERATE_DICTIONARY dictionary)
|
||||
CMAKE_PARSE_ARGUMENTS(ARG "" "" "LINKDEF;OPTIONS" "" ${ARGN})
|
||||
@@ -109,7 +109,7 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
|
||||
# rootcint (info from Andrea Dotti, and info from post:
|
||||
# http://root.cern.ch/phpBB3/viewtopic.php?f=3&t=15086
|
||||
get_directory_property(incdirs INCLUDE_DIRECTORIES)
|
||||
set(includedirs)
|
||||
set(includedirs)
|
||||
foreach( d ${incdirs})
|
||||
if(NOT ${d} STREQUAL "/usr/include")
|
||||
set(includedirs ${includedirs} -I${d})
|
||||
@@ -120,7 +120,7 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
|
||||
foreach( f ${ARG_LINKDEF})
|
||||
if( IS_ABSOLUTE ${f})
|
||||
set(linkdefs ${linkdefs} ${f})
|
||||
else()
|
||||
else()
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/inc/${f})
|
||||
set(linkdefs ${linkdefs} ${CMAKE_CURRENT_SOURCE_DIR}/inc/${f})
|
||||
else()
|
||||
@@ -130,17 +130,17 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
|
||||
endforeach()
|
||||
#---call rootcint------------------------------------------
|
||||
add_custom_command(OUTPUT ${dictionary}.cxx ${dictionary}.h
|
||||
COMMAND ${ROOTCINT_EXECUTABLE} -cint -f ${dictionary}.cxx
|
||||
-c ${ARG_OPTIONS} ${includedirs} ${headerfiles} ${linkdefs}
|
||||
COMMAND ${ROOTCINT_EXECUTABLE} -cint -f ${dictionary}.cxx
|
||||
-c ${ARG_OPTIONS} ${includedirs} ${headerfiles} ${linkdefs}
|
||||
DEPENDS ${headerfiles} ${linkdefs})
|
||||
endfunction()
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# function REFLEX_GENERATE_DICTIONARY(dictionary
|
||||
# header1 header2 ...
|
||||
# SELECTION selectionfile ...
|
||||
# function REFLEX_GENERATE_DICTIONARY(dictionary
|
||||
# header1 header2 ...
|
||||
# SELECTION selectionfile ...
|
||||
# OPTIONS opt1...)
|
||||
function(REFLEX_GENERATE_DICTIONARY dictionary)
|
||||
function(REFLEX_GENERATE_DICTIONARY dictionary)
|
||||
CMAKE_PARSE_ARGUMENTS(ARG "" "" "SELECTION;OPTIONS" "" ${ARGN})
|
||||
#---Get the list of header files-------------------------
|
||||
set(headerfiles)
|
||||
@@ -157,18 +157,18 @@ function(REFLEX_GENERATE_DICTIONARY dictionary)
|
||||
#---Get Selection file------------------------------------
|
||||
if(IS_ABSOLUTE ${ARG_SELECTION})
|
||||
set(selectionfile ${ARG_SELECTION})
|
||||
else()
|
||||
else()
|
||||
set(selectionfile ${CMAKE_CURRENT_SOURCE_DIR}/${ARG_SELECTION})
|
||||
endif()
|
||||
#---Get the list of include directories------------------
|
||||
get_directory_property(incdirs INCLUDE_DIRECTORIES)
|
||||
set(includedirs)
|
||||
foreach( d ${incdirs})
|
||||
set(includedirs)
|
||||
foreach( d ${incdirs})
|
||||
set(includedirs ${includedirs} -I${d})
|
||||
endforeach()
|
||||
#---Get preprocessor definitions--------------------------
|
||||
get_directory_property(defs COMPILE_DEFINITIONS)
|
||||
foreach( d ${defs})
|
||||
foreach( d ${defs})
|
||||
set(definitions ${definitions} -D${d})
|
||||
endforeach()
|
||||
#---Names and others---------------------------------------
|
||||
@@ -179,7 +179,7 @@ function(REFLEX_GENERATE_DICTIONARY dictionary)
|
||||
set(gccxmlopts "--gccxmlopt=--gccxml-compiler g++ ")
|
||||
else()
|
||||
set(gccxmlopts)
|
||||
endif()
|
||||
endif()
|
||||
#set(rootmapname ${dictionary}Dict.rootmap)
|
||||
#set(rootmapopts --rootmap=${rootmapname} --rootmap-lib=${libprefix}${dictionary}Dict)
|
||||
#---Check GCCXML and get path-----------------------------
|
||||
@@ -189,9 +189,9 @@ function(REFLEX_GENERATE_DICTIONARY dictionary)
|
||||
message(WARNING "GCCXML not found. Install and setup your environment to find 'gccxml' executable")
|
||||
endif()
|
||||
#---Actual command----------------------------------------
|
||||
add_custom_command(OUTPUT ${gensrcdict} ${rootmapname}
|
||||
add_custom_command(OUTPUT ${gensrcdict} ${rootmapname}
|
||||
COMMAND ${GENREFLEX_EXECUTABLE} ${headerfiles} -o ${gensrcdict} ${gccxmlopts} ${rootmapopts} --select=${selectionfile}
|
||||
--gccxmlpath=${gccxmlpath} ${ARG_OPTIONS} ${includedirs} ${definitions}
|
||||
DEPENDS ${headerfiles} ${selectionfile})
|
||||
endfunction()
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,450 @@
|
||||
#.rst:
|
||||
# G4BuildSettings.cmake
|
||||
# ---------------------
|
||||
#
|
||||
# Set defaults for core CMake settings for compiling and linking
|
||||
# Geant4 libraries and tests,
|
||||
#
|
||||
# In addition to the core compiler/linker flags (configured in the
|
||||
# Geant4MakeRules_<LANG>.cmake files) for Geant4, the build may require
|
||||
# further configuration. This module performs this task whicj includes:
|
||||
#
|
||||
# 1) Extra build modes for developers
|
||||
# 2) Additional compiler definitions to assist visualization or optimize
|
||||
# performance.
|
||||
# 3) Additional compiler flags which may be added optionally.
|
||||
# 4) Whether to build shared and/or static libraries.
|
||||
# 5) Whether to build libraries in global or granular format.
|
||||
#
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
# License and Disclaimer
|
||||
#
|
||||
# The Geant4 software is copyright of the Copyright Holders of
|
||||
# the Geant4 Collaboration. It is provided under the terms and
|
||||
# conditions of the Geant4 Software License, included in the file
|
||||
# LICENSE and available at http://cern.ch/geant4/license . These
|
||||
# include a list of copyright holders.
|
||||
#
|
||||
# Neither the authors of this software system, nor their employing
|
||||
# institutes,nor the agencies providing financial support for this
|
||||
# work make any representation or warranty, express or implied,
|
||||
# regarding this software system or assume any liability for its
|
||||
# use. Please see the license in the file LICENSE and URL above
|
||||
# for the full disclaimer and the limitation of liability.
|
||||
#
|
||||
# This code implementation is the result of the scientific and
|
||||
# technical work of the GEANT4 collaboration.
|
||||
# By using, copying, modifying or distributing the software (or
|
||||
# any work based on the software) you agree to acknowledge its
|
||||
# use in resulting scientific publications, and indicate your
|
||||
# acceptance of all terms of the Geant4 Software license.
|
||||
#
|
||||
#-----------------------------------------------------------------
|
||||
|
||||
if(NOT __G4BUILDSETTINGS_INCLUDED)
|
||||
set(__G4BUILDSETTINGS_INCLUDED TRUE)
|
||||
else()
|
||||
return()
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
#.rst:
|
||||
# Included Modules
|
||||
# ^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# This module includes the following modules:
|
||||
#
|
||||
include(CheckCXXSourceCompiles)
|
||||
include(IntelCompileFeatures)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
#.rst:
|
||||
# Build Modes
|
||||
# ^^^^^^^^^^^
|
||||
#
|
||||
# Geant4 supports the standard CMake build types/configurations of
|
||||
#
|
||||
# - ``Release``
|
||||
# - ``Debug``
|
||||
# - ``MinSizeRel``
|
||||
# - ``RelWithDebInfo``
|
||||
#
|
||||
# For single build type tools like `make` and `ninja`, the build
|
||||
# defaults to ``Release`` mode unless ``CMAKE_BUILD_TYPE`` is set.
|
||||
# Multi build type tools like Visual Studio and Xcode will default
|
||||
# to
|
||||
#
|
||||
# On non-WIN32 platforms, two types specifically for development are added:
|
||||
#
|
||||
if(NOT WIN32)
|
||||
|
||||
#.rst:
|
||||
# - ``TestRelease``:
|
||||
# For trial production and extended testing. It has verbose
|
||||
# output, has debugging symbols, and adds definitions to allow FPE
|
||||
# and physics conservation law testing where supported.
|
||||
#
|
||||
set(CMAKE_CXX_FLAGS_TESTRELEASE "${CMAKE_CXX_FLAGS_TESTRELEASE_INIT}"
|
||||
CACHE STRING "Flags used by the compiler during TestRelease builds"
|
||||
)
|
||||
mark_as_advanced(CMAKE_CXX_FLAGS_TESTRELEASE)
|
||||
|
||||
#.rst:
|
||||
# - ``Maintainer``:
|
||||
# For development of the toolkit. It adds debugging, and enables the use
|
||||
# of library specific debugging via standardized definitions.
|
||||
#
|
||||
set(CMAKE_CXX_FLAGS_MAINTAINER "${CMAKE_CXX_FLAGS_MAINTAINER_INIT}"
|
||||
CACHE STRING "Flags used by the compiler during Maintainer builds"
|
||||
)
|
||||
mark_as_advanced(CMAKE_CXX_FLAGS_MAINTAINER)
|
||||
|
||||
#.rst:
|
||||
# Compiler flags specific to these build types are set in the cache, and
|
||||
# the types are added to the ``CMAKE_BUILD_TYPES`` cache string and to
|
||||
# ``CMAKE_CONFIGURATION_TYPES`` if appropriate to the build tool being used.
|
||||
#
|
||||
if(NOT CMAKE_CONFIGURATION_TYPES)
|
||||
# Single mode build tools like Make, Ninja,
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
# Default to a Release build if nothing else...
|
||||
set(CMAKE_BUILD_TYPE Release
|
||||
CACHE STRING "Choose the type of build, options are: None Release TestRelease MinSizeRel Debug RelWithDebInfo MinSizeRel Maintainer."
|
||||
FORCE
|
||||
)
|
||||
else()
|
||||
# Force to the cache, but use existing value.
|
||||
set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}"
|
||||
CACHE STRING "Choose the type of build, options are: None Release TestRelease MinSizeRel Debug RelWithDebInfo MinSizeRel Maintainer."
|
||||
FORCE
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
# Multimode tools like VS, Xcode
|
||||
list(APPEND CMAKE_CONFIGURATION_TYPES TestRelease)
|
||||
list(APPEND CMAKE_CONFIGURATION_TYPES Maintainer)
|
||||
list(REMOVE_DUPLICATES CMAKE_CONFIGURATION_TYPES)
|
||||
set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}"
|
||||
CACHE STRING "Geant4 configurations for multimode build tools"
|
||||
FORCE
|
||||
)
|
||||
endif()
|
||||
|
||||
endif() #NOT WIN32
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
#.rst:
|
||||
# Compilation Options
|
||||
# ^^^^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# The following options affect the compilation of the Geant4 libraries
|
||||
#
|
||||
|
||||
#.rst
|
||||
# - ``GEANT4_BUILD_CXXSTD`` (Allowed values: 11, 14, c++11, c++14)
|
||||
#
|
||||
# - Choose C++ Standard to build against from supported list.
|
||||
#
|
||||
enum_option(GEANT4_BUILD_CXXSTD
|
||||
DOC "C++ Standard to compile against"
|
||||
VALUES 11 14 c++11 c++14
|
||||
CASE_INSENSITIVE
|
||||
)
|
||||
|
||||
string(REGEX REPLACE "^c\\+\\+" "" GEANT4_BUILD_CXXSTD "${GEANT4_BUILD_CXXSTD}")
|
||||
mark_as_advanced(GEANT4_BUILD_CXXSTD)
|
||||
|
||||
# Require at least C++11 with no extensions and the following features
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
set(GEANT4_TARGET_COMPILE_FEATURES
|
||||
cxx_alias_templates
|
||||
cxx_auto_type
|
||||
cxx_delegating_constructors
|
||||
cxx_enum_forward_declarations
|
||||
cxx_explicit_conversions
|
||||
cxx_final
|
||||
cxx_lambdas
|
||||
cxx_nullptr
|
||||
cxx_override
|
||||
cxx_range_for
|
||||
cxx_strong_enums
|
||||
cxx_uniform_initialization
|
||||
# Features that MSVC 18.0 cannot support but in list of Geant4 coding
|
||||
# guidelines - to be required once support for that compiler is dropped.
|
||||
# Version 10.2 is coded without these being required.
|
||||
#cxx_deleted_functions
|
||||
#cxx_generalized_initializers
|
||||
#cxx_constexpr
|
||||
#cxx_inheriting_constructors
|
||||
)
|
||||
|
||||
# If a standard higher than 11 has been selected, check that compiler has
|
||||
# at least one feature from that standard and append these to the required
|
||||
# feature list
|
||||
if(GEANT4_BUILD_CXXSTD GREATER 11)
|
||||
if(CMAKE_CXX${GEANT4_BUILD_CXXSTD}_COMPILE_FEATURES)
|
||||
list(APPEND GEANT4_TARGET_COMPILE_FEATURES ${CMAKE_CXX${GEANT4_BUILD_CXXSTD}_COMPILE_FEATURES})
|
||||
else()
|
||||
message(FATAL_ERROR "Geant4 requested to be compiled against C++ standard '${GEANT4_BUILD_CXXSTD}'\nbut detected compiler '${CMAKE_CXX_COMPILER_ID}', version '${CMAKE_CXX_COMPILER_VERSION}'\ndoes not support any features of that standard")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# - Check for Standard Library Implementation Features
|
||||
# Smart pointers are a library implementation feature
|
||||
# Hashed containers are a library implementation feature
|
||||
# Random numbers are a library implementation feature?
|
||||
# - Thread local? Yes, though on AppleClang platforms, see this:
|
||||
#http://stackoverflow.com/questions/28094794/why-does-apple-clang-disallow-c11-thread-local-when-official-clang-supports
|
||||
# An example of where a workaround is needed
|
||||
# Rest of concurrency a library implementation feature
|
||||
|
||||
# Add Definition to flags for temporary back compatibility
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DG4USE_STD11")
|
||||
|
||||
# Hold any appropriate compile flag(s) in variable for later export to
|
||||
# config files. Needed to support clients using late CMake 2.8 where compile features
|
||||
# are not available.
|
||||
set(GEANT4_CXXSTD_FLAGS "${CMAKE_CXX${GEANT4_BUILD_CXXSTD}_STANDARD_COMPILE_OPTION}")
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Multithreading
|
||||
#-----------------------------------------------------------------------
|
||||
#.rst:
|
||||
# - ``GEANT4_BUILD_MULTITHREADED`` (Default: ``OFF``)
|
||||
#
|
||||
# If set to ``ON``, compile Geant4 with support for multithreading.
|
||||
# At present, this is only supported on Unix platforms.
|
||||
#
|
||||
option(GEANT4_BUILD_MULTITHREADED "Enable multithreading in Geant4" OFF)
|
||||
|
||||
if(WIN32)
|
||||
mark_as_advanced(GEANT4_BUILD_MULTITHREADED)
|
||||
endif()
|
||||
|
||||
geant4_add_feature(GEANT4_BUILD_MULTITHREADED "Build multithread enabled libraries")
|
||||
|
||||
#.rst:
|
||||
# - ``GEANT4_BUILD_TLS_MODEL`` (Default: ``initial-exec``)
|
||||
#
|
||||
# If ``GEANT4_BUILD_MULTITHREADED`` is ``ON`` and a GNU/Clang/Intel
|
||||
# compiler is being used, then this option may be used to choose the
|
||||
# Thread Local Storage model. A default of ``initial-exec`` is used
|
||||
# to provide optimize performance for applications directly linking
|
||||
# to the Geant4 libraries
|
||||
#
|
||||
if(GEANT4_BUILD_MULTITHREADED)
|
||||
# - Need Thread Local Storage support (POSIX)
|
||||
if(UNIX)
|
||||
check_cxx_source_compiles("__thread int i; int main(){return 0;}" HAVE_TLS)
|
||||
if(NOT HAVE_TLS)
|
||||
message(FATAL_ERROR "Configured compiler ${CMAKE_CXX_COMPILER} does not support thread local storage")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# - Emit warning on Windows - message will format oddly on CMake prior
|
||||
# to 2.8, but still print
|
||||
if(WIN32)
|
||||
message(WARNING "GEANT4_BUILD_MULTITHREADED IS NOT SUPPORTED on Win32. This option should only be activated by developers")
|
||||
endif()
|
||||
|
||||
# - Allow advanced users to select the thread local storage model,
|
||||
# if the compiler supports it, defaulting to that recommended by Geant4
|
||||
if(TLSMODEL_IS_AVAILABLE)
|
||||
enum_option(GEANT4_BUILD_TLS_MODEL
|
||||
DOC "Build libraries with Thread Local Storage model"
|
||||
VALUES ${TLSMODEL_IS_AVAILABLE}
|
||||
CASE_INSENSITIVE
|
||||
)
|
||||
mark_as_advanced(GEANT4_BUILD_TLS_MODEL)
|
||||
geant4_add_feature(GEANT4_BUILD_TLS_MODEL "Building with TLS model '${GEANT4_BUILD_TLS_MODEL}'")
|
||||
|
||||
set(GEANT4_MULTITHREADED_CXX_FLAGS "${GEANT4_MULTITHREADED_CXX_FLAGS} ${${GEANT4_BUILD_TLS_MODEL}_FLAGS}")
|
||||
endif()
|
||||
|
||||
# Set Defs/Compiler Flags
|
||||
# TODO: Migrate def to header
|
||||
add_definitions(-DG4MULTITHREADED)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GEANT4_MULTITHREADED_CXX_FLAGS}")
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Miscellaneous
|
||||
#-----------------------------------------------------------------------
|
||||
#.rst:
|
||||
# - ``GEANT4_BUILD_STORE_TRAJECTORY`` (Default: ON)
|
||||
#
|
||||
# - Switching off can improve performance. Needs to be on
|
||||
# for visualization to work fully. Mark as advanced because most users
|
||||
# should not need to worry about it.
|
||||
#
|
||||
option(GEANT4_BUILD_STORE_TRAJECTORY
|
||||
"Store trajectories in event processing. Switch off for improved performance but note that visualization of trajectories will not be possible"
|
||||
ON)
|
||||
mark_as_advanced(GEANT4_BUILD_STORE_TRAJECTORY)
|
||||
|
||||
# TODO: Migrate this to header
|
||||
if(GEANT4_BUILD_STORE_TRAJECTORY)
|
||||
add_definitions(-DG4_STORE_TRAJECTORY)
|
||||
endif()
|
||||
|
||||
#.rst:
|
||||
# - ``GEANT4_BUILD_VERBOSE_CODE`` (Default: ON)
|
||||
#
|
||||
# - Switching off can improve performance, but at the cost
|
||||
# of fewer informational or warning messages.
|
||||
# Mark as advanced because most users should not need to worry about it.
|
||||
#
|
||||
option(GEANT4_BUILD_VERBOSE_CODE
|
||||
"Enable verbose output from Geant4 code. Switch off for better performance at the cost of fewer informational messages or warnings"
|
||||
ON)
|
||||
mark_as_advanced(GEANT4_BUILD_VERBOSE_CODE)
|
||||
|
||||
# TODO: Migrate this to header
|
||||
if(GEANT4_BUILD_VERBOSE_CODE)
|
||||
add_definitions(-DG4VERBOSE)
|
||||
endif()
|
||||
|
||||
#.rst:
|
||||
# - ``GEANT4_BUILD_MSVC_MP`` (Windows only, Default: OFF)
|
||||
#
|
||||
# - Provide optional file level parallelization with MSVC compiler.
|
||||
#
|
||||
|
||||
# NB: This will only work if the build tool performs compilations
|
||||
# with multiple sources, e.g. "cl.exe a.cc b.cc c.cc"
|
||||
if(MSVC)
|
||||
option(GEANT4_BUILD_MSVC_MP "Use /MP option with MSVC for file level parallel builds" OFF)
|
||||
mark_as_advanced(GEANT4_BUILD_MSVC_MP)
|
||||
|
||||
if(GEANT4_BUILD_MSVC_MP)
|
||||
set(CMAKE_CXX_FLAGS "/MP ${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
#.rst:
|
||||
# Library Mode and Link Options
|
||||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
#
|
||||
|
||||
#.rst:
|
||||
# - ``BUILD_SHARED_LIBS`` (Default: ``ON``)
|
||||
#
|
||||
# - Build shared libraries (`.so` on Unix, `.dylib` on macOS, `.dll/.lib` on Windows)
|
||||
#
|
||||
# - ``BUILD_STATIC_LIBS`` (Default: ``OFF``)
|
||||
#
|
||||
# - Build static libraries (`.a` on Unices, `.lib` on Windows)
|
||||
#
|
||||
# Both options are adavanced and may be selected together to build
|
||||
# both types. If neither is selected, an error is emitted.
|
||||
#
|
||||
option(BUILD_SHARED_LIBS "Build Geant4 shared libraries" ON)
|
||||
option(BUILD_STATIC_LIBS "Build Geant4 static libraries" OFF)
|
||||
mark_as_advanced(BUILD_SHARED_LIBS BUILD_STATIC_LIBS)
|
||||
|
||||
# Because both could be switched off accidently, FATAL_ERROR if neither
|
||||
# option has been selected.
|
||||
if(NOT BUILD_STATIC_LIBS AND NOT BUILD_SHARED_LIBS)
|
||||
message(FATAL_ERROR "Neither static nor shared libraries will be built")
|
||||
endif()
|
||||
|
||||
# Always build global libraries - always FATAL_ERROR if old
|
||||
# granular library switch is set, e.g. from command line
|
||||
if(GEANT4_BUILD_GRANULAR_LIBS)
|
||||
message(FATAL_ERROR " Granular libraries are no longer supported!")
|
||||
endif()
|
||||
|
||||
# On WIN32, we need to build the genwindef application to create export
|
||||
# def files for building DLLs.
|
||||
# We only use it as a helper application at the moment so we exclude it from
|
||||
# the ALL target.
|
||||
# TODO: We could move this section into the Geant4MacroLibraryTargets.cmake
|
||||
# if it can be protected so that the genwindef target wouldn't be defined
|
||||
# more than once... Put it here for now...
|
||||
# TODO: Investigate use of CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS from CMake 3.4
|
||||
# and/or other forms of symbol visibility
|
||||
if(WIN32)
|
||||
# Assume the sources are co-located
|
||||
get_filename_component(_genwindef_src_dir ${CMAKE_CURRENT_LIST_FILE} PATH)
|
||||
add_executable(genwindef EXCLUDE_FROM_ALL
|
||||
${_genwindef_src_dir}/genwindef/genwindef.cpp
|
||||
${_genwindef_src_dir}/genwindef/LibSymbolInfo.h
|
||||
${_genwindef_src_dir}/genwindef/LibSymbolInfo.cpp)
|
||||
endif()
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#.rst:
|
||||
# Build Output Directories
|
||||
# ------------------------
|
||||
#
|
||||
# Because of the highly nested structure of Geant4, built libraries and
|
||||
# programs will be distributed throughout the build tree. To simplify
|
||||
# use and testing of the build, CMake is setup to output these products
|
||||
# to a directory hierarchy based on the configured install locations.
|
||||
|
||||
# - Match output layout, so must have variables from GNUInstallDirs...
|
||||
if((NOT DEFINED CMAKE_INSTALL_BINDIR) OR (NOT DEFINED CMAKE_INSTALL_LIBDIR))
|
||||
message(FATAL_ERROR "Cannot configure build output dirs as install directories have not yet been defined")
|
||||
endif()
|
||||
|
||||
#.rst
|
||||
# In all cases, build products are stored in a directory tree rooted
|
||||
# in a directory named ``BuildProducts`` under the ``PROJECT_BINARY_DIRECTORY``.
|
||||
#
|
||||
set(BASE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/BuildProducts")
|
||||
|
||||
#.rst:
|
||||
# For single mode build generators (make, ninja), the following
|
||||
# hierarchy is used:
|
||||
#
|
||||
# .. code-block:: console
|
||||
#
|
||||
# +- <PROJECT_BINARY_DIR>/
|
||||
# +- BuildProducts/
|
||||
# +- <CMAKE_INSTALL_BINDIR>/
|
||||
# +- ... "runtime" targets ...
|
||||
# +- <CMAKE_INSTALL_LIBDIR>/
|
||||
# +- ... "library" and "archive" targets ...
|
||||
#
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${BASE_OUTPUT_DIRECTORY}/${CMAKE_INSTALL_BINDIR}")
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${BASE_OUTPUT_DIRECTORY}/${CMAKE_INSTALL_LIBDIR}")
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${BASE_OUTPUT_DIRECTORY}/${CMAKE_INSTALL_LIBDIR}")
|
||||
|
||||
#.rst:
|
||||
# For multimode build generators (Xcode, Visual Studio), each mode
|
||||
# is separated using the hierarchy
|
||||
#
|
||||
# .. code-block:: console
|
||||
#
|
||||
# +- <PROJECT_BINARY_DIR>
|
||||
# +- BuildProducts/
|
||||
# +- <CONFIG>/
|
||||
# +- <CMAKE_INSTALL_BINDIR>/
|
||||
# +- ... "runtime" targets ...
|
||||
# +- <CMAKE_INSTALL_LIBDIR>/
|
||||
# +- ... "library" and "archive" targets ...
|
||||
# +- ...
|
||||
#
|
||||
# where ``<CONFIG>`` is repeated for each build configuration listed in
|
||||
# :cmake:variable:`CMAKE_CONFIGURATION_TYPES <cmake:variable:CMAKE_CONFIGURATION_TYPES>`, e.g. Release, Debug, RelWithDebInfo etc.
|
||||
|
||||
foreach(_conftype ${CMAKE_CONFIGURATION_TYPES})
|
||||
string(TOUPPER ${_conftype} _conftype_uppercase)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${_conftype_uppercase}
|
||||
"${BASE_OUTPUT_DIRECTORY}/${_conftype}/${CMAKE_INSTALL_BINDIR}"
|
||||
)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${_conftype_uppercase}
|
||||
"${BASE_OUTPUT_DIRECTORY}/${_conftype}/${CMAKE_INSTALL_LIBDIR}"
|
||||
)
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${_conftype_uppercase}
|
||||
"${BASE_OUTPUT_DIRECTORY}/${_conftype}/${CMAKE_INSTALL_LIBDIR}"
|
||||
)
|
||||
endforeach()
|
||||
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
#.rst:
|
||||
# G4CMakeMain
|
||||
# -----------
|
||||
#
|
||||
# Main script for Geant4 CMake build scripting.
|
||||
#
|
||||
# Stored separately from top level script purely for clarity in tagging.
|
||||
#
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
# License and Disclaimer
|
||||
#
|
||||
# The Geant4 software is copyright of the Copyright Holders of
|
||||
# the Geant4 Collaboration. It is provided under the terms and
|
||||
# conditions of the Geant4 Software License, included in the file
|
||||
# LICENSE and available at http://cern.ch/geant4/license . These
|
||||
# include a list of copyright holders.
|
||||
#
|
||||
# Neither the authors of this software system, nor their employing
|
||||
# institutes,nor the agencies providing financial support for this
|
||||
# work make any representation or warranty, express or implied,
|
||||
# regarding this software system or assume any liability for its
|
||||
# use. Please see the license in the file LICENSE and URL above
|
||||
# for the full disclaimer and the limitation of liability.
|
||||
#
|
||||
# This code implementation is the result of the scientific and
|
||||
# technical work of the GEANT4 collaboration.
|
||||
# By using, copying, modifying or distributing the software (or
|
||||
# any work based on the software) you agree to acknowledge its
|
||||
# use in resulting scientific publications, and indicate your
|
||||
# acceptance of all terms of the Geant4 Software license.
|
||||
#
|
||||
#-----------------------------------------------------------------
|
||||
|
||||
# Include once and fail if already included
|
||||
if(NOT __G4CMAKEMAIN_INCLUDED)
|
||||
set(__G4CMAKEMAIN_INCLUDED TRUE)
|
||||
else()
|
||||
message(FATAL_ERROR "G4CMakeMain can only be included once")
|
||||
endif()
|
||||
|
||||
# Shouldn't need to set CMAKE_MODULE_PATH here as done at top level.
|
||||
# Review whether this is a more appropriate location.
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - Add functionality provided by standard and custom modules
|
||||
# See the documentation in each of these modules for further details.
|
||||
|
||||
# - Core CMake settings and options
|
||||
include(G4CMakeSettings)
|
||||
|
||||
# - Core Compile/Link settings and options
|
||||
include(G4BuildSettings)
|
||||
|
||||
# - Core API
|
||||
include(G4DeveloperAPI)
|
||||
|
||||
# - Provide interface to control use of optional components
|
||||
include(Geant4OptionalComponents)
|
||||
|
||||
# - Provide interface to control use of UI/Vis components
|
||||
# Written in a separate module from other optional components because
|
||||
# there are many complex options to handle.
|
||||
include(Geant4InterfaceOptions)
|
||||
|
||||
# - Provide options to enable wrapping of Geant4 by other languages
|
||||
include(Geant4Wrapping)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Add the source and environments subdirectories
|
||||
# source : Process all the Geant4 core targets
|
||||
# environments : Process optional wrappings of Geant4 (NOTYETIMPLEMENTED)
|
||||
add_subdirectory(source)
|
||||
#add_subdirectory(environments)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - Perform all post build tasks
|
||||
# At the CMake level, this simply means that we must know about targets
|
||||
# and other properties processed in source and environments trees before
|
||||
# these tasks can be performed.
|
||||
#
|
||||
# - Installation of optional read-only architecture independent data files.
|
||||
# E.g. Examples, data libraries, documentation.
|
||||
# Done before toolchain generation because it may affect what we have to do
|
||||
# there!
|
||||
#
|
||||
include(Geant4InstallData)
|
||||
|
||||
# - Generate any Use/Config/Support files here once everything else has
|
||||
# been processed e.g. "UseGeant4.cmake", "Geant4Config.cmake", library
|
||||
# dependencies etc.
|
||||
# - Geant4Make.gmk
|
||||
include(G4ConfigureGNUMakeHelpers)
|
||||
|
||||
# - Pkg-Config and geant4-config
|
||||
include(G4ConfigurePkgConfigHelpers)
|
||||
|
||||
# - Geant4Config.cmake et al
|
||||
include(G4ConfigureCMakeHelpers)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - Testing configuration.
|
||||
# Done here, as projects under 'tests' require Geant4Config.
|
||||
include(Geant4CTest)
|
||||
if(GEANT4_ENABLE_TESTING)
|
||||
add_subdirectory(tests)
|
||||
if(EXISTS ${CMAKE_SOURCE_DIR}/benchmarks)
|
||||
add_subdirectory(benchmarks)
|
||||
endif()
|
||||
if(EXISTS ${CMAKE_SOURCE_DIR}/verification)
|
||||
add_subdirectory(verification)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - Examples build/install
|
||||
# NB: Build of examples is a *testing* proceedure. It is *not* intended
|
||||
# that examples be built and installed as part of a full Geant4 install.
|
||||
option(GEANT4_BUILD_EXAMPLES "Build all the examples of the project" OFF)
|
||||
GEANT4_ADD_FEATURE(GEANT4_BUILD_EXAMPLES "Build all the examples of the project")
|
||||
mark_as_advanced(GEANT4_BUILD_EXAMPLES)
|
||||
|
||||
if(GEANT4_BUILD_EXAMPLES)
|
||||
set(Geant4_DIR ${CMAKE_BINARY_DIR} CACHE PATH "Current build directory")
|
||||
add_subdirectory(examples)
|
||||
endif()
|
||||
|
||||
# - Install example code to datarootdir
|
||||
install(DIRECTORY examples
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Geant4-${Geant4_VERSION}
|
||||
COMPONENT Examples
|
||||
PATTERN "CVS" EXCLUDE
|
||||
PATTERN ".svn" EXCLUDE
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - CPack-aging
|
||||
include(Geant4CPackBase)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Final output - show what's been enabled so that user knows what's
|
||||
# happening - also useful for later problem solving!
|
||||
#
|
||||
GEANT4_PRINT_ENABLED_FEATURES()
|
||||
|
||||
@@ -0,0 +1,160 @@
|
||||
#.rst:
|
||||
# G4CMakeSettings.cmake
|
||||
# ---------------------
|
||||
#
|
||||
# Set defaults for core CMake behaviour useful or required for building,
|
||||
# testing and installing Geant4.
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
# License and Disclaimer
|
||||
#
|
||||
# The Geant4 software is copyright of the Copyright Holders of
|
||||
# the Geant4 Collaboration. It is provided under the terms and
|
||||
# conditions of the Geant4 Software License, included in the file
|
||||
# LICENSE and available at http://cern.ch/geant4/license . These
|
||||
# include a list of copyright holders.
|
||||
#
|
||||
# Neither the authors of this software system, nor their employing
|
||||
# institutes,nor the agencies providing financial support for this
|
||||
# work make any representation or warranty, express or implied,
|
||||
# regarding this software system or assume any liability for its
|
||||
# use. Please see the license in the file LICENSE and URL above
|
||||
# for the full disclaimer and the limitation of liability.
|
||||
#
|
||||
# This code implementation is the result of the scientific and
|
||||
# technical work of the GEANT4 collaboration.
|
||||
# By using, copying, modifying or distributing the software (or
|
||||
# any work based on the software) you agree to acknowledge its
|
||||
# use in resulting scientific publications, and indicate your
|
||||
# acceptance of all terms of the Geant4 Software license.
|
||||
#
|
||||
#-----------------------------------------------------------------
|
||||
|
||||
if(NOT __G4CMAKESETTINGS_INCLUDED)
|
||||
set(__G4CMAKESETTINGS_INCLUDED TRUE)
|
||||
else()
|
||||
return()
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
#.rst:
|
||||
# General Configuration Settings
|
||||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# The following CMake modules and variables are used to control configuration time
|
||||
# behaviour such as location of dependencies.
|
||||
#
|
||||
|
||||
#.rst:
|
||||
# - ``G4CMakeUtilities`
|
||||
#
|
||||
# - Included to provide additional macros and functions
|
||||
#
|
||||
include(G4CMakeUtilities)
|
||||
|
||||
#
|
||||
# - ``CMAKE_EXPORT_NO_PACKAGE_REGISTRY`` : ON
|
||||
# - ``CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY`` : ON
|
||||
# - ``CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY`` : ON
|
||||
#
|
||||
# - These variables are set to ensure that CMake never creates or searches
|
||||
# for config files in any package registry. This prevents the
|
||||
# :cmake:command:`find_package <cmake:command:find_package>`
|
||||
# command from locating potentially spurious config files.
|
||||
#
|
||||
set(CMAKE_EXPORT_NO_PACKAGE_REGISTRY ON)
|
||||
set(CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY ON)
|
||||
set(CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY ON)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
#.rst:
|
||||
# General Build Settings
|
||||
# ^^^^^^^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# The following CMake variables and options are configured by default
|
||||
# when including this module:
|
||||
#
|
||||
# - ``CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE`` : ON
|
||||
#
|
||||
# - Force project directories to appear first in any list of include paths.
|
||||
# This applies to both full paths and those created by generator expressions.
|
||||
#
|
||||
set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
|
||||
|
||||
#.rst:
|
||||
# - ``CMAKE_LINK_DEPENDS_NO_SHARED`` : ON
|
||||
#
|
||||
# - Do not relink a target to any shared library dependencies when
|
||||
# only the shared library implementation has changed.
|
||||
#
|
||||
set(CMAKE_LINK_DEPENDS_NO_SHARED ON)
|
||||
|
||||
#.rst:
|
||||
# A custom ``validate_sources`` targets is declared to compare files listed
|
||||
# in `sources.cmake` scripts with on-disk files. As sources.cmake lists
|
||||
# source files of Geant4 explicitely, we can often a mismatch can occur
|
||||
# between this list and what's actually on disk.
|
||||
#
|
||||
# The ``validate_sources`` target executes a CMake script to
|
||||
# check for these errors and report mismatches. It fails with FATAL_ERROR
|
||||
# if any mismatch is found, but will not do so until it has reported
|
||||
# all errors.
|
||||
# Configure the script
|
||||
configure_file(
|
||||
${PROJECT_SOURCE_DIR}/cmake/Templates/geant4_validate_sources.cmake.in
|
||||
${PROJECT_BINARY_DIR}/geant4_validate_sources.cmake
|
||||
@ONLY
|
||||
)
|
||||
|
||||
# Create the target
|
||||
add_custom_target(validate_sources
|
||||
COMMAND ${CMAKE_COMMAND} -P ${PROJECT_BINARY_DIR}/geant4_validate_sources.cmake
|
||||
COMMENT "Validating Geant4 Module Source Lists"
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
#.rst:
|
||||
# General Installation Settings
|
||||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# CMake's builtin `GNUInstallDirs` module is used to set and provide variables
|
||||
# for the destinations to which for executables, libraries and other files
|
||||
# should be installed.
|
||||
#
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# Check for non-relocatable install directories
|
||||
foreach(dir
|
||||
BINDIR
|
||||
LIBDIR
|
||||
INCLUDEDIR
|
||||
DATAROOTDIR
|
||||
DATADIR
|
||||
MANDIR
|
||||
DOCDIR
|
||||
)
|
||||
if(IS_ABSOLUTE ${CMAKE_INSTALL_${dir}})
|
||||
set(CMAKE_INSTALL_IS_NONRELOCATABLE 1)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
#.rst:
|
||||
# The following CMake variables are additionally set to control install
|
||||
# policy and reporting:
|
||||
|
||||
#.rst:
|
||||
# - ``CMAKE_INSTALL_MESSAGE`` : ``LAZY``
|
||||
#
|
||||
# - Only report new or updated files installed by the ``install`` target.
|
||||
#
|
||||
set(CMAKE_INSTALL_MESSAGE LAZY)
|
||||
|
||||
#.rst:
|
||||
# An `uninstall` target is provided to assist in removing previously installed
|
||||
# files. It will not remove any installed directories per standard behaviour.
|
||||
# Note that if files are removed from the install manifest between invocations
|
||||
# of the `install` and `uninstall` targets, they will *not* be removed by the
|
||||
# latter.
|
||||
#
|
||||
include(CMakeUninstallTarget)
|
||||
|
||||
@@ -0,0 +1,238 @@
|
||||
#.rst:
|
||||
# G4CMakeUtilities
|
||||
# ----------------
|
||||
#
|
||||
# Extra functions and macros for encapsulating common tasks.
|
||||
#
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
# License and Disclaimer
|
||||
#
|
||||
# The Geant4 software is copyright of the Copyright Holders of
|
||||
# the Geant4 Collaboration. It is provided under the terms and
|
||||
# conditions of the Geant4 Software License, included in the file
|
||||
# LICENSE and available at http://cern.ch/geant4/license . These
|
||||
# include a list of copyright holders.
|
||||
#
|
||||
# Neither the authors of this software system, nor their employing
|
||||
# institutes,nor the agencies providing financial support for this
|
||||
# work make any representation or warranty, express or implied,
|
||||
# regarding this software system or assume any liability for its
|
||||
# use. Please see the license in the file LICENSE and URL above
|
||||
# for the full disclaimer and the limitation of liability.
|
||||
#
|
||||
# This code implementation is the result of the scientific and
|
||||
# technical work of the GEANT4 collaboration.
|
||||
# By using, copying, modifying or distributing the software (or
|
||||
# any work based on the software) you agree to acknowledge its
|
||||
# use in resulting scientific publications, and indicate your
|
||||
# acceptance of all terms of the Geant4 Software license.
|
||||
#
|
||||
#-----------------------------------------------------------------
|
||||
|
||||
if(NOT __G4CMAKEUTILITIES_INCLUDED)
|
||||
set(__G4CMAKEUTILITIES_INCLUDED TRUE)
|
||||
else()
|
||||
return()
|
||||
endif()
|
||||
|
||||
#.rst:
|
||||
# Included Modules
|
||||
# ^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# This module includes the following modules:
|
||||
include(CMakeDependentOption)
|
||||
include(Geant4MacroDefineModule)
|
||||
include(Geant4MacroLibraryTargets)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# CMAKE EXTENSIONS
|
||||
#-----------------------------------------------------------------------
|
||||
# macro set_ifnot(<var> <value>)
|
||||
# If variable var is not set, set its value to that provided
|
||||
#
|
||||
macro(set_ifnot _var _value)
|
||||
if(NOT ${_var})
|
||||
set(${_var} ${_value})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# function enum_option(<option>
|
||||
# VALUES <value1> ... <valueN>
|
||||
# TYPE <valuetype>
|
||||
# DOC <docstring>
|
||||
# [DEFAULT <elem>]
|
||||
# [CASE_INSENSITIVE])
|
||||
# Declare a cache variable <option> that can only take values
|
||||
# listed in VALUES. TYPE may be FILEPATH, PATH or STRING.
|
||||
# <docstring> should describe that option, and will appear in
|
||||
# the interactive CMake interfaces. If DEFAULT is provided,
|
||||
# <elem> will be taken as the zero-indexed element in VALUES
|
||||
# to which the value of <option> should default to if not
|
||||
# provided. Otherwise, the default is taken as the first
|
||||
# entry in VALUES. If CASE_INSENSITIVE is present, then
|
||||
# checks of the value of <option> against the allowed values
|
||||
# will ignore the case when performing string comparison.
|
||||
#
|
||||
function(enum_option _var)
|
||||
set(options CASE_INSENSITIVE)
|
||||
set(oneValueArgs DOC TYPE DEFAULT)
|
||||
set(multiValueArgs VALUES)
|
||||
cmake_parse_arguments(_ENUMOP "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
# - Validation as needed arguments
|
||||
if(NOT _ENUMOP_VALUES)
|
||||
message(FATAL_ERROR "enum_option must be called with non-empty VALUES\n(Called for enum_option '${_var}')")
|
||||
endif()
|
||||
|
||||
# - Set argument defaults as needed
|
||||
if(_ENUMOP_CASE_INSENSITIVE)
|
||||
set(_ci_values )
|
||||
foreach(_elem ${_ENUMOP_VALUES})
|
||||
string(TOLOWER "${_elem}" _ci_elem)
|
||||
list(APPEND _ci_values "${_ci_elem}")
|
||||
endforeach()
|
||||
set(_ENUMOP_VALUES ${_ci_values})
|
||||
endif()
|
||||
|
||||
set_ifnot(_ENUMOP_TYPE STRING)
|
||||
set_ifnot(_ENUMOP_DEFAULT 0)
|
||||
list(GET _ENUMOP_VALUES ${_ENUMOP_DEFAULT} _default)
|
||||
|
||||
if(NOT DEFINED ${_var})
|
||||
set(${_var} ${_default} CACHE ${_ENUMOP_TYPE} "${_ENUMOP_DOC} (${_ENUMOP_VALUES})")
|
||||
else()
|
||||
set(_var_tmp ${${_var}})
|
||||
if(_ENUMOP_CASE_INSENSITIVE)
|
||||
string(TOLOWER ${_var_tmp} _var_tmp)
|
||||
endif()
|
||||
|
||||
list(FIND _ENUMOP_VALUES ${_var_tmp} _elem)
|
||||
if(_elem LESS 0)
|
||||
message(FATAL_ERROR "Value '${${_var}}' for variable ${_var} is not allowed\nIt must be selected from the set: ${_ENUMOP_VALUES} (DEFAULT: ${_default})\n")
|
||||
else()
|
||||
# - convert to lowercase
|
||||
if(_ENUMOP_CASE_INSENSITIVE)
|
||||
set(${_var} ${_var_tmp} CACHE ${_ENUMOP_TYPE} "${_ENUMOP_DOC} (${_ENUMOP_VALUES})" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# GENERAL GEANT4
|
||||
#-----------------------------------------------------------------------
|
||||
# function geant4_add_feature(<NAME> <DOCSTRING>)
|
||||
# Add a Geant4 feature, whose activation is specified by the
|
||||
# existence of the variable <NAME>, to the list of enabled/disabled
|
||||
# features, plus a docstring describing the feature
|
||||
#
|
||||
function(geant4_add_feature _var _description)
|
||||
if(${_var})
|
||||
set_property(GLOBAL APPEND PROPERTY GEANT4_ENABLED_FEATURES ${_var})
|
||||
else()
|
||||
set_property(GLOBAL APPEND PROPERTY GEANT4_DISABLED_FEATURES ${_var})
|
||||
endif()
|
||||
|
||||
set_property(GLOBAL PROPERTY ${_var}_DESCRIPTION "${_description}")
|
||||
endfunction()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# function geant4_print_enabled_features()
|
||||
# Print enabled Geant4 features plus their docstrings.
|
||||
#
|
||||
function(geant4_print_enabled_features)
|
||||
set(_currentFeatureText "The following Geant4 features are enabled:")
|
||||
get_property(_enabledFeatures GLOBAL PROPERTY GEANT4_ENABLED_FEATURES)
|
||||
|
||||
foreach(_feature ${_enabledFeatures})
|
||||
set(_currentFeatureText "${_currentFeatureText}\n${_feature}")
|
||||
|
||||
get_property(_desc GLOBAL PROPERTY ${_feature}_DESCRIPTION)
|
||||
|
||||
if(_desc)
|
||||
set(_currentFeatureText "${_currentFeatureText}: ${_desc}")
|
||||
set(_desc NOTFOUND)
|
||||
endif(_desc)
|
||||
endforeach(_feature)
|
||||
|
||||
message(STATUS "${_currentFeatureText}\n")
|
||||
endfunction()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# GEANT4 DATASETS
|
||||
#-----------------------------------------------------------------------
|
||||
# function geant4_latest_version(<dir> <name> <output variable>)
|
||||
# Locate latest version of dataset <name> in <dir>, setting value
|
||||
# of output variable to the full path to the dataset
|
||||
#
|
||||
function(geant4_latest_version dir name var)
|
||||
file(GLOB files RELATIVE ${dir} ${dir}/${name}*)
|
||||
set(newer)
|
||||
foreach(file ${files})
|
||||
string(REPLACE ${name} "" version ${file})
|
||||
if("${version}" VERSION_GREATER "${newer}")
|
||||
set(newer ${version})
|
||||
endif()
|
||||
endforeach()
|
||||
set(${var} ${dir}/${name}${newer} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# GEANT4 TESTING
|
||||
#-----------------------------------------------------------------------
|
||||
# function geant4_add_unit_tests(test1 test2 ... [dir1 ...]
|
||||
# INCLUDE_DIRS dir1 dir2 ...
|
||||
# LIBRARIES library1 library2 ...)
|
||||
#
|
||||
function(geant4_add_unit_tests)
|
||||
cmake_parse_arguments(ARG "" "" "INCLUDE_DIRS;LIBRARIES" ${ARGN})
|
||||
|
||||
foreach(incdir ${ARG_INCLUDE_DIRS})
|
||||
if(IS_ABSOLUTE ${incdir})
|
||||
include_directories(${incdir})
|
||||
else()
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/${incdir})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(ARG_UNPARSED_ARGUMENTS)
|
||||
set(tnames ${ARG_UNPARSED_ARGUMENTS})
|
||||
else()
|
||||
set(tnames test*.cc)
|
||||
endif()
|
||||
|
||||
set(alltests)
|
||||
foreach(tname ${tnames})
|
||||
if(tname STREQUAL ".")
|
||||
set(tests ".")
|
||||
else()
|
||||
file(GLOB tests RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${tname})
|
||||
endif()
|
||||
set(alltests ${alltests} ${tests})
|
||||
endforeach()
|
||||
|
||||
if(NOT TARGET tests)
|
||||
add_custom_target(tests)
|
||||
endif()
|
||||
|
||||
foreach(test ${alltests})
|
||||
if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${test})
|
||||
file(GLOB sources ${test}/src/*.cc)
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/${test}/include)
|
||||
file(GLOB test ${test}/*.cc)
|
||||
else()
|
||||
set(sources)
|
||||
endif()
|
||||
get_filename_component(name ${test} NAME_WE)
|
||||
add_executable(${name} EXCLUDE_FROM_ALL ${test} ${sources})
|
||||
target_link_libraries(${name} ${ARG_LIBRARIES})
|
||||
set_target_properties(${name} PROPERTIES OUTPUT_NAME ${name})
|
||||
add_dependencies(tests ${name})
|
||||
add_test(NAME ${name} COMMAND ${name})
|
||||
set_property(TEST ${name} PROPERTY LABELS UnitTests)
|
||||
set_property(TEST ${name} PROPERTY TIMEOUT 60)
|
||||
endforeach()
|
||||
endfunction()
|
||||
@@ -0,0 +1,282 @@
|
||||
#.rst:
|
||||
# G4ConfigureCMakeHelpers
|
||||
# -----------------------
|
||||
#
|
||||
# This module configures and installs CMake modules allowing clients
|
||||
# to find and use Geant4 libraries using CMake's find_package command.
|
||||
#
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
# License and Disclaimer
|
||||
#
|
||||
# The Geant4 software is copyright of the Copyright Holders of
|
||||
# the Geant4 Collaboration. It is provided under the terms and
|
||||
# conditions of the Geant4 Software License, included in the file
|
||||
# LICENSE and available at http://cern.ch/geant4/license . These
|
||||
# include a list of copyright holders.
|
||||
#
|
||||
# Neither the authors of this software system, nor their employing
|
||||
# institutes,nor the agencies providing financial support for this
|
||||
# work make any representation or warranty, express or implied,
|
||||
# regarding this software system or assume any liability for its
|
||||
# use. Please see the license in the file LICENSE and URL above
|
||||
# for the full disclaimer and the limitation of liability.
|
||||
#
|
||||
# This code implementation is the result of the scientific and
|
||||
# technical work of the GEANT4 collaboration.
|
||||
# By using, copying, modifying or distributing the software (or
|
||||
# any work based on the software) you agree to acknowledge its
|
||||
# use in resulting scientific publications, and indicate your
|
||||
# acceptance of all terms of the Geant4 Software license.
|
||||
#
|
||||
#-----------------------------------------------------------------
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Collect all global variables we need to export to the config files
|
||||
# Do this here for now, later on we could collect them as we go.
|
||||
#
|
||||
|
||||
# Compiler flags (because user apps are a bit dependent on them...)
|
||||
set(GEANT4_COMPILER_FLAG_HINTS "#
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
set(Geant4_CXX_FLAGS \"${CMAKE_CXX_FLAGS} ${GEANT4_CXXSTD_FLAGS}\")
|
||||
set(Geant4_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS}\")")
|
||||
|
||||
foreach(_mode DEBUG MINSIZEREL RELEASE RELWITHDEBINFO)
|
||||
set(GEANT4_COMPILER_FLAG_HINTS "${GEANT4_COMPILER_FLAG_HINTS}
|
||||
set(Geant4_CXX_FLAGS_${_mode} \"${CMAKE_CXX_FLAGS_${_mode}}\")")
|
||||
endforeach()
|
||||
|
||||
if(NOT CMAKE_CONFIGURATION_TYPES)
|
||||
set(GEANT4_COMPILER_FLAG_HINTS "${GEANT4_COMPILER_FLAG_HINTS}
|
||||
set(Geant4_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\")")
|
||||
endif()
|
||||
|
||||
# Core compile definitions...
|
||||
set(GEANT4_CORE_DEFINITIONS )
|
||||
|
||||
# Third party includes (libraries *should* be handled by the imports)
|
||||
set(GEANT4_THIRD_PARTY_INCLUDES )
|
||||
|
||||
# Imports of third party packages used with imported targets
|
||||
set(GEANT4_THIRD_PARTY_IMPORT_SETUP )
|
||||
|
||||
# Externals libraries that may be present
|
||||
set(GEANT4_EXTERNALS_TARGETS )
|
||||
|
||||
# - Stuff from Geant4LibraryBuildOptions.cmake
|
||||
if(GEANT4_BUILD_STORE_TRAJECTORY)
|
||||
list(APPEND GEANT4_CORE_DEFINITIONS -DG4_STORE_TRAJECTORY)
|
||||
endif()
|
||||
|
||||
if(GEANT4_BUILD_VERBOSE_CODE)
|
||||
list(APPEND GEANT4_CORE_DEFINITIONS -DG4VERBOSE)
|
||||
endif()
|
||||
|
||||
# - Stuff from Geant4OptionalComponents.cmake
|
||||
# - CLHEP
|
||||
# If it's internal, add it to the externals list
|
||||
if(NOT GEANT4_USE_SYSTEM_CLHEP)
|
||||
list(APPEND GEANT4_EXTERNALS_TARGETS G4clhep)
|
||||
endif()
|
||||
|
||||
# - Expat
|
||||
# If it's internal, add it to the externals list
|
||||
if(NOT GEANT4_USE_SYSTEM_EXPAT)
|
||||
list(APPEND GEANT4_EXTERNALS_TARGETS G4expat)
|
||||
endif()
|
||||
|
||||
# - ZLIB
|
||||
# If it's internal, add it to the externals list
|
||||
if(NOT GEANT4_USE_SYSTEM_ZLIB)
|
||||
list(APPEND GEANT4_EXTERNALS_TARGETS G4zlib)
|
||||
endif()
|
||||
|
||||
# - GDML
|
||||
# Need to include Xerces-C headers becuase these do appear in the public
|
||||
# interface of GDML. The library should then be in the LINK_INTERFACE of
|
||||
# persistency...
|
||||
if(GEANT4_USE_GDML)
|
||||
list(APPEND GEANT4_THIRD_PARTY_INCLUDES ${XERCESC_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
# - USolids
|
||||
# Compile definitions
|
||||
if(GEANT4_USE_USOLIDS OR GEANT4_USE_PARTIAL_USOLIDS)
|
||||
set(GEANT4_USE_USOLIDS_EITHER ON)
|
||||
list(APPEND GEANT4_CORE_DEFINITIONS ${GEANT4_USOLIDS_COMPILE_DEFINITIONS})
|
||||
|
||||
# System USolids headers, because these do appear in Geant4's
|
||||
# public interface. The library should be in the link interface
|
||||
# of G4geometry (may need refinding)
|
||||
list(APPEND GEANT4_THIRD_PARTY_INCLUDES "${USOLIDS_INCLUDE_DIRS} ${VECGEOM_EXTERNAL_INCLUDES}")
|
||||
endif()
|
||||
|
||||
# - Stuff from Geant4InterfaceOptions.cmake
|
||||
if(GEANT4_USE_QT)
|
||||
list(APPEND GEANT4_THIRD_PARTY_INCLUDES
|
||||
${QT_INCLUDE_DIR}
|
||||
${QT_QTCORE_INCLUDE_DIR}
|
||||
${QT_QTGUI_INCLUDE_DIR}
|
||||
${QT_QTOPENGL_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
# On WIN32, re-import the Qt targets.
|
||||
if(WIN32)
|
||||
set(GEANT4_QT4_IMPORT_SETUP "
|
||||
# Qt reimport on WIN32
|
||||
set(QT_QMAKE_EXECUTABLE ${QT_QMAKE_EXECUTABLE})
|
||||
set(QT_USE_IMPORTED_TARGETS ON)
|
||||
find_package(Qt4 REQUIRED)
|
||||
")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - Generate Build Tree Configuration Files
|
||||
#-----------------------------------------------------------------------
|
||||
# Set needed variables for the build tree
|
||||
set(GEANT4_CMAKE_DIR "${PROJECT_BINARY_DIR}")
|
||||
|
||||
# Set include path for build tree. This is always an absolute path, or
|
||||
# rather paths. We extract the paths from the global
|
||||
# GEANT4_BUILDTREE_INCLUDE_DIRS property and use this to create the
|
||||
# header setup
|
||||
#
|
||||
get_property(__geant4_buildtree_include_dirs GLOBAL PROPERTY
|
||||
GEANT4_BUILDTREE_INCLUDE_DIRS
|
||||
)
|
||||
|
||||
set(GEANT4_INCLUDE_DIR_SETUP "
|
||||
# Geant4 configured for use from the build tree - absolute paths are used.
|
||||
set(Geant4_INCLUDE_DIR ${__geant4_buildtree_include_dirs})
|
||||
")
|
||||
|
||||
set(GEANT4_MODULE_PATH_SETUP "
|
||||
# Geant4 configured for use CMake modules from source tree
|
||||
set(CMAKE_MODULE_PATH \${CMAKE_MODULE_PATH} ${CMAKE_MODULE_PATH})
|
||||
")
|
||||
|
||||
# Geant4 data used in build tree
|
||||
geant4_export_datasets(BUILD GEANT4_DATASET_DESCRIPTIONS)
|
||||
|
||||
# Export targets from the build tree. We rely on the GEANT4_EXPORTED_TARGETS
|
||||
# global property to list these for us.
|
||||
#
|
||||
get_property(__geant4_exported_targets GLOBAL PROPERTY GEANT4_EXPORTED_TARGETS)
|
||||
|
||||
export(TARGETS ${__geant4_exported_targets}
|
||||
FILE ${PROJECT_BINARY_DIR}/Geant4LibraryDepends.cmake
|
||||
)
|
||||
|
||||
# Configure the build tree config file...
|
||||
configure_file(
|
||||
${PROJECT_SOURCE_DIR}/cmake/Templates/Geant4Config.cmake.in
|
||||
${PROJECT_BINARY_DIR}/Geant4Config.cmake
|
||||
@ONLY
|
||||
)
|
||||
|
||||
# Configure the build tree versioning file
|
||||
configure_file(
|
||||
${PROJECT_SOURCE_DIR}/cmake/Templates/Geant4ConfigVersion.cmake.in
|
||||
${PROJECT_BINARY_DIR}/Geant4ConfigVersion.cmake
|
||||
@ONLY
|
||||
)
|
||||
|
||||
# Copy the custom modules into the build tree
|
||||
configure_file(
|
||||
${PROJECT_SOURCE_DIR}/cmake/Modules/IntelCompileFeatures.cmake
|
||||
${PROJECT_BINARY_DIR}/Modules/IntelCompileFeatures.cmake
|
||||
COPYONLY
|
||||
)
|
||||
|
||||
foreach(_mod AIDA HepMC Pythia6 ROOT StatTest TBB)
|
||||
configure_file(
|
||||
${PROJECT_SOURCE_DIR}/cmake/Modules/Find${_mod}.cmake
|
||||
${PROJECT_BINARY_DIR}/Modules/Find${_mod}.cmake
|
||||
COPYONLY
|
||||
)
|
||||
endforeach()
|
||||
|
||||
# Copy the Main and Internal Use file into the build tree
|
||||
configure_file(
|
||||
${PROJECT_SOURCE_DIR}/cmake/Templates/UseGeant4.cmake
|
||||
${PROJECT_BINARY_DIR}/UseGeant4.cmake
|
||||
COPYONLY
|
||||
)
|
||||
|
||||
configure_file(
|
||||
${PROJECT_SOURCE_DIR}/cmake/Templates/UseGeant4_internal.cmake
|
||||
${PROJECT_BINARY_DIR}/UseGeant4_internal.cmake
|
||||
COPYONLY
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - Generate Install Tree Configuration Files
|
||||
#-----------------------------------------------------------------------
|
||||
# Set needed variables for the install tree
|
||||
set(GEANT4_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}-${${PROJECT_NAME}_VERSION})
|
||||
|
||||
# Header path for install tree is dependent on whether we have a relocatable
|
||||
# install.
|
||||
if(CMAKE_INSTALL_IS_NONRELOCATABLE)
|
||||
# Use ABSOLUTE paths...
|
||||
set(GEANT4_INCLUDE_DIR_SETUP "
|
||||
# Geant4 configured for the install tree with absolute paths, so use these
|
||||
set(Geant4_INCLUDE_DIR \"${CMAKE_INSTALL_FULL_INCLUDEDIR}/Geant4\")
|
||||
")
|
||||
else()
|
||||
# Use RELATIVE paths... Where we measure relative to GEANT4_CMAKE_DIR
|
||||
file(RELATIVE_PATH GEANT4_RELATIVE_HEADER_PATH
|
||||
${CMAKE_INSTALL_PREFIX}/${GEANT4_CMAKE_DIR}
|
||||
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
|
||||
)
|
||||
|
||||
set(GEANT4_INCLUDE_DIR_SETUP "
|
||||
# Geant4 configured for the install with relative paths, so use these
|
||||
get_filename_component(Geant4_INCLUDE_DIR \"\${_geant4_thisdir}/${GEANT4_RELATIVE_HEADER_PATH}\" ABSOLUTE)
|
||||
")
|
||||
endif()
|
||||
|
||||
set(GEANT4_MODULE_PATH_SETUP)
|
||||
|
||||
# Geant4 data used in install tree
|
||||
geant4_export_datasets(INSTALL GEANT4_DATASET_DESCRIPTIONS)
|
||||
|
||||
# Install exported targets file for the install tree - we just install
|
||||
# the named export
|
||||
install(EXPORT Geant4LibraryDepends
|
||||
DESTINATION ${GEANT4_CMAKE_DIR}
|
||||
COMPONENT Development
|
||||
)
|
||||
|
||||
# Configure the install tree config file...
|
||||
configure_file(
|
||||
${PROJECT_SOURCE_DIR}/cmake/Templates/Geant4Config.cmake.in
|
||||
${PROJECT_BINARY_DIR}/InstallTreeFiles/Geant4Config.cmake
|
||||
@ONLY
|
||||
)
|
||||
|
||||
# Configure the install tree config versioning file...
|
||||
configure_file(
|
||||
${PROJECT_SOURCE_DIR}/cmake/Templates/Geant4ConfigVersion.cmake.in
|
||||
${PROJECT_BINARY_DIR}/InstallTreeFiles/Geant4ConfigVersion.cmake
|
||||
@ONLY
|
||||
)
|
||||
|
||||
# Install the config, config versioning and use files
|
||||
install(FILES
|
||||
${PROJECT_BINARY_DIR}/InstallTreeFiles/Geant4Config.cmake
|
||||
${PROJECT_BINARY_DIR}/InstallTreeFiles/Geant4ConfigVersion.cmake
|
||||
${PROJECT_SOURCE_DIR}/cmake/Templates/UseGeant4.cmake
|
||||
DESTINATION ${GEANT4_CMAKE_DIR}
|
||||
COMPONENT Development
|
||||
)
|
||||
|
||||
# Install the custom modules for the examples
|
||||
install(DIRECTORY
|
||||
${PROJECT_BINARY_DIR}/Modules
|
||||
DESTINATION ${GEANT4_CMAKE_DIR}
|
||||
COMPONENT Development
|
||||
)
|
||||
|
||||
@@ -0,0 +1,974 @@
|
||||
#.rst:
|
||||
# G4ConfigureGNUMakeHelpers
|
||||
# -------------------------
|
||||
#
|
||||
# This module configures and installs GNU Makefile fragments which
|
||||
# clients can include in their Makefiles to utilize Geant4's
|
||||
# Make-based application building toolchain.
|
||||
#
|
||||
# The GNU make based buildsystem for Geant4 provides a toolchain for
|
||||
# users building simple Geant4 applications. The old style build and
|
||||
# install of Geant4 provides a customized set of non-standard install
|
||||
# paths with use of the toolchain dependent on environment variables
|
||||
# pointing to the install paths.
|
||||
#
|
||||
# This script processes information on the CMake install paths, system
|
||||
# and compiler to determine the following variables for backward
|
||||
# compatibility:
|
||||
#
|
||||
# GEANT4_SYSTEM Old style system name, e.g. 'Linux', 'Darwin'
|
||||
# or 'WIN32'
|
||||
#
|
||||
# GEANT4_COMPILER Old system compiler id, e.g. 'g++', 'VC'.
|
||||
#
|
||||
# G4INSTALL Location of 'config' subdirectory which contains
|
||||
# all the GNU make toolchain fragments
|
||||
#
|
||||
# G4INCLUDE Old style path to location of Geant4 headers
|
||||
#
|
||||
# G4LIB Old style library directory path. Rather than
|
||||
# containing the actual libraries, it is expected to
|
||||
# contain subdirectories named
|
||||
# GEANT4_SYSTEM-GEANT4_COMPILER
|
||||
#
|
||||
# These variables are used in a CMake configuration file which is used
|
||||
# to generate shell scripts (C and Bourne flavour) the user can source
|
||||
# to set up their environment for use of the old toolchain.
|
||||
# These replace the old 'env.(c)sh' scripts to allow users to work with
|
||||
# the new CMake built libraries transparently if their application
|
||||
# relies on the old style toolchain.
|
||||
#
|
||||
# The scripts are generated for both the build and install trees so that
|
||||
# developers wishing to write test applications do not have to install
|
||||
# their fresh build of Geant4.
|
||||
#
|
||||
# Compatibility with the library path style:
|
||||
#
|
||||
# <prefix>/lib/G4SYSTEM-G4COMPILER
|
||||
#
|
||||
# is provided by installing a directory 'geant4-<version>' in the
|
||||
# <prefix>/lib directory and creating a symbolic link inside here
|
||||
# pointing up one directory level.
|
||||
# This will not work on Windows however, and here users are recommended
|
||||
# to use Visual Studio directly, or to use CMake for application
|
||||
# configuration.
|
||||
#
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
# License and Disclaimer
|
||||
#
|
||||
# The Geant4 software is copyright of the Copyright Holders of
|
||||
# the Geant4 Collaboration. It is provided under the terms and
|
||||
# conditions of the Geant4 Software License, included in the file
|
||||
# LICENSE and available at http://cern.ch/geant4/license . These
|
||||
# include a list of copyright holders.
|
||||
#
|
||||
# Neither the authors of this software system, nor their employing
|
||||
# institutes,nor the agencies providing financial support for this
|
||||
# work make any representation or warranty, express or implied,
|
||||
# regarding this software system or assume any liability for its
|
||||
# use. Please see the license in the file LICENSE and URL above
|
||||
# for the full disclaimer and the limitation of liability.
|
||||
#
|
||||
# This code implementation is the result of the scientific and
|
||||
# technical work of the GEANT4 collaboration.
|
||||
# By using, copying, modifying or distributing the software (or
|
||||
# any work based on the software) you agree to acknowledge its
|
||||
# use in resulting scientific publications, and indicate your
|
||||
# acceptance of all terms of the Geant4 Software license.
|
||||
#
|
||||
#-----------------------------------------------------------------
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# GEANT4GMAKE
|
||||
# On Unices, we try to make the output directory backward compatible
|
||||
# with the old style 'SYSTEM-COMPILER' format so that applications may be
|
||||
# built against the targets in the build tree.
|
||||
#
|
||||
# Note that for multi-configuration generators like VS and Xcode, these
|
||||
# directories will have the configuration type (e.g. Debug) appended to
|
||||
# them, so are not backward compatible with the old Make toolchain in
|
||||
# these cases.
|
||||
#
|
||||
# Also, we only do this on UNIX because we don't support Geant4GMake on
|
||||
# Windows and also want to avoid mixing static and dynamic libraries on
|
||||
# windows until the differences are better understood.
|
||||
#------------------------------------------------------------------------
|
||||
# Determine the backward compatible system name
|
||||
#
|
||||
if(NOT WIN32)
|
||||
set(GEANT4_SYSTEM ${CMAKE_SYSTEM_NAME})
|
||||
else()
|
||||
set(GEANT4_SYSTEM "WIN32")
|
||||
endif()
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Determine the backward compatible compiler name
|
||||
# NB: At present Clang detection only works on CMake > 2.8.1
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(GEANT4_COMPILER "g++")
|
||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
|
||||
set(GEANT4_COMPILER "clang")
|
||||
|
||||
# - Newer g++ on OS X may identify as Clang
|
||||
if(APPLE AND (CMAKE_CXX_COMPILER MATCHES ".*g\\+\\+"))
|
||||
set(GEANT4_COMPILER "g++")
|
||||
endif()
|
||||
|
||||
elseif(MSVC)
|
||||
set(GEANT4_COMPILER "VC")
|
||||
elseif(CMAKE_CXX_COMPILER MATCHES "icpc.*|icc.*")
|
||||
set(GEANT4_COMPILER "icc")
|
||||
else()
|
||||
set(GEANT4_COMPILER "UNSUPPORTED")
|
||||
endif()
|
||||
|
||||
# - Create libdir/softlink to fool geant4make, but only for single mode case
|
||||
if(UNIX AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
if(NOT EXISTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${GEANT4_SYSTEM}-${GEANT4_COMPILER}")
|
||||
file(MAKE_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink . ${GEANT4_SYSTEM}-${GEANT4_COMPILER}
|
||||
WORKING_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - Functions and Macros to help configuration of shell scripts.
|
||||
#-----------------------------------------------------------------------
|
||||
# macro _g4tc_shell_setup(<shell>)
|
||||
# Set shell parameters such as program, family and common builtins
|
||||
# for supplied shell (e.g. 'bourne' or 'cshell'
|
||||
#
|
||||
macro(_g4tc_shell_setup SHELL_FAMILY)
|
||||
if(${SHELL_FAMILY} STREQUAL "bourne")
|
||||
set(GEANT4_TC_SHELL_PROGRAM "/bin/sh")
|
||||
set(GEANT4_TC_SHELL_FAMILY "Bourne shell")
|
||||
set(GEANT4_TC_UNSET_COMMAND "unset")
|
||||
set(GEANT4_TC_SHELL_EXTENSION ".sh")
|
||||
elseif(${SHELL_FAMILY} STREQUAL "cshell")
|
||||
set(GEANT4_TC_SHELL_PROGRAM "/bin/csh")
|
||||
set(GEANT4_TC_SHELL_FAMILY "C shell")
|
||||
set(GEANT4_TC_UNSET_COMMAND "unsetenv")
|
||||
set(GEANT4_TC_SHELL_EXTENSION ".csh")
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported shell '${SHELL_FAMILY}'")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# function _g4tc_selflocate(<output> <shell> <script> <variable name>)
|
||||
# Set output to string containing shell commands needed to
|
||||
# locate the directory in which script is located if the
|
||||
# script is sourced. This derived location is set as the
|
||||
# value of the shell variable name.
|
||||
#
|
||||
function(_g4tc_selflocate TEMPLATE_NAME SHELL_FAMILY SCRIPT_NAME LOCATION_VARIABLE)
|
||||
if(${SHELL_FAMILY} STREQUAL "bourne")
|
||||
set(${TEMPLATE_NAME}
|
||||
"# Self locate script when sourced
|
||||
if [ -z \"\$BASH_VERSION\" ]; then
|
||||
# Not bash, so rely on sourcing from correct location
|
||||
if [ ! -f ${SCRIPT_NAME}${GEANT4_TC_SHELL_EXTENSION} ]; then
|
||||
echo 'ERROR: ${SCRIPT_NAME}${GEANT4_TC_SHELL_EXTENSION} could NOT self-locate Geant4 installation'
|
||||
echo 'This is most likely because you are using ksh, zsh or similar'
|
||||
echo 'To fix this issue, cd to the directory containing this script'
|
||||
echo 'and source it in that directory.'
|
||||
return 1
|
||||
fi
|
||||
${LOCATION_VARIABLE}=\$\(pwd\)
|
||||
else
|
||||
g4sls_sourced_dir=\$\(dirname \${BASH_ARGV[0]}\)
|
||||
${LOCATION_VARIABLE}=$\(cd \$g4sls_sourced_dir > /dev/null ; pwd\)
|
||||
fi
|
||||
"
|
||||
PARENT_SCOPE
|
||||
)
|
||||
# For bourne shell, set the values of the guard variables
|
||||
set(GEANT4_TC_IF_SELFLOCATED "" PARENT_SCOPE)
|
||||
set(GEANT4_TC_ENDIF_SELFLOCATED "" PARENT_SCOPE)
|
||||
|
||||
|
||||
elseif(${SHELL_FAMILY} STREQUAL "cshell")
|
||||
set(${TEMPLATE_NAME}
|
||||
"# Self locate script when sourced
|
||||
# If sourced interactively, we can use $_ as this should be
|
||||
#
|
||||
# source path_to_script_dir/${SCRIPT_NAME}${GEANT4_TC_SHELL_EXTENSION}
|
||||
#
|
||||
unset g4sls_sourced_dir
|
||||
unset ${LOCATION_VARIABLE}
|
||||
|
||||
set ARGS=($_)
|
||||
if (\"$ARGS\" != \"\") then
|
||||
if (\"$ARGS[2]\" =~ */${SCRIPT_NAME}${GEANT4_TC_SHELL_EXTENSION}) then
|
||||
set g4sls_sourced_dir=\"`dirname \${ARGS[2]}`\"
|
||||
endif
|
||||
endif
|
||||
|
||||
if (! \$?g4sls_sourced_dir) then
|
||||
# Oh great, we were sourced non-interactively. This means that $_
|
||||
# won't be set, so we need an external source of information on
|
||||
# where the script is located.
|
||||
# We obtain this in one of two ways:
|
||||
# 1) Current directory:
|
||||
# cd script_dir ; source ${SCRIPT_NAME}${GEANT4_TC_SHELL_EXTENSION}
|
||||
#
|
||||
# 2) Supply the directory as an argument to the script:
|
||||
# source script_dir/${SCRIPT_NAME}${GEANT4_TC_SHELL_EXTENSION} script_dir
|
||||
#
|
||||
if ( -e ${SCRIPT_NAME}${GEANT4_TC_SHELL_EXTENSION} ) then
|
||||
set g4sls_sourced_dir=\"`pwd`\"
|
||||
else if ( \"\$1\" != \"\" ) then
|
||||
if ( -e \${1}/${SCRIPT_NAME}${GEANT4_TC_SHELL_EXTENSION} ) then
|
||||
set g4sls_sourced_dir=\${1}
|
||||
else
|
||||
echo \"ERROR \${1} does not contain a Geant4 installation\"
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if (! \$?g4sls_sourced_dir) then
|
||||
echo \"ERROR: ${SCRIPT_NAME}${GEANT4_TC_SHELL_EXTENSION} could NOT self-locate Geant4 installation\"
|
||||
echo \"because it was sourced (i.e. embedded) in another script.\"
|
||||
echo \"This is due to limitations of (t)csh but can be worked around by providing\"
|
||||
echo \"the directory where ${SCRIPT_NAME}${GEANT4_TC_SHELL_EXTENSION} is located\"
|
||||
echo \"to it, either via cd-ing to the directory before sourcing:\"
|
||||
echo \" cd where_script_is ; source ${SCRIPT_NAME}${GEANT4_TC_SHELL_EXTENSION}\"
|
||||
echo \"or by supplying the directory as an argument to the script:\"
|
||||
echo \" source where_script_is/${SCRIPT_NAME}${GEANT4_TC_SHELL_EXTENSION} where_script_is\"
|
||||
echo \" \"
|
||||
exit 1
|
||||
endif
|
||||
|
||||
set ${LOCATION_VARIABLE}=\"`cd \${g4sls_sourced_dir} > /dev/null ; pwd`\"
|
||||
"
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
# For C-shell, set the values of the guard variables
|
||||
set(GEANT4_TC_IF_SELFLOCATED "" PARENT_SCOPE)
|
||||
set(GEANT4_TC_ENDIF_SELFLOCATED "" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# function _g4tc_setenv_command(<output> <shell> <name> <value>)
|
||||
# Set output to a string whose value is the shell command to
|
||||
# set an environment variable with name and value
|
||||
#
|
||||
function(_g4tc_setenv_command TEMPLATE_NAME SHELL_FAMILY VARIABLE_NAME VARIABLE_VALUE)
|
||||
if(${SHELL_FAMILY} STREQUAL "bourne")
|
||||
set(${TEMPLATE_NAME}
|
||||
"export ${VARIABLE_NAME}=${VARIABLE_VALUE}"
|
||||
PARENT_SCOPE
|
||||
)
|
||||
elseif(${SHELL_FAMILY} STREQUAL "cshell")
|
||||
set(${TEMPLATE_NAME}
|
||||
"setenv ${VARIABLE_NAME} ${VARIABLE_VALUE}"
|
||||
PARENT_SCOPE
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# function _g4tc_setenv_ifnotset_command(<output> <shell> <name> <value>)
|
||||
# Set output to a string whose value is the shell command to
|
||||
# set an environment variable with name and value if the
|
||||
# variable is not already set
|
||||
#
|
||||
function(_g4tc_setenv_ifnotset_command TEMPLATE_NAME SHELL_FAMILY VARIABLE_NAME VARIABLE_VALUE)
|
||||
# -- bourne
|
||||
if(${SHELL_FAMILY} STREQUAL "bourne")
|
||||
# Have to make this section verbatim to get correct formatting
|
||||
set(${TEMPLATE_NAME}
|
||||
"
|
||||
if test \"x\$${VARIABLE_NAME}\" = \"x\" ; then
|
||||
export ${VARIABLE_NAME}=${VARIABLE_VALUE}
|
||||
fi
|
||||
"
|
||||
PARENT_SCOPE
|
||||
)
|
||||
# -- cshell
|
||||
elseif(${SHELL_FAMILY} STREQUAL "cshell")
|
||||
# Again, verbatim to get correct formatting...
|
||||
set(${TEMPLATE_NAME}
|
||||
"
|
||||
if ( ! \${?${VARIABLE_NAME}} ) then
|
||||
setenv ${VARIABLE_NAME} ${VARIABLE_VALUE}
|
||||
endif
|
||||
"
|
||||
PARENT_SCOPE
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# function _g4tc_prepend_path(<output> <shell> <name> <value>)
|
||||
# Set output to a string whose value is the shell command to
|
||||
# prepend supplied value to the path style environment variable
|
||||
# name (e.g. 'PATH')
|
||||
#
|
||||
function(_g4tc_prepend_path TEMPLATE_NAME SHELL_FAMILY PATH_VARIABLE
|
||||
APPEND_VARIABLE)
|
||||
# -- bourne block
|
||||
if(${SHELL_FAMILY} STREQUAL "bourne")
|
||||
# We have to make this section verbatim
|
||||
set(${TEMPLATE_NAME}
|
||||
"
|
||||
if test \"x\$${PATH_VARIABLE}\" = \"x\" ; then
|
||||
export ${PATH_VARIABLE}=${APPEND_VARIABLE}
|
||||
else
|
||||
export ${PATH_VARIABLE}=${APPEND_VARIABLE}:\${${PATH_VARIABLE}}
|
||||
fi
|
||||
"
|
||||
PARENT_SCOPE
|
||||
)
|
||||
# -- cshell block
|
||||
elseif(${SHELL_FAMILY} STREQUAL "cshell")
|
||||
# Again, this is verbatim so final output is formatted correctly
|
||||
set(${TEMPLATE_NAME}
|
||||
"
|
||||
if ( ! \${?${PATH_VARIABLE}} ) then
|
||||
setenv ${PATH_VARIABLE} ${APPEND_VARIABLE}
|
||||
else
|
||||
setenv ${PATH_VARIABLE} ${APPEND_VARIABLE}:\${${PATH_VARIABLE}}
|
||||
endif
|
||||
"
|
||||
PARENT_SCOPE
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# function _g4tc_append_path(<output> <shell> <name> <value>)
|
||||
# Set output to a string whose value is the shell command to
|
||||
# append supplied value to the path style environment variable
|
||||
# name (e.g. 'PATH')
|
||||
#
|
||||
function(_g4tc_append_path TEMPLATE_NAME SHELL_FAMILY PATH_VARIABLE
|
||||
APPEND_VARIABLE)
|
||||
# -- bourne block
|
||||
if(${SHELL_FAMILY} STREQUAL "bourne")
|
||||
# We have to make this section verbatim
|
||||
set(${TEMPLATE_NAME}
|
||||
"
|
||||
if test \"x\$${PATH_VARIABLE}\" = \"x\" ; then
|
||||
export ${PATH_VARIABLE}=${APPEND_VARIABLE}
|
||||
else
|
||||
export ${PATH_VARIABLE}=\${${PATH_VARIABLE}}:${APPEND_VARIABLE}
|
||||
fi
|
||||
"
|
||||
PARENT_SCOPE
|
||||
)
|
||||
# -- cshell block
|
||||
elseif(${SHELL_FAMILY} STREQUAL "cshell")
|
||||
# Again, this is verbatim so final output is formatted correctly
|
||||
set(${TEMPLATE_NAME}
|
||||
"
|
||||
if ( ! \${?${PATH_VARIABLE}} ) then
|
||||
setenv ${PATH_VARIABLE} ${APPEND_VARIABLE}
|
||||
else
|
||||
setenv ${PATH_VARIABLE} \${${PATH_VARIABLE}}:${APPEND_VARIABLE}
|
||||
endif
|
||||
"
|
||||
PARENT_SCOPE
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# MACRO(_g4tc_configure_tc_variables)
|
||||
# Macro to perform the actual setting of the low level toolchain variables
|
||||
# which need to be set in the final shell files.
|
||||
# We do this in a separate macro so that we can wrap it in different ways for
|
||||
# the install and build trees.
|
||||
#
|
||||
macro(_g4tc_configure_tc_variables SHELL_FAMILY SCRIPT_NAME)
|
||||
# - Set up the requested shell
|
||||
_g4tc_shell_setup(${SHELL_FAMILY})
|
||||
|
||||
# - Locate self
|
||||
_g4tc_selflocate(GEANT4_TC_LOCATE_SELF_COMMAND ${SHELL_FAMILY} ${SCRIPT_NAME} geant4make_root)
|
||||
|
||||
|
||||
# - Standard Setup and Paths
|
||||
_g4tc_setenv_command(GEANT4_TC_G4SYSTEM ${SHELL_FAMILY} G4SYSTEM ${G4SYSTEM})
|
||||
_g4tc_setenv_command(GEANT4_TC_G4INSTALL ${SHELL_FAMILY} G4INSTALL ${G4INSTALL})
|
||||
_g4tc_setenv_command(GEANT4_TC_G4INCLUDE ${SHELL_FAMILY} G4INCLUDE ${G4INCLUDE})
|
||||
|
||||
_g4tc_prepend_path(GEANT4_TC_G4BIN_PATH_SETUP ${SHELL_FAMILY} PATH ${G4BIN_DIR})
|
||||
|
||||
_g4tc_setenv_command(GEANT4_TC_G4LIB ${SHELL_FAMILY} G4LIB ${G4LIB})
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
_g4tc_prepend_path(GEANT4_TC_G4LIB_PATH_SETUP ${SHELL_FAMILY} LD_LIBRARY_PATH ${G4LIB_DIR})
|
||||
endif()
|
||||
|
||||
_g4tc_setenv_ifnotset_command(GEANT4_TC_G4WORKDIR_SETUP ${SHELL_FAMILY} G4WORKDIR ${G4WORKDIR_DEFAULT})
|
||||
_g4tc_prepend_path(GEANT4_TC_G4WORKDIR_PATH_SETUP ${SHELL_FAMILY} PATH
|
||||
\${G4WORKDIR}/bin/\${G4SYSTEM})
|
||||
|
||||
# - Geant4 Library build setup
|
||||
# We prefer shared libs if these are built, otherwise fall back to static
|
||||
# On Win32, we also want DLLs?
|
||||
if(BUILD_SHARED_LIBS)
|
||||
_g4tc_setenv_command(GEANT4_TC_G4LIB_BUILD_SHARED ${SHELL_FAMILY} G4LIB_BUILD_SHARED 1)
|
||||
if(WIN32)
|
||||
_g4tc_setenv_command(GEANT4_TC_G4LIB_USE_DLL ${SHELL_FAMILY} G4LIB_USE_DLL 1)
|
||||
endif()
|
||||
else()
|
||||
_g4tc_setenv_command(GEANT4_TC_G4LIB_BUILD_STATIC ${SHELL_FAMILY} G4LIB_BUILD_STATIC 1)
|
||||
endif()
|
||||
|
||||
# - Multithreading
|
||||
if(GEANT4_BUILD_MULTITHREADED)
|
||||
_g4tc_setenv_command(GEANT4_TC_G4MULTITHREADED ${SHELL_FAMILY} G4MULTITHREADED 1)
|
||||
endif()
|
||||
|
||||
# - Resource file paths
|
||||
set(GEANT4_TC_DATASETS )
|
||||
foreach(_ds ${GEANT4_EXPORTED_DATASETS})
|
||||
_g4tc_setenv_command(_dssetenvcmd ${SHELL_FAMILY} ${${_ds}_ENVVAR} ${${_ds}_PATH})
|
||||
set(GEANT4_TC_DATASETS "${GEANT4_TC_DATASETS}${_dssetenvcmd}\n")
|
||||
endforeach()
|
||||
|
||||
set(GEANT4_TC_TOOLS_FONT_PATH "# FREETYPE SUPPORT NOT AVAILABLE")
|
||||
if(GEANT4_USE_FREETYPE)
|
||||
_g4tc_prepend_path(GEANT4_TC_TOOLS_FONT_PATH
|
||||
${SHELL_FAMILY}
|
||||
TOOLS_FONT_PATH
|
||||
"${TOOLS_FONT_PATH}"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
# - CLHEP...
|
||||
if(GEANT4_USE_SYSTEM_CLHEP)
|
||||
# Have to use detected CLHEP paths to set base dir and others
|
||||
get_filename_component(_CLHEP_INCLUDE_DIR "${CLHEP_INCLUDE_DIR}" REALPATH)
|
||||
get_filename_component(_CLHEP_BASE_DIR "${_CLHEP_INCLUDE_DIR}" DIRECTORY)
|
||||
|
||||
# Handle granular vs singular cases
|
||||
if(GEANT4_USE_SYSTEM_CLHEP_GRANULAR)
|
||||
get_target_property(_CLHEP_LIB_DIR CLHEP::Vector LOCATION)
|
||||
else()
|
||||
get_target_property(_CLHEP_LIB_DIR CLHEP::CLHEP LOCATION)
|
||||
endif()
|
||||
|
||||
get_filename_component(_CLHEP_LIB_DIR "${_CLHEP_LIB_DIR}" REALPATH)
|
||||
get_filename_component(_CLHEP_LIB_DIR "${_CLHEP_LIB_DIR}" DIRECTORY)
|
||||
|
||||
set(GEANT4_TC_G4LIB_USE_CLHEP "# USING SYSTEM CLHEP")
|
||||
_g4tc_setenv_command(GEANT4_TC_CLHEP_BASE_DIR ${SHELL_FAMILY} CLHEP_BASE_DIR "${_CLHEP_BASE_DIR}")
|
||||
_g4tc_setenv_command(GEANT4_TC_CLHEP_INCLUDE_DIR ${SHELL_FAMILY} CLHEP_INCLUDE_DIR "${_CLHEP_INCLUDE_DIR}")
|
||||
|
||||
# Only need to handle CLHEP_LIB for granular case
|
||||
if(GEANT4_USE_SYSTEM_CLHEP_GRANULAR)
|
||||
set(G4_SYSTEM_CLHEP_LIBRARIES )
|
||||
foreach(_clhep_lib ${CLHEP_LIBRARIES})
|
||||
get_target_property(_CLHEP_LIB_NAME ${_clhep_lib} LOCATION)
|
||||
get_filename_component(_curlib "${_CLHEP_LIB_NAME}" NAME)
|
||||
string(REGEX REPLACE "^lib(.*)\\.(so|a|dylib|lib|dll)$" "\\1" _curlib "${_curlib}")
|
||||
set(G4_SYSTEM_CLHEP_LIBRARIES "${G4_SYSTEM_CLHEP_LIBRARIES} -l${_curlib}")
|
||||
endforeach()
|
||||
|
||||
# Strip first "-l" as that's prepended by Geant4Make
|
||||
string(REGEX REPLACE "^ *\\-l" "" G4_SYSTEM_CLHEP_LIBRARIES "${G4_SYSTEM_CLHEP_LIBRARIES}")
|
||||
|
||||
_g4tc_setenv_command(GEANT4_TC_CLHEP_LIB ${SHELL_FAMILY} CLHEP_LIB "\"${G4_SYSTEM_CLHEP_LIBRARIES}\"")
|
||||
endif()
|
||||
|
||||
_g4tc_setenv_command(GEANT4_TC_CLHEP_LIB_DIR ${SHELL_FAMILY} CLHEP_LIB_DIR ${_CLHEP_LIB_DIR})
|
||||
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
_g4tc_prepend_path(GEANT4_TC_CLHEP_LIB_PATH_SETUP ${SHELL_FAMILY} LD_LIBRARY_PATH \${CLHEP_LIB_DIR})
|
||||
endif()
|
||||
|
||||
else()
|
||||
# We have to configure things to point to the internal CLHEP...
|
||||
# Probably sufficient to do nothing...
|
||||
set(GEANT4_TC_G4LIB_USE_CLHEP "# USING INTERNAL CLHEP")
|
||||
endif()
|
||||
|
||||
# - EXPAT
|
||||
if(GEANT4_USE_SYSTEM_EXPAT)
|
||||
set(GEANT4_TC_G4LIB_USE_EXPAT "# USING SYSTEM EXPAT")
|
||||
else()
|
||||
_g4tc_setenv_command(GEANT4_TC_G4LIB_USE_EXPAT ${SHELL_FAMILY} G4LIB_USE_EXPAT 1)
|
||||
endif()
|
||||
|
||||
# - ZLIB...
|
||||
if(GEANT4_USE_SYSTEM_ZLIB)
|
||||
set(GEANT4_TC_G4LIB_USE_ZLIB "# USING SYSTEM ZLIB")
|
||||
else()
|
||||
_g4tc_setenv_command(GEANT4_TC_G4LIB_USE_ZLIB ${SHELL_FAMILY} G4LIB_USE_ZLIB 1)
|
||||
endif()
|
||||
|
||||
# - GDML...
|
||||
if(GEANT4_USE_GDML)
|
||||
_g4tc_setenv_command(GEANT4_TC_G4LIB_USE_GDML ${SHELL_FAMILY} G4LIB_USE_GDML 1)
|
||||
# Backward compatibility requires XERCESCROOT to be set
|
||||
# As this is a 'rootdir' determine it from the XERCESC_INCLUDE_DIR
|
||||
# variable...
|
||||
get_filename_component(_xercesc_root ${XERCESC_INCLUDE_DIR} PATH)
|
||||
_g4tc_setenv_command(GEANT4_TC_GDML_PATH_SETUP ${SHELL_FAMILY} XERCESCROOT ${_xercesc_root})
|
||||
else()
|
||||
set(GEANT4_TC_G4LIB_USE_GDML "# NOT BUILT WITH GDML SUPPORT")
|
||||
endif()
|
||||
|
||||
# - G3TOG4...
|
||||
if(GEANT4_USE_G3TOG4)
|
||||
_g4tc_setenv_command(GEANT4_TC_G4LIB_USE_G3TOG4 ${SHELL_FAMILY} G4LIB_USE_G3TOG4 1)
|
||||
else()
|
||||
set(GEANT4_TC_G4LIB_USE_G3TOG4 "# NOT BUILT WITH G3TOG4 SUPPORT")
|
||||
endif()
|
||||
|
||||
# - USolids/VecGeom
|
||||
if(GEANT4_USE_USOLIDS)
|
||||
# Derive base dir from include path, NB, not 100% robust as Geant4GNUmake makes
|
||||
# significant assumptions about how USolids was installed
|
||||
get_filename_component(_USOLIDS_INCLUDE_DIR "${USOLIDS_INCLUDE_DIRS}" REALPATH)
|
||||
get_filename_component(_USOLIDS_BASE_DIR "${_USOLIDS_INCLUDE_DIR}" DIRECTORY)
|
||||
_g4tc_setenv_command(GEANT4_TC_USOLIDS_BASE_DIR ${SHELL_FAMILY} USOLIDS_BASE_DIR "${_USOLIDS_BASE_DIR}")
|
||||
|
||||
if(GEANT4_USE_ALL_USOLIDS)
|
||||
_g4tc_setenv_command(GEANT4_TC_G4GEOM_USE_USOLIDS ${SHELL_FAMILY} G4GEOM_USE_USOLIDS 1)
|
||||
set(GEANT4_TC_G4GEOM_USE_PARTIAL_USOLIDS "# FULL USOLIDS REPLACEMENT")
|
||||
else()
|
||||
set(GEANT4_TC_G4GEOM_USE_USOLIDS "# PARTIAL USOLIDS REPLACEMENT")
|
||||
_g4tc_setenv_command(GEANT4_TC_G4GEOM_USE_PARTIAL_USOLIDS ${SHELL_FAMILY} G4GEOM_USE_PARTIAL_USOLIDS 1)
|
||||
foreach(__g4_usolid_shape ${GEANT4_USE_PARTIAL_USOLIDS_SHAPE_LIST})
|
||||
_g4tc_setenv_command(GEANT4_TC_G4GEOM_USE_U${__g4_usolid_shape} ${SHELL_FAMILY} G4GEOM_USE_U${__g4_usolid_shape} 1)
|
||||
endforeach()
|
||||
endif()
|
||||
else()
|
||||
set(GEANT4_TC_USOLIDS_BASE_DIR "# NOT BUILT WITH USOLIDS SUPPORT")
|
||||
endif()
|
||||
|
||||
# - USER INTERFACE AND VISUALIZATION MODULES...
|
||||
# - Terminals
|
||||
if(NOT WIN32)
|
||||
_g4tc_setenv_command(GEANT4_TC_G4UI_USE_TCSH ${SHELL_FAMILY} G4UI_USE_TCSH 1)
|
||||
set(GEANT4_TC_G4UI_USE_WIN32 "# WIN32 TERMINAL UI NOT AVAILABLE ON ${CMAKE_SYSTEM_NAME}")
|
||||
else()
|
||||
set(GEANT4_TC_G4UI_USE_TCSH "# TCSH TERMINAL UI NOT AVAILABLE ON ${CMAKE_SYSTEM_NAME}")
|
||||
_g4tc_setenv_command(GEANT4_TC_G4UI_USE_WIN32 ${SHELL_FAMILY} G4UI_USE_WIN32 1)
|
||||
endif()
|
||||
|
||||
# - Qt UI AND VIS
|
||||
if(GEANT4_USE_QT)
|
||||
_g4tc_setenv_command(GEANT4_TC_QTHOME ${SHELL_FAMILY} QTHOME ${G4QTHOME})
|
||||
_g4tc_setenv_command(GEANT4_TC_QTLIBPATH ${SHELL_FAMILY} QTLIBPATH ${G4QTLIBPATH})
|
||||
if(QT4_FOUND)
|
||||
set(GEANT4_TC_QTLIBS "#Geant4Make automatically handles QTLIBS for Qt4")
|
||||
set(GEANT4_TC_GLQTLIBS "#Geant4Make automatically handles GLQTLIBS for Qt4")
|
||||
else()
|
||||
_g4tc_setenv_command(GEANT4_TC_QTLIBS ${SHELL_FAMILY} QTLIBS "\"-L${G4QTLIBPATH} ${G4QTLIBLIST}\"")
|
||||
_g4tc_setenv_command(GEANT4_TC_GLQTLIBS ${SHELL_FAMILY} GLQTLIBS "\"-L${G4QTLIBPATH} ${G4GLQTLIBLIST}\"")
|
||||
endif()
|
||||
|
||||
_g4tc_setenv_command(GEANT4_TC_G4UI_USE_QT ${SHELL_FAMILY} G4UI_USE_QT 1)
|
||||
_g4tc_setenv_command(GEANT4_TC_G4VIS_USE_OPENGLQT ${SHELL_FAMILY} G4VIS_USE_OPENGLQT 1)
|
||||
|
||||
# Dynamic loader path
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
_g4tc_prepend_path(GEANT4_TC_QT_LIB_PATH_SETUP ${SHELL_FAMILY} LD_LIBRARY_PATH \${QTLIBPATH})
|
||||
endif()
|
||||
else()
|
||||
set(GEANT4_TC_G4UI_USE_QT "# NOT BUILT WITH QT INTERFACE")
|
||||
endif()
|
||||
|
||||
# - XM UI AND VIS
|
||||
if(GEANT4_USE_XM)
|
||||
_g4tc_setenv_command(GEANT4_TC_G4UI_USE_XM ${SHELL_FAMILY} G4UI_USE_XM 1)
|
||||
_g4tc_setenv_command(GEANT4_TC_G4VIS_USE_OPENGLXM ${SHELL_FAMILY} G4VIS_USE_OPENGLXM 1)
|
||||
|
||||
# Might need library setup, but for now recommend system install....
|
||||
else()
|
||||
set(GEANT4_TC_G4UI_USE_XM "# NOT BUILT WITH XM INTERFACE")
|
||||
endif()
|
||||
|
||||
# - Network DAWN
|
||||
if(GEANT4_USE_NETWORKDAWN)
|
||||
_g4tc_setenv_command(GEANT4_TC_G4VIS_USE_DAWN ${SHELL_FAMILY} G4VIS_USE_DAWN 1)
|
||||
else()
|
||||
set(GEANT4_TC_G4VIS_USE_DAWN "# NOT BUILT WITH NETWORK DAWN SUPPORT")
|
||||
endif()
|
||||
|
||||
# - Network VRML
|
||||
if(GEANT4_USE_NETWORKVRML)
|
||||
_g4tc_setenv_command(GEANT4_TC_G4VIS_USE_VRML ${SHELL_FAMILY} G4VIS_USE_VRML 1)
|
||||
else()
|
||||
set(GEANT4_TC_G4VIS_USE_VRML "# NOT BUILT WITH NETWORK VRML SUPPORT")
|
||||
endif()
|
||||
|
||||
# - OpenInventor
|
||||
if(GEANT4_USE_INVENTOR)
|
||||
if(UNIX)
|
||||
_g4tc_setenv_command(GEANT4_TC_G4VIS_USE_OPENINVENTOR ${SHELL_FAMILY} G4VIS_USE_OIX 1)
|
||||
else()
|
||||
_g4tc_setenv_command(GEANT4_TC_G4VIS_USE_OPENINVENTOR ${SHELL_FAMILY} G4VIS_USE_OIWIN32 1)
|
||||
endif()
|
||||
else()
|
||||
set(GEANT4_TC_G4VIS_USE_OPENINVENTOR "# NOT BUILT WITH INVENTOR SUPPORT")
|
||||
endif()
|
||||
|
||||
|
||||
# - X11 OpenGL
|
||||
if(GEANT4_USE_OPENGL_X11)
|
||||
_g4tc_setenv_command(GEANT4_TC_G4VIS_USE_OPENGLX ${SHELL_FAMILY} G4VIS_USE_OPENGLX 1)
|
||||
else()
|
||||
set(GEANT4_TC_G4VIS_USE_OPENGLX "# NOT BUILT WITH OPENGL(X11) SUPPORT")
|
||||
endif()
|
||||
|
||||
# - WIN32 OpenGL
|
||||
if(GEANT4_USE_OPENGL_WIN32)
|
||||
_g4tc_setenv_command(GEANT4_TC_G4VIS_USE_OPENWIN32 ${SHELL_FAMILY} G4VIS_USE_OPENWIN32 1)
|
||||
else()
|
||||
set(GEANT4_TC_G4VIS_USE_OPENGLWIN32 "# NOT BUILT WITH OPENGL(WIN32) SUPPORT")
|
||||
endif()
|
||||
|
||||
# - X11 RayTracer
|
||||
if(GEANT4_USE_RAYTRACER_X11)
|
||||
_g4tc_setenv_command(GEANT4_TC_G4VIS_USE_RAYTRACERX ${SHELL_FAMILY} G4VIS_USE_RAYTRACERX 1)
|
||||
else()
|
||||
set(GEANT4_TC_G4VIS_USE_RAYTRACERX "# NOT BUILT WITH RAYTRACER(X11) SUPPORT")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# macro _g4tc_configure_build_tree_scripts()
|
||||
# Macro to configure toolchain compatibility scripts for the
|
||||
# build tree
|
||||
#
|
||||
macro(_g4tc_configure_build_tree_scripts SCRIPT_NAME)
|
||||
# Need to process for bourne and cshell families
|
||||
foreach(_shell bourne;cshell)
|
||||
# Generate the variables
|
||||
_g4tc_configure_tc_variables(${_shell} ${SCRIPT_NAME})
|
||||
|
||||
# Configure the file - goes straight into the binary dir
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/cmake/Templates/geant4make-skeleton.in
|
||||
${PROJECT_BINARY_DIR}/${SCRIPT_NAME}${GEANT4_TC_SHELL_EXTENSION}
|
||||
@ONLY
|
||||
)
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# macro _g4tc_configure_install_tree_script()
|
||||
# Macro to configure toolchain compatibility scripts for the
|
||||
# install tree
|
||||
#
|
||||
macro(_g4tc_configure_install_tree_scripts CONFIGURE_DESTINATION SCRIPT_NAME INSTALL_DESTINATION)
|
||||
# Need to process for bourne and cshell families
|
||||
foreach(_shell bourne;cshell)
|
||||
# Generate the variables
|
||||
_g4tc_configure_tc_variables(${_shell} ${SCRIPT_NAME})
|
||||
|
||||
# Configure the file
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/cmake/Templates/geant4make-skeleton.in
|
||||
${CONFIGURE_DESTINATION}/${SCRIPT_NAME}${GEANT4_TC_SHELL_EXTENSION}
|
||||
@ONLY
|
||||
)
|
||||
|
||||
# Install it to the required location
|
||||
install(FILES
|
||||
${CONFIGURE_DESTINATION}/${SCRIPT_NAME}${GEANT4_TC_SHELL_EXTENSION}
|
||||
DESTINATION ${INSTALL_DESTINATION}
|
||||
PERMISSIONS
|
||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
||||
GROUP_READ GROUP_EXECUTE
|
||||
WORLD_READ WORLD_EXECUTE
|
||||
COMPONENT Development
|
||||
)
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Implementation section
|
||||
#-----------------------------------------------------------------------
|
||||
# Configure shell scripts for BUILD TREE
|
||||
# This means we have to point to libraries in the build tree, but
|
||||
# includes and resource files will be in the source tree
|
||||
# This script never needs to be relocatable, so we don't need to use the
|
||||
# self location functionality.
|
||||
# N.B. IT WILL NOT WORK when building with VS/Xcode or any multiconfig
|
||||
# buildtool because we cannot reconcile the output paths these use with
|
||||
# those expected by the old toolchain...
|
||||
#
|
||||
set(G4SYSTEM "${GEANT4_SYSTEM}-${GEANT4_COMPILER}")
|
||||
set(G4INSTALL ${PROJECT_SOURCE_DIR})
|
||||
set(G4INCLUDE ${PROJECT_SOURCE_DIR}/this_is_a_deliberate_dummy_path)
|
||||
set(G4BIN_DIR ${PROJECT_BINARY_DIR})
|
||||
set(G4LIB ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
|
||||
set(G4LIB_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
|
||||
set(G4WORKDIR_DEFAULT "\$HOME/geant4_workdir")
|
||||
|
||||
# Resource files
|
||||
# - Data
|
||||
geant4_get_datasetnames(GEANT4_EXPORTED_DATASETS)
|
||||
foreach(_ds ${GEANT4_EXPORTED_DATASETS})
|
||||
geant4_get_dataset_property(${_ds} ENVVAR ${_ds}_ENVVAR)
|
||||
geant4_get_dataset_property(${_ds} BUILD_DIR ${_ds}_PATH)
|
||||
endforeach()
|
||||
|
||||
# - Fonts
|
||||
set(TOOLS_FONT_PATH "${PROJECT_SOURCE_DIR}/source/analysis/fonts")
|
||||
|
||||
# - Configure the shell scripts for the BUILD TREE
|
||||
_g4tc_configure_build_tree_scripts(geant4make)
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Configure shell scripts for INSTALL TREE
|
||||
# This means we have to point things to their final location when
|
||||
# installed. These paths are all determined by the CMAKE_INSTALL_FULL
|
||||
# directories and others.
|
||||
# If we are relocatable, then the structure we will have is
|
||||
# +- CMAKE_INSTALL_PREFIX
|
||||
# +- LIBDIR/Geant4-VERSION (G4LIB)
|
||||
# +- INCLUDEDIR/Geant4 (G4INCLUDE)
|
||||
# +- DATAROOTDIR/Geant4-VERSION/
|
||||
# +- geant4make (THIS IS G4INSTALL!)
|
||||
# +- geant4make.(c)sh
|
||||
# +- config/
|
||||
|
||||
# - Construct universal backward compatible INSTALL TREE PATHS.
|
||||
set(G4SYSTEM "${GEANT4_SYSTEM}-${GEANT4_COMPILER}")
|
||||
set(G4INSTALL "\"\$geant4make_root\"")
|
||||
|
||||
# - Now need relative paths between 'G4INSTALL' and include/bin/lib dirs
|
||||
# - Include dir
|
||||
file(RELATIVE_PATH
|
||||
G4MAKE_TO_INCLUDEDIR
|
||||
${CMAKE_INSTALL_FULL_DATAROOTDIR}/Geant4-${Geant4_VERSION}/geant4make
|
||||
${CMAKE_INSTALL_FULL_INCLUDEDIR}/${PROJECT_NAME}
|
||||
)
|
||||
set(G4INCLUDE "\"`cd \$geant4make_root/${G4MAKE_TO_INCLUDEDIR} > /dev/null \; pwd`\"")
|
||||
|
||||
# - Bin dir
|
||||
file(RELATIVE_PATH
|
||||
G4MAKE_TO_BINDIR
|
||||
${CMAKE_INSTALL_FULL_DATAROOTDIR}/Geant4-${Geant4_VERSION}/geant4make
|
||||
${CMAKE_INSTALL_FULL_BINDIR}
|
||||
)
|
||||
set(G4BIN_DIR "\"`cd \$geant4make_root/${G4MAKE_TO_BINDIR} > /dev/null \; pwd`\"")
|
||||
|
||||
# - Lib dir
|
||||
file(RELATIVE_PATH
|
||||
G4MAKE_TO_LIBDIR
|
||||
${CMAKE_INSTALL_FULL_DATAROOTDIR}/Geant4-${Geant4_VERSION}/geant4make
|
||||
${CMAKE_INSTALL_FULL_LIBDIR}
|
||||
)
|
||||
set(G4LIB "\"`cd \$geant4make_root/${G4MAKE_TO_LIBDIR}/Geant4-${Geant4_VERSION} > /dev/null \; pwd`\"")
|
||||
set(G4LIB_DIR "\"`cd \$geant4make_root/${G4MAKE_TO_LIBDIR} > /dev/null \; pwd`\"")
|
||||
|
||||
set(G4WORKDIR_DEFAULT "\$HOME/geant4_workdir")
|
||||
|
||||
# Resource files
|
||||
# - Data
|
||||
geant4_get_datasetnames(GEANT4_EXPORTED_DATASETS)
|
||||
foreach(_ds ${GEANT4_EXPORTED_DATASETS})
|
||||
geant4_get_dataset_property(${_ds} ENVVAR ${_ds}_ENVVAR)
|
||||
geant4_get_dataset_property(${_ds} INSTALL_DIR ${_ds}_PATH)
|
||||
|
||||
file(RELATIVE_PATH
|
||||
G4MAKE_TO_DATADIR
|
||||
${CMAKE_INSTALL_FULL_DATAROOTDIR}/Geant4-${Geant4_VERSION}/geant4make
|
||||
${${_ds}_PATH}
|
||||
)
|
||||
set(${_ds}_PATH "\"`cd \$geant4make_root/${G4MAKE_TO_DATADIR} > /dev/null \; pwd`\"")
|
||||
endforeach()
|
||||
|
||||
# - Fonts
|
||||
set(TOOLS_FONT_PATH "\"`cd \$geant4make_root/../fonts > /dev/null ; pwd`\"")
|
||||
|
||||
# - Configure the shell scripts for the INSTALL TREE
|
||||
_g4tc_configure_install_tree_scripts(
|
||||
${CMAKE_BINARY_DIR}/InstallTreeFiles
|
||||
geant4make
|
||||
${CMAKE_INSTALL_DATAROOTDIR}/Geant4-${Geant4_VERSION}/geant4make
|
||||
)
|
||||
|
||||
|
||||
# - For install tree, we also need to install the config directory
|
||||
# which contains all the old toolchain scripts, and to create a
|
||||
# softlink to the G4SYSTEM directory.
|
||||
#
|
||||
install(DIRECTORY config
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Geant4-${Geant4_VERSION}/geant4make
|
||||
COMPONENT Development
|
||||
FILES_MATCHING PATTERN "*.gmk"
|
||||
PATTERN "CVS" EXCLUDE
|
||||
PATTERN ".svn" EXCLUDE
|
||||
PATTERN "scripts/" EXCLUDE
|
||||
)
|
||||
|
||||
# Compatibility softlink to library directory, we do this on all
|
||||
# platforms, but it does nothing on Windows (well, at least the
|
||||
# attempted symlink creation does not)
|
||||
# Take care to quote the path names to avoid issues with spaces
|
||||
install(CODE "execute_process(COMMAND \${CMAKE_COMMAND} -E make_directory \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/Geant4-${Geant4_VERSION}\")")
|
||||
|
||||
install(CODE "execute_process(COMMAND \${CMAKE_COMMAND} -E create_symlink .. ${GEANT4_SYSTEM}-${GEANT4_COMPILER} WORKING_DIRECTORY \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/Geant4-${Geant4_VERSION}\")")
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# TEMPORARY
|
||||
# Configure environment setup script for install of Geant4
|
||||
# Temporarily here to keep all shell setup in one place.
|
||||
# Later, should be refactored into its own module, with module containing
|
||||
# all the shell tools above.
|
||||
#
|
||||
# - Script base name (without extension
|
||||
set(_scriptbasename geant4)
|
||||
|
||||
# - Relative path between bindir (where script is) and library directory
|
||||
file(RELATIVE_PATH
|
||||
G4ENV_BINDIR_TO_LIBDIR
|
||||
${CMAKE_INSTALL_FULL_BINDIR}
|
||||
${CMAKE_INSTALL_FULL_LIBDIR}
|
||||
)
|
||||
|
||||
# Resource Files
|
||||
# - Data
|
||||
geant4_get_datasetnames(GEANT4_EXPORTED_DATASETS)
|
||||
foreach(_ds ${GEANT4_EXPORTED_DATASETS})
|
||||
geant4_get_dataset_property(${_ds} ENVVAR ${_ds}_ENVVAR)
|
||||
geant4_get_dataset_property(${_ds} INSTALL_DIR ${_ds}_PATH)
|
||||
|
||||
file(RELATIVE_PATH
|
||||
G4ENV_BINDIR_TO_DATADIR
|
||||
${CMAKE_INSTALL_FULL_BINDIR}
|
||||
${${_ds}_PATH}
|
||||
)
|
||||
set(${_ds}_PATH "\"`cd \$geant4_envbindir/${G4ENV_BINDIR_TO_DATADIR} > /dev/null \; pwd`\"")
|
||||
endforeach()
|
||||
|
||||
# - Fonts
|
||||
file(RELATIVE_PATH
|
||||
G4ENV_BINDIR_TO_DATAROOTDIR
|
||||
"${CMAKE_INSTALL_FULL_BINDIR}"
|
||||
"${CMAKE_INSTALL_FULL_DATAROOTDIR}/Geant4-${Geant4_VERSION}"
|
||||
)
|
||||
set(TOOLS_FONT_PATH "\"`cd \$geant4_envbindir/${G4ENV_BINDIR_TO_DATAROOTDIR}/fonts > /dev/null ; pwd`\"")
|
||||
|
||||
|
||||
# - Configure for each shell
|
||||
foreach(_shell bourne;cshell)
|
||||
# Setup the shell
|
||||
_g4tc_shell_setup(${_shell})
|
||||
|
||||
# Set script full name
|
||||
set(_scriptfullname ${_scriptbasename}${GEANT4_TC_SHELL_EXTENSION})
|
||||
|
||||
# Set locate self command
|
||||
_g4tc_selflocate(GEANT4_ENV_SELFLOCATE_COMMAND
|
||||
${_shell}
|
||||
${_scriptbasename}
|
||||
geant4_envbindir
|
||||
)
|
||||
|
||||
# Set path, which should be where the script itself is installed
|
||||
_g4tc_prepend_path(GEANT4_ENV_BINPATH_SETUP
|
||||
${_shell}
|
||||
PATH
|
||||
"\"\$geant4_envbindir\""
|
||||
)
|
||||
|
||||
# Set library path, based on relative paths between bindir and libdir
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
_g4tc_prepend_path(GEANT4_ENV_LIBPATH_SETUP
|
||||
${_shell}
|
||||
LD_LIBRARY_PATH
|
||||
"\"`cd $geant4_envbindir/${G4ENV_BINDIR_TO_LIBDIR} > /dev/null ; pwd`\""
|
||||
)
|
||||
endif()
|
||||
|
||||
# Third party lib paths
|
||||
# - CLHEP, if system
|
||||
set(GEANT4_TC_CLHEP_LIB_PATH_SETUP "# - Builtin CLHEP used")
|
||||
if(GEANT4_USE_SYSTEM_CLHEP)
|
||||
# Handle granular vs singular cases
|
||||
if(GEANT4_USE_SYSTEM_CLHEP_GRANULAR)
|
||||
get_target_property(_CLHEP_LIB_DIR CLHEP::Vector LOCATION)
|
||||
else()
|
||||
get_target_property(_CLHEP_LIB_DIR CLHEP::CLHEP LOCATION)
|
||||
endif()
|
||||
|
||||
get_filename_component(_CLHEP_LIB_DIR "${_CLHEP_LIB_DIR}" REALPATH)
|
||||
get_filename_component(_CLHEP_LIB_DIR "${_CLHEP_LIB_DIR}" DIRECTORY)
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
_g4tc_append_path(GEANT4_TC_CLHEP_LIB_PATH_SETUP
|
||||
${_shell}
|
||||
LD_LIBRARY_PATH
|
||||
"${_CLHEP_LIB_DIR}"
|
||||
)
|
||||
else()
|
||||
set(GEANT4_TC_CLHEP_LIB_PATH_SETUP "# System CLHEP in use, no configuration required")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# - XercesC
|
||||
set(GEANT4_TC_XERCESC_LIB_PATH_SETUP "# GDML SUPPORT NOT AVAILABLE")
|
||||
if(GEANT4_USE_GDML)
|
||||
get_filename_component(_XERCESC_LIB_DIR "${XERCESC_LIBRARY}" REALPATH)
|
||||
get_filename_component(_XERCESC_LIB_DIR "${XERCESC_LIBRARY}" DIRECTORY)
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
_g4tc_append_path(GEANT4_TC_XERCESC_LIB_PATH_SETUP
|
||||
${_shell}
|
||||
LD_LIBRARY_PATH
|
||||
"${_XERCESC_LIB_DIR}"
|
||||
)
|
||||
else()
|
||||
set(GEANT4_TC_XERCESC_LIB_PATH_SETUP "# GDML Supported, no configuration of Xerces-C required")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# - Set data paths
|
||||
set(GEANT4_ENV_DATASETS )
|
||||
foreach(_ds ${GEANT4_EXPORTED_DATASETS})
|
||||
_g4tc_setenv_command(_dssetenvcmd ${_shell} ${${_ds}_ENVVAR} ${${_ds}_PATH})
|
||||
set(GEANT4_ENV_DATASETS "${GEANT4_ENV_DATASETS}${_dssetenvcmd}\n")
|
||||
endforeach()
|
||||
|
||||
# - Set Font Path
|
||||
set(GEANT4_ENV_TOOLS_FONT_PATH "# FREETYPE SUPPORT NOT AVAILABLE")
|
||||
if(GEANT4_USE_FREETYPE)
|
||||
_g4tc_append_path(GEANT4_ENV_TOOLS_FONT_PATH
|
||||
${_shell}
|
||||
TOOLS_FONT_PATH
|
||||
"${TOOLS_FONT_PATH}"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Configure the file
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/cmake/Templates/geant4-env-skeleton.in
|
||||
${PROJECT_BINARY_DIR}/InstallTreeFiles/${_scriptfullname}
|
||||
@ONLY
|
||||
)
|
||||
|
||||
# Install it to the required location
|
||||
install(FILES
|
||||
${PROJECT_BINARY_DIR}/InstallTreeFiles/${_scriptfullname}
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
PERMISSIONS
|
||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
||||
GROUP_READ GROUP_EXECUTE
|
||||
WORLD_READ WORLD_EXECUTE
|
||||
COMPONENT Runtime
|
||||
)
|
||||
endforeach()
|
||||
|
||||
@@ -0,0 +1,379 @@
|
||||
#.rst:
|
||||
# G4ConfigurePkgConfigHelpers
|
||||
# ---------------------------
|
||||
#
|
||||
# This module configures and installs pkg-config scripts and the
|
||||
# geant4-config program to help clients compile and link against
|
||||
# the Geant4 libraries.
|
||||
#
|
||||
# The geant4-config script provides an sh based interface to provide
|
||||
# information on the Geant4 installation, including installation prefix,
|
||||
# version number, compiler and linker flags.
|
||||
#
|
||||
# The script is generated from a template file and then installed to the
|
||||
# known bindir as an executable.
|
||||
#
|
||||
# Paths are always hardcoded in the build tree version as this is never
|
||||
# intended to be relocatable.
|
||||
# The Install Tree script uses self-location based on that in
|
||||
# {root,clhep}-config is the install itself is relocatable, otherwise
|
||||
# absolute paths are encoded.
|
||||
#
|
||||
#
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
# License and Disclaimer
|
||||
#
|
||||
# The Geant4 software is copyright of the Copyright Holders of
|
||||
# the Geant4 Collaboration. It is provided under the terms and
|
||||
# conditions of the Geant4 Software License, included in the file
|
||||
# LICENSE and available at http://cern.ch/geant4/license . These
|
||||
# include a list of copyright holders.
|
||||
#
|
||||
# Neither the authors of this software system, nor their employing
|
||||
# institutes,nor the agencies providing financial support for this
|
||||
# work make any representation or warranty, express or implied,
|
||||
# regarding this software system or assume any liability for its
|
||||
# use. Please see the license in the file LICENSE and URL above
|
||||
# for the full disclaimer and the limitation of liability.
|
||||
#
|
||||
# This code implementation is the result of the scientific and
|
||||
# technical work of the GEANT4 collaboration.
|
||||
# By using, copying, modifying or distributing the software (or
|
||||
# any work based on the software) you agree to acknowledge its
|
||||
# use in resulting scientific publications, and indicate your
|
||||
# acceptance of all terms of the Geant4 Software license.
|
||||
#
|
||||
#-----------------------------------------------------------------
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# function get_system_include_dirs
|
||||
# return list of directories our C++ compiler searches
|
||||
# by default.
|
||||
#
|
||||
# The idea comes from CMake's inbuilt technique to do this
|
||||
# for the Eclipse and CodeBlocks generators, but we implement
|
||||
# our own function because the CMake functionality is internal
|
||||
# so we can't rely on it.
|
||||
function(get_system_include_dirs _dirs)
|
||||
# Only for GCC, Clang and Intel
|
||||
if("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Clang OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Intel)
|
||||
# Proceed
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/g4dummy" "\n")
|
||||
|
||||
# Save locale, them to "C" english locale so we can parse in English
|
||||
set(_orig_lc_all $ENV{LC_ALL})
|
||||
set(_orig_lc_messages $ENV{LC_MESSAGES})
|
||||
set(_orig_lang $ENV{LANG})
|
||||
|
||||
set(ENV{LC_ALL} C)
|
||||
set(ENV{LC_MESSAGES} C)
|
||||
set(ENV{LANG} C)
|
||||
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -v -E -x c++ -dD g4dummy
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles
|
||||
ERROR_VARIABLE _cxxOutput
|
||||
OUTPUT_VARIABLE _cxxStdout
|
||||
)
|
||||
|
||||
file(REMOVE "${CMAKE_BINARY_DIR}/CMakeFiles/g4dummy")
|
||||
|
||||
# Parse and extract search dirs
|
||||
set(_resultIncludeDirs )
|
||||
if( "${_cxxOutput}" MATCHES "> search starts here[^\n]+\n *(.+ *\n) *End of (search) list" )
|
||||
string(REGEX MATCHALL "[^\n]+\n" _includeLines "${CMAKE_MATCH_1}")
|
||||
foreach(nextLine ${_includeLines})
|
||||
string(REGEX REPLACE "\\(framework directory\\)" "" nextLineNoFramework "${nextLine}")
|
||||
string(STRIP "${nextLineNoFramework}" _includePath)
|
||||
list(APPEND _resultIncludeDirs "${_includePath}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# Restore original locale
|
||||
set(ENV{LC_ALL} ${_orig_lc_all})
|
||||
set(ENV{LC_MESSAGES} ${_orig_lc_messages})
|
||||
set(ENV{LANG} ${_orig_lang})
|
||||
|
||||
set(${_dirs} ${_resultIncludeDirs} PARENT_SCOPE)
|
||||
else()
|
||||
set(${_dirs} "" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Only create script if we have a global library build...
|
||||
#
|
||||
if(NOT GEANT4_BUILD_GRANULAR_LIBS AND UNIX)
|
||||
# Get implicit search paths
|
||||
get_system_include_dirs(_cxx_compiler_dirs)
|
||||
|
||||
# Setup variables needed for expansion in configuration file
|
||||
# - Static libs
|
||||
if(BUILD_STATIC_LIBS)
|
||||
set(G4_BUILTWITH_STATICLIBS "yes")
|
||||
else()
|
||||
set(G4_BUILTWITH_STATICLIBS "no")
|
||||
endif()
|
||||
|
||||
# - Multithreading
|
||||
if(GEANT4_BUILD_MULTITHREADED)
|
||||
set(G4_BUILTWITH_MULTITHREADING "yes")
|
||||
else()
|
||||
set(G4_BUILTWITH_MULTITHREADING "no")
|
||||
endif()
|
||||
|
||||
# - CLHEP
|
||||
if(GEANT4_USE_SYSTEM_CLHEP)
|
||||
set(G4_BUILTWITH_CLHEP "no")
|
||||
#inc path
|
||||
get_filename_component(G4_SYSTEM_CLHEP_INCLUDE_DIR "${CLHEP_INCLUDE_DIR}" ABSOLUTE)
|
||||
|
||||
#libpath
|
||||
list(GET CLHEP_LIBRARIES 0 _zeroth_clhep_lib)
|
||||
get_target_property(_system_clhep_libdir "${_zeroth_clhep_lib}" LOCATION)
|
||||
get_filename_component(_system_clhep_libdir "${_system_clhep_libdir}" REALPATH)
|
||||
get_filename_component(_system_clhep_libdir "${_system_clhep_libdir}" DIRECTORY)
|
||||
set(G4_SYSTEM_CLHEP_LIBRARIES "-L${_system_clhep_libdir}")
|
||||
|
||||
foreach(_clhep_lib ${CLHEP_LIBRARIES})
|
||||
get_target_property(_curlib "${_clhep_lib}" LOCATION)
|
||||
get_filename_component(_curlib "${_curlib}" NAME)
|
||||
string(REGEX REPLACE "^lib(.*)\\.(so|a|dylib|lib|dll)$" "\\1" _curlib "${_curlib}")
|
||||
set(G4_SYSTEM_CLHEP_LIBRARIES "${G4_SYSTEM_CLHEP_LIBRARIES} -l${_curlib}")
|
||||
endforeach()
|
||||
else()
|
||||
set(G4_BUILTWITH_CLHEP "yes")
|
||||
endif()
|
||||
|
||||
# - EXPAT
|
||||
if(GEANT4_USE_SYSTEM_EXPAT)
|
||||
set(G4_BUILTWITH_EXPAT "no")
|
||||
else()
|
||||
set(G4_BUILTWITH_EXPAT "yes")
|
||||
endif()
|
||||
|
||||
# - ZLIB
|
||||
if(GEANT4_USE_SYSTEM_ZLIB)
|
||||
set(G4_BUILTWITH_ZLIB "no")
|
||||
else()
|
||||
set(G4_BUILTWITH_ZLIB "yes")
|
||||
endif()
|
||||
|
||||
# - GDML
|
||||
if(GEANT4_USE_GDML)
|
||||
set(G4_BUILTWITH_GDML "yes")
|
||||
set(G4_XERCESC_INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS})
|
||||
list(REMOVE_DUPLICATES G4_XERCESC_INCLUDE_DIRS)
|
||||
list(REMOVE_ITEM G4_XERCESC_INCLUDE_DIRS ${_cxx_compiler_dirs})
|
||||
|
||||
set(G4_XERCESC_CFLAGS )
|
||||
foreach(_dir ${G4_XERCESC_INCLUDE_DIRS})
|
||||
set(G4_XERCESC_CFLAGS "${G4_XERCESC_CFLAGS} -I${_dir}")
|
||||
endforeach()
|
||||
else()
|
||||
set(G4_BUILTWITH_GDML "no")
|
||||
endif()
|
||||
|
||||
# - G3ToG4
|
||||
if(GEANT4_USE_G3TOG4)
|
||||
set(G4_BUILTWITH_G3TOG4 "yes")
|
||||
else()
|
||||
set(G4_BUILTWITH_G3TOG4 "no")
|
||||
endif()
|
||||
|
||||
# - USolids
|
||||
if(GEANT4_USE_USOLIDS OR GEANT4_USE_PARTIAL_USOLIDS)
|
||||
set(G4_BUILTWITH_USOLIDS "yes")
|
||||
set(G4_USOLIDS_INCLUDE_DIRS "${USOLIDS_INCLUDE_DIRS} ${VECGEOM_EXTERNAL_INCLUDES}")
|
||||
list(REMOVE_DUPLICATES G4_USOLIDS_INCLUDE_DIRS)
|
||||
list(REMOVE_ITEM G4_USOLIDS_INCLUDE_DIRS ${_cxx_compiler_dirs})
|
||||
|
||||
string(REPLACE ";" " " G4_USOLIDS_CFLAGS "${GEANT4_USOLIDS_COMPILE_DEFINITIONS}")
|
||||
foreach(_dir ${G4_USOLIDS_INCLUDE_DIRS})
|
||||
set(G4_USOLIDS_CFLAGS "${G4_USOLIDS_CFLAGS} -I${_dir}")
|
||||
endforeach()
|
||||
else()
|
||||
set(G4_BUILTWITH_USOLIDS "no")
|
||||
endif()
|
||||
|
||||
# - Freetype
|
||||
if(GEANT4_USE_FREETYPE)
|
||||
set(G4_BUILTWITH_FREETYPE "yes")
|
||||
else()
|
||||
set(G4_BUILTWITH_FREETYPE "no")
|
||||
endif()
|
||||
|
||||
# - Qt
|
||||
if(GEANT4_USE_QT)
|
||||
set(G4_BUILTWITH_QT "yes")
|
||||
if(QT4_FOUND)
|
||||
set(G4_QT_INCLUDE_DIRS ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTOPENGL_INCLUDE_DIR})
|
||||
else()
|
||||
set(G4_QT_INCLUDE_DIRS ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS} ${Qt5OpenGL_INCLUDE_DIRS} ${Qt5PrintSupport_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
list(REMOVE_DUPLICATES G4_QT_INCLUDE_DIRS)
|
||||
list(REMOVE_ITEM G4_QT_INCLUDE_DIRS ${_cxx_compiler_dirs})
|
||||
|
||||
set(G4_QT_CFLAGS )
|
||||
foreach(_dir ${G4_QT_INCLUDE_DIRS})
|
||||
set(G4_QT_CFLAGS "${G4_QT_CFLAGS} -I${_dir}")
|
||||
endforeach()
|
||||
|
||||
else()
|
||||
set(G4_BUILTWITH_QT "no")
|
||||
endif()
|
||||
|
||||
# - Wt
|
||||
if(GEANT4_USE_WT)
|
||||
set(G4_BUILTWITH_WT "yes")
|
||||
set(G4_WT_INCLUDE_DIRS ${Wt_INCLUDE_DIR} ${Boost_INCLUDE_DIR} )
|
||||
|
||||
set(G4_WT_CFLAGS )
|
||||
foreach(_dir ${G4_WT_INCLUDE_DIRS})
|
||||
set(G4_WT_CFLAGS "${G4_WT_CFLAGS} -I${_dir}")
|
||||
endforeach()
|
||||
|
||||
else()
|
||||
set(G4_BUILTWITH_WT "no")
|
||||
endif()
|
||||
|
||||
# - Motif
|
||||
if(GEANT4_USE_XM)
|
||||
set(G4_BUILTWITH_MOTIF "yes")
|
||||
set(G4_CONFIG_NEEDS_X11 TRUE)
|
||||
else()
|
||||
set(G4_BUILTWITH_MOTIF "no")
|
||||
endif()
|
||||
|
||||
# - RayTracerX
|
||||
if(GEANT4_USE_RAYTRACER_X11)
|
||||
set(G4_BUILTWITH_RAYTRACERX11 "yes")
|
||||
set(G4_CONFIG_NEEDS_X11 TRUE)
|
||||
else()
|
||||
set(G4_BUILTWITH_RAYTRACERX11 "no")
|
||||
endif()
|
||||
|
||||
# - OpenGL X11
|
||||
if(GEANT4_USE_OPENGL_X11)
|
||||
set(G4_BUILTWITH_OPENGLX11 "yes")
|
||||
set(G4_CONFIG_NEEDS_X11 TRUE)
|
||||
else()
|
||||
set(G4_BUILTWITH_OPENGLX11 "no")
|
||||
endif()
|
||||
|
||||
# - OpenInventor
|
||||
if(GEANT4_USE_INVENTOR)
|
||||
set(G4_BUILTWITH_INVENTOR "yes")
|
||||
else()
|
||||
set(G4_BUILTWITH_INVENTOR "no")
|
||||
endif()
|
||||
|
||||
# If we have a module that uses X11, We have to play with the X11
|
||||
# paths to get a clean set suitable for inclusion
|
||||
if(G4_CONFIG_NEEDS_X11)
|
||||
set(_raw_x11_includes ${X11_INCLUDE_DIR})
|
||||
list(REMOVE_DUPLICATES _raw_x11_includes)
|
||||
list(REMOVE_ITEM _raw_x11_includes ${_cxx_compiler_dirs})
|
||||
set(G4_X11_CFLAGS )
|
||||
foreach(_p ${_raw_x11_includes})
|
||||
set(G4_X11_CFLAGS "-I${_p} ${G4_X11_CFLAGS}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# Configure the script
|
||||
# - BUILD TREE
|
||||
# Ouch, the include path will be LONG, but at least we always have
|
||||
# absolute paths...
|
||||
set(GEANT4_CONFIG_SELF_LOCATION "# BUILD TREE IS NON-RELOCATABLE")
|
||||
set(GEANT4_CONFIG_INSTALL_PREFIX "${PROJECT_BINARY_DIR}")
|
||||
set(GEANT4_CONFIG_INSTALL_EXECPREFIX \"\")
|
||||
# NB: this only works for *single* mode generators. With multimode
|
||||
# generators, which mode to use is not clear...
|
||||
set(GEANT4_CONFIG_LIBDIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
|
||||
|
||||
get_property(__geant4_buildtree_include_dirs GLOBAL PROPERTY
|
||||
GEANT4_BUILDTREE_INCLUDE_DIRS)
|
||||
|
||||
foreach(_dir ${__geant4_buildtree_include_dirs})
|
||||
set(GEANT4_CONFIG_INCLUDE_DIRS "${GEANT4_CONFIG_INCLUDE_DIRS} \\
|
||||
${_dir}")
|
||||
endforeach()
|
||||
|
||||
# - Data
|
||||
geant4_export_datasets(BUILD GEANT4_CONFIG_DATASET_DESCRIPTIONS)
|
||||
|
||||
# Configure the build tree script
|
||||
# If we're on CMake 2.8 and above, we try to use file(COPY) to create an
|
||||
# executable script
|
||||
# Not sure if version check is o.k., but I'll be shocked if we ever see
|
||||
# a CMake 2.7 in the wild...
|
||||
if(${CMAKE_VERSION} VERSION_GREATER 2.7)
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/cmake/Templates/geant4-config.in
|
||||
${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/geant4-config
|
||||
@ONLY
|
||||
)
|
||||
|
||||
file(COPY
|
||||
${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/geant4-config
|
||||
DESTINATION ${PROJECT_BINARY_DIR}
|
||||
FILE_PERMISSIONS
|
||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
||||
GROUP_READ GROUP_EXECUTE
|
||||
WORLD_READ WORLD_EXECUTE
|
||||
)
|
||||
else()
|
||||
# Changing permissions is awkward, so just configure and document
|
||||
# that you have to do 'sh geant4-config' in this case.
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/cmake/Templates/geant4-config.in
|
||||
${PROJECT_BINARY_DIR}/geant4-config
|
||||
@ONLY
|
||||
)
|
||||
endif()
|
||||
|
||||
# - Install Tree
|
||||
# Much easier :-)
|
||||
# Non-Relocatable case...
|
||||
if(CMAKE_INSTALL_IS_NONRELOCATABLE)
|
||||
# Hardcoded paths
|
||||
set(GEANT4_CONFIG_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
set(GEANT4_CONFIG_INSTALL_EXECPREFIX \"\")
|
||||
set(GEANT4_CONFIG_LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}")
|
||||
set(GEANT4_CONFIG_INCLUDE_DIRS "${CMAKE_INSTALL_FULL_INCLUDEDIR}/Geant4")
|
||||
else()
|
||||
# Calculate base of self contained install based on relative path from
|
||||
# CMAKE_INSTALL_FULL_BINDIR to CMAKE_INSTALL_PREFIX.
|
||||
file(RELATIVE_PATH _bin_to_prefix ${CMAKE_INSTALL_FULL_BINDIR} ${CMAKE_INSTALL_PREFIX})
|
||||
# Strip any trailing path separators just for neatness.
|
||||
string(REGEX REPLACE "[/\\]$" "" _bin_to_prefix "${_bin_to_prefix}")
|
||||
|
||||
set(GEANT4_CONFIG_INSTALL_PREFIX "$scriptloc/${_bin_to_prefix}")
|
||||
set(GEANT4_CONFIG_INSTALL_EXECPREFIX \"\")
|
||||
set(GEANT4_CONFIG_LIBDIR "\${prefix}/${CMAKE_INSTALL_LIBDIR}")
|
||||
set(GEANT4_CONFIG_INCLUDE_DIRS "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}/Geant4")
|
||||
endif()
|
||||
|
||||
# - Data
|
||||
geant4_export_datasets(INSTALL GEANT4_CONFIG_DATASET_DESCRIPTIONS)
|
||||
|
||||
# Configure the install tree script
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/cmake/Templates/geant4-config.in
|
||||
${PROJECT_BINARY_DIR}/InstallTreeFiles/geant4-config
|
||||
@ONLY
|
||||
)
|
||||
|
||||
# Install it
|
||||
install(FILES ${PROJECT_BINARY_DIR}/InstallTreeFiles/geant4-config
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
PERMISSIONS
|
||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
||||
GROUP_READ GROUP_EXECUTE
|
||||
WORLD_READ WORLD_EXECUTE
|
||||
COMPONENT Development
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
#.rst:
|
||||
# G4DeveloperAPI
|
||||
# --------------
|
||||
#
|
||||
# .. code-block::cmake
|
||||
#
|
||||
# include(G4DeveloperAPI)
|
||||
#
|
||||
# CMake functions and macros for declaring and working with build
|
||||
# products of Geant4.
|
||||
#
|
||||
# WIP: At present, this simply forwards to the old implementation
|
||||
# Eventually will allow switch between the old and the new,
|
||||
# then just the new once transition complete.
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
# License and Disclaimer
|
||||
#
|
||||
# The Geant4 software is copyright of the Copyright Holders of
|
||||
# the Geant4 Collaboration. It is provided under the terms and
|
||||
# conditions of the Geant4 Software License, included in the file
|
||||
# LICENSE and available at http://cern.ch/geant4/license . These
|
||||
# include a list of copyright holders.
|
||||
#
|
||||
# Neither the authors of this software system, nor their employing
|
||||
# institutes,nor the agencies providing financial support for this
|
||||
# work make any representation or warranty, express or implied,
|
||||
# regarding this software system or assume any liability for its
|
||||
# use. Please see the license in the file LICENSE and URL above
|
||||
# for the full disclaimer and the limitation of liability.
|
||||
#
|
||||
# This code implementation is the result of the scientific and
|
||||
# technical work of the GEANT4 collaboration.
|
||||
# By using, copying, modifying or distributing the software (or
|
||||
# any work based on the software) you agree to acknowledge its
|
||||
# use in resulting scientific publications, and indicate your
|
||||
# acceptance of all terms of the Geant4 Software license.
|
||||
#
|
||||
#-----------------------------------------------------------------
|
||||
|
||||
if(NOT __G4DEVELOPERAPI_INCLUDED)
|
||||
set(__G4DEVELOPERAPI_INCLUDED TRUE)
|
||||
else()
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(G4DeveloperAPI_OLD)
|
||||
@@ -0,0 +1,513 @@
|
||||
#.rst:
|
||||
# G4DeveloperAPI_OLD
|
||||
# ------------------
|
||||
#
|
||||
# Old style API for declaring Geant4 source code modules and
|
||||
# compiling, linking and installing binary libraries composed
|
||||
# from one or more source code modules.
|
||||
#
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
# License and Disclaimer
|
||||
#
|
||||
# The Geant4 software is copyright of the Copyright Holders of
|
||||
# the Geant4 Collaboration. It is provided under the terms and
|
||||
# conditions of the Geant4 Software License, included in the file
|
||||
# LICENSE and available at http://cern.ch/geant4/license . These
|
||||
# include a list of copyright holders.
|
||||
#
|
||||
# Neither the authors of this software system, nor their employing
|
||||
# institutes,nor the agencies providing financial support for this
|
||||
# work make any representation or warranty, express or implied,
|
||||
# regarding this software system or assume any liability for its
|
||||
# use. Please see the license in the file LICENSE and URL above
|
||||
# for the full disclaimer and the limitation of liability.
|
||||
#
|
||||
# This code implementation is the result of the scientific and
|
||||
# technical work of the GEANT4 collaboration.
|
||||
# By using, copying, modifying or distributing the software (or
|
||||
# any work based on the software) you agree to acknowledge its
|
||||
# use in resulting scientific publications, and indicate your
|
||||
# acceptance of all terms of the Geant4 Software license.
|
||||
#
|
||||
#-----------------------------------------------------------------
|
||||
|
||||
|
||||
# - Include guard
|
||||
if(NOT __G4DEVELOPERAPI_OLD_INCLUDED)
|
||||
set(__G4DEVELOPERAPI_OLD_INCLUDED 1)
|
||||
else()
|
||||
return()
|
||||
endif()
|
||||
|
||||
# - Needed CMake modules
|
||||
include(CMakeParseArguments)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
#.rst:
|
||||
# Source Code Module Declaration Functions
|
||||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# Geant4's source code is organised into categories composed of one or
|
||||
# more "modules" of source code. Each module has the following layout
|
||||
# of headers and sources:
|
||||
#
|
||||
# - include/
|
||||
# - Public headers
|
||||
# - src/
|
||||
# - Implementations
|
||||
#
|
||||
# The functions here declare a module ready for it to be integrated
|
||||
# by the library build functions described below.
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# macro geant4_define_module(NAME <name>
|
||||
# HEADERS <header1> <header2> ... <headerN>
|
||||
# SOURCES <source1> <source2> ... <sourceN>
|
||||
# GRANULAR_DEPENDENCIES <dep1> ... <depN>
|
||||
# GLOBAL_DEPENDENCIES <dep1> ... <depN>
|
||||
# LINK_LIBRARIES <lib1> ... <lib2>)
|
||||
# Define a Geant4 Module's sources and what internal and external
|
||||
# libraries it links to.
|
||||
#
|
||||
# GEANT4_DEFINE_MODULE will take the name of the module, a list of header
|
||||
# files, a list of source files and dependencies:
|
||||
#
|
||||
# GEANT4_DEFINE_MODULE(NAME name
|
||||
# HEADERS hdr1 hdr2 ...
|
||||
# SOURCES src1 src2 ...
|
||||
# GRANULAR_DEPENDENCIES dep1 dep2 ...
|
||||
# GLOBAL_DEPENDENCIES dep1 dep2 ...
|
||||
# LINK_LIBRARIES lib1 lib2 ...)
|
||||
#
|
||||
# It assumes that it will be called from a CMake located in the module
|
||||
# root directory (i.e. the directory containing the include and src
|
||||
# subdirectories). It uses this location to define absolute paths to the
|
||||
# headers and sources, and will ignore any absolute paths passed in HEADERS
|
||||
# or SOURCES so that generated files can be passed in.
|
||||
#
|
||||
# The macro defines the variables
|
||||
#
|
||||
# G4MODULENAME = name
|
||||
# ${G4MODULENAME}_HEADERS = List of absolute paths to files given in HEADERS
|
||||
# ${G4MODULENAME}_SOURCES = List of absolute paths to files given in SOURCES
|
||||
# ${G4MODULENAME}_GRANULAR_DEPS = List of granular libraries on which this
|
||||
# module depends
|
||||
# ${G4MODULENAME}_GLOBAL_DEPS = List of global libraries on which this module
|
||||
# depends
|
||||
# ${G4MODULENAME}_LINK_LIBRARIES = List of external libraries to be linked to
|
||||
# this module
|
||||
#
|
||||
# It will also add the module include directory to the list of directories
|
||||
# using include_directories
|
||||
#
|
||||
macro(geant4_define_module)
|
||||
cmake_parse_arguments(G4DEFMOD
|
||||
""
|
||||
"NAME"
|
||||
"HEADERS;SOURCES;GRANULAR_DEPENDENCIES;GLOBAL_DEPENDENCIES;LINK_LIBRARIES"
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
set(G4MODULENAME ${G4DEFMOD_NAME})
|
||||
|
||||
get_filename_component(${G4MODULENAME}_BASEDIR ${CMAKE_CURRENT_LIST_FILE} PATH)
|
||||
set(${G4MODULENAME}_SRCDIR ${${G4MODULENAME}_BASEDIR}/src)
|
||||
set(${G4MODULENAME}_INCDIR ${${G4MODULENAME}_BASEDIR}/include)
|
||||
|
||||
# We now create absolute paths to the headers and sources,
|
||||
# ignoring any already absolute paths
|
||||
foreach(_HDR ${G4DEFMOD_HEADERS})
|
||||
if(IS_ABSOLUTE ${_HDR})
|
||||
list(APPEND ${G4MODULENAME}_HEADERS ${_HDR})
|
||||
else()
|
||||
list(APPEND ${G4MODULENAME}_HEADERS ${${G4MODULENAME}_INCDIR}/${_HDR})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach(_SRC ${G4DEFMOD_SOURCES})
|
||||
if(IS_ABSOLUTE ${_SRC})
|
||||
list(APPEND ${G4MODULENAME}_SOURCES ${_SRC})
|
||||
else()
|
||||
list(APPEND ${G4MODULENAME}_SOURCES ${${G4MODULENAME}_SRCDIR}/${_SRC})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach(_LIB ${G4DEFMOD_GRANULAR_DEPENDENCIES})
|
||||
list(APPEND ${G4MODULENAME}_GRANULAR_DEPENDENCIES ${_LIB})
|
||||
endforeach()
|
||||
|
||||
foreach(_LIB ${G4DEFMOD_GLOBAL_DEPENDENCIES})
|
||||
list(APPEND ${G4MODULENAME}_GLOBAL_DEPENDENCIES ${_LIB})
|
||||
endforeach()
|
||||
|
||||
foreach(_LIB ${G4DEFMOD_LINK_LIBRARIES})
|
||||
list(APPEND ${G4MODULENAME}_LINK_LIBRARIES ${_LIB})
|
||||
endforeach()
|
||||
|
||||
include_directories(${${G4MODULENAME}_INCDIR})
|
||||
endmacro()
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# macro geant4_add_compile_definitions(SOURCES <source1> ... <sourceN>
|
||||
# COMPILE_DEFINITIONS <def1> ... <defN>
|
||||
# )
|
||||
# Add extra compile definitions to a specific list of sources
|
||||
# in the current module. Macroized to handle the need to specify absolute paths.
|
||||
# and *must* be called at the same level as geant4_define_module
|
||||
#
|
||||
macro(geant4_add_compile_definitions)
|
||||
cmake_parse_arguments(G4ADDDEF
|
||||
""
|
||||
""
|
||||
"SOURCES;COMPILE_DEFINITIONS"
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
# We assume that the sources have been added at the level of a
|
||||
# a sources.cmake, so are inside the src subdir of the sources.cmake
|
||||
get_filename_component(_ACD_BASE_PATH ${CMAKE_CURRENT_LIST_FILE} PATH)
|
||||
|
||||
# Now for each file, add the definitions
|
||||
foreach(_acd_source ${G4ADDDEF_SOURCES})
|
||||
# Extract any existing compile definitions
|
||||
get_source_file_property(
|
||||
_acd_existing_properties
|
||||
${_ACD_BASE_PATH}/src/${_acd_source}
|
||||
COMPILE_DEFINITIONS)
|
||||
|
||||
if(_acd_existing_properties)
|
||||
set(_acd_new_defs ${_acd_existing_properties}
|
||||
${G4ADDDEF_COMPILE_DEFINITIONS})
|
||||
else()
|
||||
set(_acd_new_defs ${G4ADDDEF_COMPILE_DEFINITIONS})
|
||||
endif()
|
||||
|
||||
# quote compile defs because this must epand to space separated list
|
||||
set_source_files_properties(${_ACD_BASE_PATH}/src/${_acd_source}
|
||||
PROPERTIES COMPILE_DEFINITIONS "${_acd_new_defs}")
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
#.rst:
|
||||
# Library Declaration, Build and Install API
|
||||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# - Define useful macros for building and installing Geant4 library targets
|
||||
#
|
||||
# This file defines the following macros for Geant4 developers needing to
|
||||
# add shared and static library targets.
|
||||
#
|
||||
# GEANT4_LIBRARY_TARGET - define standard Geant4 library targets
|
||||
#
|
||||
# The macro will take the name of the library and its sources, defining
|
||||
# static and shared targets depending on the value of BUILD_SHARED_LIBS and
|
||||
# BUILD_STATIC_LIBS. Install targets are also created.
|
||||
#
|
||||
# A custom compile definition "GEANT4_DEVELOPER_<CONFIG>" is set on
|
||||
# each target using the target property COMPILE_DEFINITIONS_<CONFIG>
|
||||
# target property
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# function geant4_compile_definitions_config(<target>)
|
||||
# Set a custom compile definition for a Geant4 target on a
|
||||
# per configuration basis:
|
||||
# For mode <CONFIG>, define GEANT4_DEVELOPER_<CONFIG>
|
||||
#
|
||||
function(geant4_compile_definitions_config _target)
|
||||
if(NOT TARGET ${_target})
|
||||
message(FATAL_ERROR "geant4_compile_definitions_config passed target '${_target}' which is not a valid CMake target")
|
||||
endif()
|
||||
|
||||
# CMake 3 prefers $<CONFIG> in generator expressions
|
||||
set(__default_config_generator "\$<CONFIG>")
|
||||
|
||||
set_property(TARGET ${_target}
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS
|
||||
GEANT4_DEVELOPER_${__default_config_generator}
|
||||
)
|
||||
endfunction()
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - GEANT4_LIBRARY_TARGET
|
||||
# General build and install of a Geant4 library target
|
||||
#
|
||||
macro(geant4_library_target)
|
||||
cmake_parse_arguments(G4LIBTARGET
|
||||
""
|
||||
"NAME" "SOURCES;GEANT4_LINK_LIBRARIES;LINK_LIBRARIES"
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
# Add the shared library target and link its dependencies
|
||||
# WIN32 first
|
||||
if(WIN32)
|
||||
# We have to generate the def export file from an archive library.
|
||||
# This is a temporary separate from a real archive library, and
|
||||
# even though it's static, we need to mark that it will have
|
||||
# DLL symbols via the G4LIB_BUILD_DLL macro
|
||||
add_library(_${G4LIBTARGET_NAME}-archive STATIC EXCLUDE_FROM_ALL ${G4LIBTARGET_SOURCES})
|
||||
set(_archive _${G4LIBTARGET_NAME}-archive)
|
||||
target_compile_features(${_archive} PUBLIC ${GEANT4_TARGET_COMPILE_FEATURES})
|
||||
target_compile_definitions(${_archive} PUBLIC -DG4LIB_BUILD_DLL)
|
||||
|
||||
# - Add the config specific compile definitions
|
||||
geant4_compile_definitions_config(${_archive})
|
||||
|
||||
# - Create the .def file for this library
|
||||
# Use generator expressions to get path to per-mode lib and
|
||||
# older CMAKE_CFG_INTDIR variable to set name of per-mode def
|
||||
# file (Needed as generator expressions cannot be used in argument
|
||||
# to OUTPUT...
|
||||
add_custom_command(OUTPUT _${G4LIBTARGET_NAME}-${CMAKE_CFG_INTDIR}.def
|
||||
COMMAND genwindef -o _${G4LIBTARGET_NAME}-${CMAKE_CFG_INTDIR}.def -l ${G4LIBTARGET_NAME} $<TARGET_FILE:${_archive}>
|
||||
DEPENDS ${_archive} genwindef)
|
||||
|
||||
# - Now we can build the DLL
|
||||
# We create it from a dummy empty C++ file plus the def file.
|
||||
# Also set the public compile definition on it so that clients
|
||||
# will set correct macro automatically.
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/_${G4LIBTARGET_NAME}.cpp
|
||||
"// empty _${G4LIBTARGET_NAME}.cpp\n")
|
||||
|
||||
add_library(${G4LIBTARGET_NAME} SHARED _${G4LIBTARGET_NAME}.cpp
|
||||
_${G4LIBTARGET_NAME}-${CMAKE_CFG_INTDIR}.def)
|
||||
target_compile_definitions(${G4LIBTARGET_NAME} PUBLIC -DG4LIB_BUILD_DLL)
|
||||
target_compile_features(${G4LIBTARGET_NAME} PUBLIC ${GEANT4_TARGET_COMPILE_FEATURES})
|
||||
|
||||
# - Link the DLL.
|
||||
# We link it to the archive, and the supplied libraries,
|
||||
# but then remove the archive from the LINK_INTERFACE.
|
||||
target_link_libraries(${G4LIBTARGET_NAME}
|
||||
${_archive}
|
||||
${G4LIBTARGET_GEANT4_LINK_LIBRARIES}
|
||||
${G4LIBTARGET_LINK_LIBRARIES})
|
||||
|
||||
set_target_properties(${G4LIBTARGET_NAME}
|
||||
PROPERTIES INTERFACE_LINK_LIBRARIES "${G4LIBTARGET_GEANT4_LINK_LIBRARIES};${G4LIBTARGET_LINK_LIBRARIES}")
|
||||
|
||||
else()
|
||||
# - We build a Shared library in the usual fashion...
|
||||
add_library(${G4LIBTARGET_NAME} SHARED ${G4LIBTARGET_SOURCES})
|
||||
geant4_compile_definitions_config(${G4LIBTARGET_NAME})
|
||||
target_compile_features(${G4LIBTARGET_NAME} PUBLIC ${GEANT4_TARGET_COMPILE_FEATURES})
|
||||
target_link_libraries(${G4LIBTARGET_NAME}
|
||||
${G4LIBTARGET_GEANT4_LINK_LIBRARIES}
|
||||
${G4LIBTARGET_LINK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
# This property is set to prevent concurrent builds of static and
|
||||
# shared libs removing each others files.
|
||||
set_target_properties(${G4LIBTARGET_NAME}
|
||||
PROPERTIES CLEAN_DIRECT_OUTPUT 1)
|
||||
|
||||
# Always use '@rpath' in install names of libraries. This is the
|
||||
# most flexible mechanism for
|
||||
set_target_properties(${G4LIBTARGET_NAME}
|
||||
PROPERTIES MACOSX_RPATH 1
|
||||
)
|
||||
|
||||
# Install the library - note the use of RUNTIME, LIBRARY and ARCHIVE
|
||||
# this helps with later DLL builds.
|
||||
# Export to standard depends file for later install
|
||||
# NEEDS WORK TO REMOVE HARDCODED LIB/BIN DIR
|
||||
install(TARGETS ${G4LIBTARGET_NAME}
|
||||
EXPORT Geant4LibraryDepends
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Runtime
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development)
|
||||
|
||||
# Append the library target to a global property so that build tree
|
||||
# export of library dependencies can pick up all targets
|
||||
set_property(GLOBAL APPEND
|
||||
PROPERTY GEANT4_EXPORTED_TARGETS ${G4LIBTARGET_NAME})
|
||||
endif()
|
||||
|
||||
#
|
||||
# As above, but for static rather than shared library
|
||||
if(BUILD_STATIC_LIBS)
|
||||
# We have to distinguish the static from shared lib, so use -static in
|
||||
# name. Link its dependencies, and ensure we actually link to the
|
||||
# -static targets (We should strictly do this for the external
|
||||
# libraries as well if we want a pure static build).
|
||||
add_library(${G4LIBTARGET_NAME}-static STATIC ${G4LIBTARGET_SOURCES})
|
||||
geant4_compile_definitions_config(${G4LIBTARGET_NAME}-static)
|
||||
target_compile_features(${G4LIBTARGET_NAME}-static PUBLIC ${GEANT4_TARGET_COMPILE_FEATURES})
|
||||
|
||||
set(G4LIBTARGET_GEANT4_LINK_LIBRARIES_STATIC )
|
||||
foreach(_tgt ${G4LIBTARGET_GEANT4_LINK_LIBRARIES})
|
||||
list(APPEND G4LIBTARGET_GEANT4_LINK_LIBRARIES_STATIC ${_tgt}-static)
|
||||
endforeach()
|
||||
|
||||
# If we are building both types of library and builtin clhep etc,
|
||||
# we want to link shared->shared and static->static.
|
||||
# Because externals like clhep appear in G4LIBTARGET_LINK_LIBRARIES,
|
||||
# filter this list to replace shared builtins with their static variant
|
||||
string(REGEX REPLACE
|
||||
"(G4clhep|G4expat|G4zlib|G4geomUSolids)(;|$)" "\\1-static\\2"
|
||||
G4LIBTARGET_LINK_LIBRARIES_STATIC
|
||||
"${G4LIBTARGET_LINK_LIBRARIES}"
|
||||
)
|
||||
|
||||
target_link_libraries(${G4LIBTARGET_NAME}-static
|
||||
${G4LIBTARGET_GEANT4_LINK_LIBRARIES_STATIC}
|
||||
${G4LIBTARGET_LINK_LIBRARIES_STATIC})
|
||||
|
||||
# But we can rename the output library to the correct name
|
||||
# On WIN32 we *retain* the -static postfix because otherwise
|
||||
# we'll conflict with the .lib from the DLL build...
|
||||
# We could also install differently...
|
||||
if(NOT WIN32)
|
||||
set_target_properties(${G4LIBTARGET_NAME}-static
|
||||
PROPERTIES OUTPUT_NAME ${G4LIBTARGET_NAME})
|
||||
endif()
|
||||
|
||||
set_target_properties(${G4LIBTARGET_NAME}-static
|
||||
PROPERTIES CLEAN_DIRECT_OUTPUT 1)
|
||||
|
||||
install(TARGETS ${G4LIBTARGET_NAME}-static
|
||||
EXPORT Geant4LibraryDepends
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Runtime
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development)
|
||||
|
||||
set_property(GLOBAL APPEND
|
||||
PROPERTY GEANT4_EXPORTED_TARGETS ${G4LIBTARGET_NAME}-static)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - GEANT4_HEADER_MODULE_TARGET
|
||||
# Build and install for a header only Geant4 module.
|
||||
#
|
||||
macro(geant4_header_module_target)
|
||||
CMAKE_PARSE_ARGUMENTS(G4HEADERMOD
|
||||
""
|
||||
"COMPONENT"
|
||||
""
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
# Only has one component, and we just have to pick out the headers
|
||||
include(${G4HEADERMOD_COMPONENT})
|
||||
|
||||
# Header install?
|
||||
install(FILES ${${G4MODULENAME}_HEADERS}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
|
||||
COMPONENT Development)
|
||||
|
||||
# Store the include path of the component so that the build tree
|
||||
# config file can pick up all needed header paths
|
||||
set_property(GLOBAL APPEND
|
||||
PROPERTY GEANT4_BUILDTREE_INCLUDE_DIRS ${${G4MODULENAME}_INCDIR})
|
||||
endmacro()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - GEANT4_GRANULAR_LIBRARY_TARGET
|
||||
# Build and install for a Geant4 module (granular) library
|
||||
#
|
||||
macro(geant4_granular_library_target)
|
||||
cmake_parse_arguments(G4GRANLIB
|
||||
""
|
||||
"COMPONENT"
|
||||
""
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
# Granular lib only has one component, but we must pick out
|
||||
# the granular dependencies
|
||||
include(${G4GRANLIB_COMPONENT})
|
||||
|
||||
# Add the library target, using variables set by the inclusion of
|
||||
# the component file
|
||||
geant4_library_target(NAME ${G4MODULENAME}
|
||||
SOURCES ${${G4MODULENAME}_SOURCES} ${${G4MODULENAME}_HEADERS}
|
||||
GEANT4_LINK_LIBRARIES ${${G4MODULENAME}_GRANULAR_DEPENDENCIES}
|
||||
LINK_LIBRARIES ${${G4MODULENAME}_LINK_LIBRARIES})
|
||||
|
||||
# Header install?
|
||||
install(FILES ${${G4MODULENAME}_HEADERS}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
|
||||
COMPONENT Development)
|
||||
|
||||
# Store the include path of the component so that the build tree
|
||||
# config file can pick up all needed header paths
|
||||
set_property(GLOBAL APPEND
|
||||
PROPERTY GEANT4_BUILDTREE_INCLUDE_DIRS ${${G4MODULENAME}_INCDIR})
|
||||
endmacro()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - GEANT4_GLOBAL_LIBRARY_TARGET
|
||||
# Build and install of a Geant4 category (global) library
|
||||
#
|
||||
macro(geant4_global_library_target)
|
||||
cmake_parse_arguments(G4GLOBLIB
|
||||
""
|
||||
"NAME"
|
||||
"COMPONENTS"
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
# We loop over the component sources one at a time,
|
||||
# appending properties as we go.
|
||||
foreach(_comp ${G4GLOBLIB_COMPONENTS})
|
||||
include(${_comp})
|
||||
# In case we have a global lib with one component, ensure name gets set
|
||||
if(NOT G4GLOBLIB_NAME)
|
||||
set(G4GLOBLIB_NAME ${G4MODULENAME})
|
||||
endif()
|
||||
|
||||
list(APPEND ${G4GLOBLIB_NAME}_GLOBAL_SOURCES ${${G4MODULENAME}_SOURCES})
|
||||
list(APPEND ${G4GLOBLIB_NAME}_GLOBAL_HEADERS ${${G4MODULENAME}_HEADERS})
|
||||
|
||||
list(APPEND ${G4GLOBLIB_NAME}_GLOBAL_DEPENDENCIES
|
||||
${${G4MODULENAME}_GLOBAL_DEPENDENCIES})
|
||||
|
||||
list(APPEND ${G4GLOBLIB_NAME}_LINK_LIBRARIES
|
||||
${${G4MODULENAME}_LINK_LIBRARIES})
|
||||
|
||||
list(APPEND ${G4GLOBLIB_NAME}_BUILDTREE_INCLUDES ${${G4MODULENAME}_INCDIR})
|
||||
endforeach()
|
||||
|
||||
# Reset include dirs, setting from module direct dirs only
|
||||
# But need to pass this forward to the library target so that
|
||||
# it can use this list in target_include_directories...
|
||||
#set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "")
|
||||
#include_directories(${${G4GLOBLIB_NAME}_BUILDTREE_INCLUDES})
|
||||
|
||||
# Filter out duplicates/self in GLOBAL_DEPENDENCIES and LINK_LIBRARIES
|
||||
if(${G4GLOBLIB_NAME}_GLOBAL_DEPENDENCIES)
|
||||
list(REMOVE_DUPLICATES ${G4GLOBLIB_NAME}_GLOBAL_DEPENDENCIES)
|
||||
list(REMOVE_ITEM ${G4GLOBLIB_NAME}_GLOBAL_DEPENDENCIES ${G4GLOBLIB_NAME})
|
||||
endif()
|
||||
if(${G4GLOBLIB_NAME}_LINK_LIBRARIES)
|
||||
list(REMOVE_DUPLICATES ${G4GLOBLIB_NAME}_LINK_LIBRARIES)
|
||||
endif()
|
||||
|
||||
# Now add the library target
|
||||
geant4_library_target(NAME ${G4GLOBLIB_NAME}
|
||||
SOURCES
|
||||
${${G4GLOBLIB_NAME}_GLOBAL_SOURCES}
|
||||
${${G4GLOBLIB_NAME}_GLOBAL_HEADERS}
|
||||
GEANT4_LINK_LIBRARIES
|
||||
${${G4GLOBLIB_NAME}_GLOBAL_DEPENDENCIES}
|
||||
LINK_LIBRARIES
|
||||
${${G4GLOBLIB_NAME}_LINK_LIBRARIES})
|
||||
|
||||
# Header install?
|
||||
install(FILES ${${G4GLOBLIB_NAME}_GLOBAL_HEADERS}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
|
||||
COMPONENT Development)
|
||||
|
||||
# Store the include path of the component so that the build tree
|
||||
# config file can pick up all needed header paths
|
||||
set_property(GLOBAL APPEND
|
||||
PROPERTY GEANT4_BUILDTREE_INCLUDE_DIRS ${${G4GLOBLIB_NAME}_BUILDTREE_INCLUDES})
|
||||
endmacro()
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# - Basic setup for testing Geant4 using CMake/CTest
|
||||
#
|
||||
#-----------------------------------------------------------------------
|
||||
# Integration and unit tests
|
||||
# - "ENABLE_TESTING" means all tests under tests/
|
||||
option(GEANT4_ENABLE_TESTING "Enable and define all the tests of the project" OFF)
|
||||
GEANT4_ADD_FEATURE(GEANT4_ENABLE_TESTING "Enable and define all the tests of the project")
|
||||
mark_as_advanced(GEANT4_ENABLE_TESTING)
|
||||
|
||||
# - "BUILD_TESTS" means all 'tests' in individual categories.
|
||||
option(GEANT4_BUILD_TESTS "Build all the tests of the project" OFF)
|
||||
GEANT4_ADD_FEATURE(GEANT4_BUILD_TESTS "Build all the tests of the project")
|
||||
mark_as_advanced(GEANT4_BUILD_TESTS)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Configure CTest and relevant Geant4 settings, if required
|
||||
|
||||
@@ -18,21 +18,21 @@ geant4_add_dataset(
|
||||
# - Low energy electromagnetics
|
||||
geant4_add_dataset(
|
||||
NAME G4EMLOW
|
||||
VERSION 6.50
|
||||
VERSION 6.54
|
||||
FILENAME G4EMLOW
|
||||
EXTENSION tar.gz
|
||||
ENVVAR G4LEDATA
|
||||
MD5SUM 2a0dbeb2dd57158919c149f33675cce5
|
||||
MD5SUM 9d9b5207861fbed0aebddb7f89384151
|
||||
)
|
||||
|
||||
# - Photon evaporation
|
||||
geant4_add_dataset(
|
||||
NAME PhotonEvaporation
|
||||
VERSION 4.3.2
|
||||
VERSION 5.0
|
||||
FILENAME G4PhotonEvaporation
|
||||
EXTENSION tar.gz
|
||||
ENVVAR G4LEVELGAMMADATA
|
||||
MD5SUM 027a07cc3259388fd5499aae930a7832
|
||||
MD5SUM d796cc6d8c65d010f8f0e1641408b89d
|
||||
)
|
||||
|
||||
# - Radioisotopes
|
||||
@@ -68,11 +68,11 @@ geant4_add_dataset(
|
||||
# - Optical Surfaces
|
||||
geant4_add_dataset(
|
||||
NAME RealSurface
|
||||
VERSION 1.0
|
||||
FILENAME RealSurface
|
||||
VERSION 2.1
|
||||
FILENAME G4RealSurface
|
||||
EXTENSION tar.gz
|
||||
ENVVAR G4REALSURFACEDATA
|
||||
MD5SUM 0dde95e00fcd3bcd745804f870bb6884
|
||||
MD5SUM f1c72b31d45905f011e2ec4ea96612f4
|
||||
)
|
||||
|
||||
# - SAID
|
||||
|
||||
@@ -1,164 +1,12 @@
|
||||
# - Macros for organizing and specializing code in Geant4 modules
|
||||
#
|
||||
# This file defines the following macros for Geant4 developers needing to
|
||||
# define the sources, headers and library dependencies for a standard
|
||||
# Geant4 granular library module, plus utlities for specializing source
|
||||
# file properties
|
||||
#
|
||||
# GEANT4_DEFINE_MODULE - define a standard Geant4 Granular Library
|
||||
# Module
|
||||
#
|
||||
# ======================
|
||||
# A Geant4 Module is defined as a directory containing subdirectories
|
||||
#
|
||||
# include - holds all header files for the module
|
||||
# src - holds all source files for the module
|
||||
#
|
||||
# GEANT4_DEFINE_MODULE will take the name of the module, a list of header
|
||||
# files, a list of source files and dependencies:
|
||||
#
|
||||
# GEANT4_DEFINE_MODULE(NAME name
|
||||
# HEADERS hdr1 hdr2 ...
|
||||
# SOURCES src1 src2 ...
|
||||
# GRANULAR_DEPENDENCIES dep1 dep2 ...
|
||||
# GLOBAL_DEPENDENCIES dep1 dep2 ...
|
||||
# LINK_LIBRARIES lib1 lib2 ...)
|
||||
#
|
||||
# It assumes that it will be called from a CMake located in the module
|
||||
# root directory (i.e. the directory containing the include and src
|
||||
# subdirectories). It uses this location to define absolute paths to the
|
||||
# headers and sources, and will ignore any absolute paths passed in HEADERS
|
||||
# or SOURCES so that generated files can be passed in.
|
||||
#
|
||||
# The macro defines the variables
|
||||
#
|
||||
# G4MODULENAME = name
|
||||
# ${G4MODULENAME}_HEADERS = List of absolute paths to files given in HEADERS
|
||||
# ${G4MODULENAME}_SOURCES = List of absolute paths to files given in SOURCES
|
||||
# ${G4MODULENAME}_GRANULAR_DEPS = List of granular libraries on which this
|
||||
# module depends
|
||||
# ${G4MODULENAME}_GLOBAL_DEPS = List of global libraries on which this module
|
||||
# depends
|
||||
# ${G4MODULENAME}_LINK_LIBRARIES = List of external libraries to be linked to
|
||||
# this module
|
||||
#
|
||||
# It will also add the module include directory to the list of directories
|
||||
# using include_directories
|
||||
#
|
||||
#
|
||||
# GEANT4_ADD_COMPILE_DEFINITIONS - add compile defintions to a list of files
|
||||
# ================================
|
||||
# GEANT4_ADD_COMPILE_DEFINITIONS(SOURCES src1 src2 ...
|
||||
# COMPILE_DEFINITIONS def1 def 2)
|
||||
#
|
||||
# Here, SOURCES is the list of source files to which compile definitions
|
||||
# will be added. COMPILE_DEFINITIONS gives the list of definitions that
|
||||
# should be added. These definitions will be appended to any existing
|
||||
# definitions given to the sources.
|
||||
#
|
||||
|
||||
# - DEPRECATED: Functionality merged into G4DeveloperAPI/_OLD
|
||||
# Retained as many modules still include it
|
||||
# Simply forward to new module
|
||||
# - Include guard
|
||||
if(__geant4macrodefinemodule_isloaded)
|
||||
if(__GEANT4MACRODEFINEMODULE_INCLUDED)
|
||||
return()
|
||||
endif()
|
||||
set(__geant4macrodefinemodule_isloaded YES)
|
||||
set(__GEANT4MACRODEFINEMODULE_INCLUDED YES)
|
||||
|
||||
include(CMakeMacroParseArguments)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# macro geant4_define_module(NAME <name>
|
||||
# HEADERS <header1> <header2> ... <headerN>
|
||||
# SOURCES <source1> <source2> ... <sourceN>
|
||||
# GRANULAR_DEPENDENCIES <dep1> ... <depN>
|
||||
# GLOBAL_DEPENDENCIES <dep1> ... <depN>
|
||||
# LINK_LIBRARIES <lib1> ... <lib2>)
|
||||
# Define a Geant4 Module's sources and what internal and external
|
||||
# libraries it links to.
|
||||
#
|
||||
macro(geant4_define_module)
|
||||
cmake_parse_arguments(G4DEFMOD
|
||||
""
|
||||
"NAME"
|
||||
"HEADERS;SOURCES;GRANULAR_DEPENDENCIES;GLOBAL_DEPENDENCIES;LINK_LIBRARIES"
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
set(G4MODULENAME ${G4DEFMOD_NAME})
|
||||
|
||||
get_filename_component(${G4MODULENAME}_BASEDIR ${CMAKE_CURRENT_LIST_FILE} PATH)
|
||||
set(${G4MODULENAME}_SRCDIR ${${G4MODULENAME}_BASEDIR}/src)
|
||||
set(${G4MODULENAME}_INCDIR ${${G4MODULENAME}_BASEDIR}/include)
|
||||
|
||||
# We now create absolute paths to the headers and sources,
|
||||
# ignoring any already absolute paths
|
||||
foreach(_HDR ${G4DEFMOD_HEADERS})
|
||||
if(IS_ABSOLUTE ${_HDR})
|
||||
list(APPEND ${G4MODULENAME}_HEADERS ${_HDR})
|
||||
else()
|
||||
list(APPEND ${G4MODULENAME}_HEADERS ${${G4MODULENAME}_INCDIR}/${_HDR})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach(_SRC ${G4DEFMOD_SOURCES})
|
||||
if(IS_ABSOLUTE ${_SRC})
|
||||
list(APPEND ${G4MODULENAME}_SOURCES ${_SRC})
|
||||
else()
|
||||
list(APPEND ${G4MODULENAME}_SOURCES ${${G4MODULENAME}_SRCDIR}/${_SRC})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach(_LIB ${G4DEFMOD_GRANULAR_DEPENDENCIES})
|
||||
list(APPEND ${G4MODULENAME}_GRANULAR_DEPENDENCIES ${_LIB})
|
||||
endforeach()
|
||||
|
||||
foreach(_LIB ${G4DEFMOD_GLOBAL_DEPENDENCIES})
|
||||
list(APPEND ${G4MODULENAME}_GLOBAL_DEPENDENCIES ${_LIB})
|
||||
endforeach()
|
||||
|
||||
foreach(_LIB ${G4DEFMOD_LINK_LIBRARIES})
|
||||
list(APPEND ${G4MODULENAME}_LINK_LIBRARIES ${_LIB})
|
||||
endforeach()
|
||||
|
||||
include_directories(${${G4MODULENAME}_INCDIR})
|
||||
endmacro()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# macro geant4_add_compile_definitions(SOURCES <source1> ... <sourceN>
|
||||
# COMPILE_DEFINITIONS <def1> ... <defN>
|
||||
# )
|
||||
# Add extra compile definitions to a specific list of sources.
|
||||
# Macroized to handle the need to specify absolute paths.
|
||||
#
|
||||
macro(geant4_add_compile_definitions)
|
||||
cmake_parse_arguments(G4ADDDEF
|
||||
""
|
||||
""
|
||||
"SOURCES;COMPILE_DEFINITIONS"
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
# We assume that the sources have been added at the level of a
|
||||
# a sources.cmake, so are inside the src subdir of the sources.cmake
|
||||
get_filename_component(_ACD_BASE_PATH ${CMAKE_CURRENT_LIST_FILE} PATH)
|
||||
|
||||
# Now for each file, add the definitions
|
||||
foreach(_acd_source ${G4ADDDEF_SOURCES})
|
||||
# Extract any existing compile definitions
|
||||
get_source_file_property(
|
||||
_acd_existing_properties
|
||||
${_ACD_BASE_PATH}/src/${_acd_source}
|
||||
COMPILE_DEFINITIONS)
|
||||
|
||||
if(_acd_existing_properties)
|
||||
set(_acd_new_defs ${_acd_existing_properties}
|
||||
${G4ADDDEF_COMPILE_DEFINITIONS})
|
||||
else()
|
||||
set(_acd_new_defs ${G4ADDDEF_COMPILE_DEFINITIONS})
|
||||
endif()
|
||||
|
||||
# quote compile defs because this must epand to space separated list
|
||||
set_source_files_properties(${_ACD_BASE_PATH}/src/${_acd_source}
|
||||
PROPERTIES COMPILE_DEFINITIONS "${_acd_new_defs}")
|
||||
endforeach()
|
||||
endmacro()
|
||||
include(G4DeveloperAPI)
|
||||
|
||||
|
||||
@@ -1,322 +1,12 @@
|
||||
# - Define useful macros for building and installing Geant4 library targets
|
||||
#
|
||||
# This file defines the following macros for Geant4 developers needing to
|
||||
# add shared and static library targets.
|
||||
#
|
||||
# GEANT4_LIBRARY_TARGET - define standard Geant4 library targets
|
||||
#
|
||||
# The macro will take the name of the library and its sources, defining
|
||||
# static and shared targets depending on the value of BUILD_SHARED_LIBS and
|
||||
# BUILD_STATIC_LIBS. Install targets are also created.
|
||||
#
|
||||
# A custom compile definition "GEANT4_DEVELOPER_<CONFIG>" is set on
|
||||
# each target using the target property COMPILE_DEFINITIONS_<CONFIG>
|
||||
# target property
|
||||
|
||||
if(__GEANT4MACROLIBRARYTARGETS_ISLOADED)
|
||||
# - DEPRECATED: Functionality merged into G4DeveloperAPI/_OLD
|
||||
# Retained as many modules still include it
|
||||
# Simply forward to new module
|
||||
# - Include Guard
|
||||
if(__GEANT4MACROLIBRARYTARGETS_INCLUDED)
|
||||
return()
|
||||
endif()
|
||||
set(__GEANT4MACROLIBRARYTARGETS_ISLOADED TRUE)
|
||||
|
||||
include(CMakeMacroParseArguments)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# function geant4_compile_definitions_config(<target>)
|
||||
# Set a custom compile definition for a Geant4 target on a
|
||||
# per configuration basis:
|
||||
# For mode <CONFIG>, define GEANT4_DEVELOPER_<CONFIG>
|
||||
#
|
||||
function(geant4_compile_definitions_config _target)
|
||||
if(NOT TARGET ${_target})
|
||||
message(FATAL_ERROR "geant4_compile_definitions_config passed target '${_target}' which is not a valid CMake target")
|
||||
endif()
|
||||
|
||||
# CMake 3 prefers $<CONFIG> in generator expressions, but 2.8.12 only
|
||||
# supports $<CONFIGURATION>
|
||||
set(__default_config_generator "\$<CONFIG>")
|
||||
if(CMAKE_MAJOR_VERSION LESS 3)
|
||||
set(__default_config_generator "\$<CONFIGURATION>")
|
||||
endif()
|
||||
|
||||
set_property(TARGET ${_target}
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS
|
||||
GEANT4_DEVELOPER_${__default_config_generator}
|
||||
)
|
||||
endfunction()
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - GEANT4_LIBRARY_TARGET
|
||||
# General build and install of a Geant4 library target
|
||||
#
|
||||
MACRO(GEANT4_LIBRARY_TARGET)
|
||||
CMAKE_PARSE_ARGUMENTS(G4LIBTARGET
|
||||
""
|
||||
"NAME" "SOURCES;GEANT4_LINK_LIBRARIES;LINK_LIBRARIES"
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
# Add the shared library target and link its dependencies
|
||||
# WIN32 first
|
||||
if(WIN32)
|
||||
# We have to generate the def export file from an archive library.
|
||||
# This is a temporary separate from a real archive library, and
|
||||
# even though it's static, we need to mark that it will have
|
||||
# DLL symbols via the G4LIB_BUILD_DLL macro
|
||||
add_library(_${G4LIBTARGET_NAME}-archive STATIC EXCLUDE_FROM_ALL ${G4LIBTARGET_SOURCES})
|
||||
set(_archive _${G4LIBTARGET_NAME}-archive)
|
||||
target_compile_features(${_archive} PUBLIC ${GEANT4_TARGET_COMPILE_FEATURES})
|
||||
target_compile_definitions(${_archive} PUBLIC -DG4LIB_BUILD_DLL)
|
||||
|
||||
# - Add the config specific compile definitions
|
||||
geant4_compile_definitions_config(${_archive})
|
||||
|
||||
# - Create the .def file for this library
|
||||
# Use generator expressions to get path to per-mode lib and
|
||||
# older CMAKE_CFG_INTDIR variable to set name of per-mode def
|
||||
# file (Needed as generator expressions cannot be used in argument
|
||||
# to OUTPUT...
|
||||
add_custom_command(OUTPUT _${G4LIBTARGET_NAME}-${CMAKE_CFG_INTDIR}.def
|
||||
COMMAND genwindef -o _${G4LIBTARGET_NAME}-${CMAKE_CFG_INTDIR}.def -l ${G4LIBTARGET_NAME} $<TARGET_FILE:${_archive}>
|
||||
DEPENDS ${_archive} genwindef)
|
||||
|
||||
# - Now we can build the DLL
|
||||
# We create it from a dummy empty C++ file plus the def file.
|
||||
# Also set the public compile definition on it so that clients
|
||||
# will set correct macro automatically.
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/_${G4LIBTARGET_NAME}.cpp
|
||||
"// empty _${G4LIBTARGET_NAME}.cpp\n")
|
||||
|
||||
add_library(${G4LIBTARGET_NAME} SHARED _${G4LIBTARGET_NAME}.cpp
|
||||
_${G4LIBTARGET_NAME}-${CMAKE_CFG_INTDIR}.def)
|
||||
target_compile_definitions(${G4LIBTARGET_NAME} PUBLIC -DG4LIB_BUILD_DLL)
|
||||
target_compile_features(${G4LIBTARGET_NAME} PUBLIC ${GEANT4_TARGET_COMPILE_FEATURES})
|
||||
|
||||
# - Link the DLL.
|
||||
# We link it to the archive, and the supplied libraries,
|
||||
# but then remove the archive from the LINK_INTERFACE.
|
||||
target_link_libraries(${G4LIBTARGET_NAME}
|
||||
${_archive}
|
||||
${G4LIBTARGET_GEANT4_LINK_LIBRARIES}
|
||||
${G4LIBTARGET_LINK_LIBRARIES})
|
||||
|
||||
set_target_properties(${G4LIBTARGET_NAME}
|
||||
PROPERTIES INTERFACE_LINK_LIBRARIES "${G4LIBTARGET_GEANT4_LINK_LIBRARIES};${G4LIBTARGET_LINK_LIBRARIES}")
|
||||
|
||||
else()
|
||||
# - We build a Shared library in the usual fashion...
|
||||
add_library(${G4LIBTARGET_NAME} SHARED ${G4LIBTARGET_SOURCES})
|
||||
geant4_compile_definitions_config(${G4LIBTARGET_NAME})
|
||||
target_compile_features(${G4LIBTARGET_NAME} PUBLIC ${GEANT4_TARGET_COMPILE_FEATURES})
|
||||
target_link_libraries(${G4LIBTARGET_NAME}
|
||||
${G4LIBTARGET_GEANT4_LINK_LIBRARIES}
|
||||
${G4LIBTARGET_LINK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
# This property is set to prevent concurrent builds of static and
|
||||
# shared libs removing each others files.
|
||||
set_target_properties(${G4LIBTARGET_NAME}
|
||||
PROPERTIES CLEAN_DIRECT_OUTPUT 1)
|
||||
|
||||
# Always use '@rpath' in install names of libraries. This is the
|
||||
# most flexible mechanism for
|
||||
set_target_properties(${G4LIBTARGET_NAME}
|
||||
PROPERTIES MACOSX_RPATH 1
|
||||
)
|
||||
|
||||
# Install the library - note the use of RUNTIME, LIBRARY and ARCHIVE
|
||||
# this helps with later DLL builds.
|
||||
# Export to standard depends file for later install
|
||||
# NEEDS WORK TO REMOVE HARDCODED LIB/BIN DIR
|
||||
install(TARGETS ${G4LIBTARGET_NAME}
|
||||
EXPORT Geant4LibraryDepends
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Runtime
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development)
|
||||
|
||||
# Append the library target to a global property so that build tree
|
||||
# export of library dependencies can pick up all targets
|
||||
set_property(GLOBAL APPEND
|
||||
PROPERTY GEANT4_EXPORTED_TARGETS ${G4LIBTARGET_NAME})
|
||||
endif()
|
||||
|
||||
#
|
||||
# As above, but for static rather than shared library
|
||||
if(BUILD_STATIC_LIBS)
|
||||
# We have to distinguish the static from shared lib, so use -static in
|
||||
# name. Link its dependencies, and ensure we actually link to the
|
||||
# -static targets (We should strictly do this for the external
|
||||
# libraries as well if we want a pure static build).
|
||||
add_library(${G4LIBTARGET_NAME}-static STATIC ${G4LIBTARGET_SOURCES})
|
||||
geant4_compile_definitions_config(${G4LIBTARGET_NAME}-static)
|
||||
target_compile_features(${G4LIBTARGET_NAME}-static PUBLIC ${GEANT4_TARGET_COMPILE_FEATURES})
|
||||
|
||||
set(G4LIBTARGET_GEANT4_LINK_LIBRARIES_STATIC )
|
||||
foreach(_tgt ${G4LIBTARGET_GEANT4_LINK_LIBRARIES})
|
||||
list(APPEND G4LIBTARGET_GEANT4_LINK_LIBRARIES_STATIC ${_tgt}-static)
|
||||
endforeach()
|
||||
|
||||
# If we are building both types of library and builtin clhep etc,
|
||||
# we want to link shared->shared and static->static.
|
||||
# Because externals like clhep appear in G4LIBTARGET_LINK_LIBRARIES,
|
||||
# filter this list to replace shared builtins with their static variant
|
||||
string(REGEX REPLACE
|
||||
"(G4clhep|G4expat|G4zlib|G4geomUSolids)(;|$)" "\\1-static\\2"
|
||||
G4LIBTARGET_LINK_LIBRARIES_STATIC
|
||||
"${G4LIBTARGET_LINK_LIBRARIES}"
|
||||
)
|
||||
|
||||
target_link_libraries(${G4LIBTARGET_NAME}-static
|
||||
${G4LIBTARGET_GEANT4_LINK_LIBRARIES_STATIC}
|
||||
${G4LIBTARGET_LINK_LIBRARIES_STATIC})
|
||||
|
||||
# But we can rename the output library to the correct name
|
||||
# On WIN32 we *retain* the -static postfix because otherwise
|
||||
# we'll conflict with the .lib from the DLL build...
|
||||
# We could also install differently...
|
||||
if(NOT WIN32)
|
||||
set_target_properties(${G4LIBTARGET_NAME}-static
|
||||
PROPERTIES OUTPUT_NAME ${G4LIBTARGET_NAME})
|
||||
endif()
|
||||
|
||||
set_target_properties(${G4LIBTARGET_NAME}-static
|
||||
PROPERTIES CLEAN_DIRECT_OUTPUT 1)
|
||||
|
||||
install(TARGETS ${G4LIBTARGET_NAME}-static
|
||||
EXPORT Geant4LibraryDepends
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Runtime
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development)
|
||||
|
||||
set_property(GLOBAL APPEND
|
||||
PROPERTY GEANT4_EXPORTED_TARGETS ${G4LIBTARGET_NAME}-static)
|
||||
endif()
|
||||
ENDMACRO()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - GEANT4_HEADER_MODULE_TARGET
|
||||
# Build and install for a header only Geant4 module.
|
||||
#
|
||||
MACRO(GEANT4_HEADER_MODULE_TARGET)
|
||||
CMAKE_PARSE_ARGUMENTS(G4HEADERMOD
|
||||
""
|
||||
"COMPONENT"
|
||||
""
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
# Only has one component, and we just have to pick out the headers
|
||||
include(${G4HEADERMOD_COMPONENT})
|
||||
|
||||
# Header install?
|
||||
install(FILES ${${G4MODULENAME}_HEADERS}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
|
||||
COMPONENT Development)
|
||||
|
||||
# Store the include path of the component so that the build tree
|
||||
# config file can pick up all needed header paths
|
||||
set_property(GLOBAL APPEND
|
||||
PROPERTY GEANT4_BUILDTREE_INCLUDE_DIRS ${${G4MODULENAME}_INCDIR})
|
||||
ENDMACRO()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - GEANT4_GRANULAR_LIBRARY_TARGET
|
||||
# Build and install for a Geant4 module (granular) library
|
||||
#
|
||||
MACRO(GEANT4_GRANULAR_LIBRARY_TARGET)
|
||||
CMAKE_PARSE_ARGUMENTS(G4GRANLIB
|
||||
""
|
||||
"COMPONENT"
|
||||
""
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
# Granular lib only has one component, but we must pick out
|
||||
# the granular dependencies
|
||||
include(${G4GRANLIB_COMPONENT})
|
||||
|
||||
# Add the library target, using variables set by the inclusion of
|
||||
# the component file
|
||||
GEANT4_LIBRARY_TARGET(NAME ${G4MODULENAME}
|
||||
SOURCES ${${G4MODULENAME}_SOURCES} ${${G4MODULENAME}_HEADERS}
|
||||
GEANT4_LINK_LIBRARIES ${${G4MODULENAME}_GRANULAR_DEPENDENCIES}
|
||||
LINK_LIBRARIES ${${G4MODULENAME}_LINK_LIBRARIES})
|
||||
|
||||
# Header install?
|
||||
install(FILES ${${G4MODULENAME}_HEADERS}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
|
||||
COMPONENT Development)
|
||||
|
||||
# Store the include path of the component so that the build tree
|
||||
# config file can pick up all needed header paths
|
||||
set_property(GLOBAL APPEND
|
||||
PROPERTY GEANT4_BUILDTREE_INCLUDE_DIRS ${${G4MODULENAME}_INCDIR})
|
||||
ENDMACRO()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - GEANT4_GLOBAL_LIBRARY_TARGET
|
||||
# Build and install of a Geant4 category (global) library
|
||||
#
|
||||
MACRO(GEANT4_GLOBAL_LIBRARY_TARGET)
|
||||
CMAKE_PARSE_ARGUMENTS(G4GLOBLIB
|
||||
""
|
||||
"NAME"
|
||||
"COMPONENTS"
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
# We loop over the component sources one at a time,
|
||||
# appending properties as we go.
|
||||
foreach(_comp ${G4GLOBLIB_COMPONENTS})
|
||||
include(${_comp})
|
||||
# In case we have a global lib with one component, ensure name gets set
|
||||
if(NOT G4GLOBLIB_NAME)
|
||||
set(G4GLOBLIB_NAME ${G4MODULENAME})
|
||||
endif()
|
||||
|
||||
list(APPEND ${G4GLOBLIB_NAME}_GLOBAL_SOURCES ${${G4MODULENAME}_SOURCES})
|
||||
list(APPEND ${G4GLOBLIB_NAME}_GLOBAL_HEADERS ${${G4MODULENAME}_HEADERS})
|
||||
|
||||
list(APPEND ${G4GLOBLIB_NAME}_GLOBAL_DEPENDENCIES
|
||||
${${G4MODULENAME}_GLOBAL_DEPENDENCIES})
|
||||
|
||||
list(APPEND ${G4GLOBLIB_NAME}_LINK_LIBRARIES
|
||||
${${G4MODULENAME}_LINK_LIBRARIES})
|
||||
|
||||
list(APPEND ${G4GLOBLIB_NAME}_BUILDTREE_INCLUDES ${${G4MODULENAME}_INCDIR})
|
||||
endforeach()
|
||||
|
||||
# Filter out duplicates/self in GLOBAL_DEPENDENCIES and LINK_LIBRARIES
|
||||
if(${G4GLOBLIB_NAME}_GLOBAL_DEPENDENCIES)
|
||||
list(REMOVE_DUPLICATES ${G4GLOBLIB_NAME}_GLOBAL_DEPENDENCIES)
|
||||
list(REMOVE_ITEM ${G4GLOBLIB_NAME}_GLOBAL_DEPENDENCIES ${G4GLOBLIB_NAME})
|
||||
endif()
|
||||
if(${G4GLOBLIB_NAME}_LINK_LIBRARIES)
|
||||
list(REMOVE_DUPLICATES ${G4GLOBLIB_NAME}_LINK_LIBRARIES)
|
||||
endif()
|
||||
|
||||
# Now add the library target
|
||||
GEANT4_LIBRARY_TARGET(NAME ${G4GLOBLIB_NAME}
|
||||
SOURCES
|
||||
${${G4GLOBLIB_NAME}_GLOBAL_SOURCES}
|
||||
${${G4GLOBLIB_NAME}_GLOBAL_HEADERS}
|
||||
GEANT4_LINK_LIBRARIES
|
||||
${${G4GLOBLIB_NAME}_GLOBAL_DEPENDENCIES}
|
||||
LINK_LIBRARIES
|
||||
${${G4GLOBLIB_NAME}_LINK_LIBRARIES})
|
||||
|
||||
# Header install?
|
||||
install(FILES ${${G4GLOBLIB_NAME}_GLOBAL_HEADERS}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
|
||||
COMPONENT Development)
|
||||
|
||||
# Store the include path of the component so that the build tree
|
||||
# config file can pick up all needed header paths
|
||||
set_property(GLOBAL APPEND
|
||||
PROPERTY GEANT4_BUILDTREE_INCLUDE_DIRS ${${G4GLOBLIB_NAME}_BUILDTREE_INCLUDES})
|
||||
|
||||
ENDMACRO()
|
||||
|
||||
set(__GEANT4MACROLIBRARYTARGETS_INCLUDED TRUE)
|
||||
|
||||
include(G4DeveloperAPI)
|
||||
|
||||
|
||||
@@ -19,29 +19,41 @@
|
||||
# FREETYPE - For analysis module, find external FreeType install
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Find required CLHEP package
|
||||
# We prefer to use our internal CLHEP library, but provide an option
|
||||
# to allow an external CLHEP to be used should the user require this.
|
||||
# We also allow that it can be automatically enabled by providing
|
||||
# the CLHEP_ROOT_DIR option (which FindCLHEP will recognize)
|
||||
# CLHEP
|
||||
# ^^^^^
|
||||
#
|
||||
# As requested by ATLAS, an additional option for preferring use of
|
||||
# CLHEP's granular libs is provided when using a system CLHEP.
|
||||
# By default, Geant4 is built with its own internal copy of the CLHEP
|
||||
# libraries and headers. An external install of CLHEP may be used
|
||||
# instead by setting the `GEANT4_USE_SYSTEM_CLHEP` to `ON`.
|
||||
#
|
||||
# CMake can be pointed to the required external install of CLHEP
|
||||
# by providing the `CLHEP_ROOT_DIR` option. Setting this variable
|
||||
# will automatically enable use of an external CLHEP.
|
||||
#
|
||||
# When using an external install of CLHEP, the default is to link
|
||||
# to the full CLHEP library. An additional advanced option
|
||||
# `GEANT4_USE_SYSTEM_CLHEP_GRANULAR` is available to configure
|
||||
# use of the modular CLHEP libraries.
|
||||
#
|
||||
# KNOWNISSUE : For internal CLHEP, how to deal with static and shared?
|
||||
if(CLHEP_ROOT_DIR)
|
||||
set(_default_use_system_clhep ON)
|
||||
# CLHEP_ROOT_DIR is non-standard for Config mode, so attempt temporary translation
|
||||
# into CMAKE_PREFIX_PATH. Could also add as PATHS to find_package,
|
||||
# but CMAKE_PREFIX_PATH has higher search priority.
|
||||
list(INSERT CMAKE_PREFIX_PATH 0 "${CLHEP_ROOT_DIR}")
|
||||
else()
|
||||
set(_default_use_system_clhep OFF)
|
||||
endif()
|
||||
|
||||
option(GEANT4_USE_SYSTEM_CLHEP "Use system CLHEP library" ${_default_use_system_clhep})
|
||||
cmake_dependent_option(GEANT4_USE_SYSTEM_CLHEP_GRANULAR
|
||||
"Use system CLHEP granular libraries" OFF
|
||||
"GEANT4_USE_SYSTEM_CLHEP" OFF
|
||||
)
|
||||
mark_as_advanced(GEANT4_USE_SYSTEM_CLHEP_GRANULAR)
|
||||
|
||||
if(GEANT4_USE_SYSTEM_CLHEP)
|
||||
set(__system_clhep_mode " (singular)")
|
||||
# Further advanced option to select granular CLHEP libs
|
||||
option(GEANT4_USE_SYSTEM_CLHEP_GRANULAR "Use system CLHEP granular libraries" OFF)
|
||||
mark_as_advanced(GEANT4_USE_SYSTEM_CLHEP_GRANULAR)
|
||||
|
||||
if(GEANT4_USE_SYSTEM_CLHEP_GRANULAR)
|
||||
set(__g4_clhep_components
|
||||
@@ -53,32 +65,35 @@ if(GEANT4_USE_SYSTEM_CLHEP)
|
||||
set(__system_clhep_mode " (granular)")
|
||||
endif()
|
||||
|
||||
# Find CLHEP using package-mode (i.e. FindCLHEP)
|
||||
# This will set up imported targets for us, but we need
|
||||
# to set CLHEP_LIBRARIES afterwards to use these
|
||||
find_package(CLHEP 2.3.3.0 REQUIRED ${__g4_clhep_components})
|
||||
|
||||
set(CLHEP_LIBRARIES CLHEP::CLHEP)
|
||||
if(GEANT4_USE_SYSTEM_CLHEP_GRANULAR)
|
||||
set(CLHEP_LIBRARIES)
|
||||
foreach(_comp ${__g4_clhep_components})
|
||||
list(APPEND CLHEP_LIBRARIES "CLHEP::${_comp}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
set(GEANT4_USE_SYSTEM_CLHEP TRUE)
|
||||
# Find CLHEP using config-mode (i.e. CLHEPConfig)
|
||||
# Note that the imported targets have different properties
|
||||
# depending on version:
|
||||
# >= 2.3.3.0 Imported targets have INTERFACE_INCLUDE_DIRECTORIES
|
||||
# >= 2.3.1.0 Imported targets are namespaced, all components available
|
||||
# < 2.3.1.0 Only CLHEP/CLHEPS available as imported targets
|
||||
#
|
||||
# By supplying components, CLHEP_LIBRARIES is populated with the
|
||||
# appropriate set of imported targets.
|
||||
find_package(CLHEP 2.3.3.0 REQUIRED ${__g4_clhep_components} CONFIG)
|
||||
else()
|
||||
set(CLHEP_FOUND TRUE)
|
||||
set(GEANT4_USE_BUILTIN_CLHEP TRUE)
|
||||
# TODO: CLHEP_INCLUDE_DIRS still required for windows support
|
||||
# Current way of building DLLs requires build of a temporary
|
||||
# archive lib, and this does not link to dependencies, hence
|
||||
# it does not get their usage requirements.
|
||||
# May be fixable by linking or use of better DLL build mechanism
|
||||
# available in CMake >= 3.4
|
||||
# As other externals will need the same treatment, return
|
||||
# to old CLHEP_INCLUDE_DIRS setting
|
||||
#
|
||||
set(CLHEP_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/source/externals/clhep/include")
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(CLHEP_LIBRARIES G4clhep)
|
||||
else()
|
||||
set(CLHEP_LIBRARIES G4clhep-static)
|
||||
endif()
|
||||
|
||||
# All G4*** targets are handled internally to use static or shared
|
||||
# as appropriate, so only need to declare core target name
|
||||
set(CLHEP_LIBRARIES G4clhep)
|
||||
endif()
|
||||
|
||||
GEANT4_ADD_FEATURE(GEANT4_USE_SYSTEM_CLHEP "Using system CLHEP library${__system_clhep_mode}")
|
||||
geant4_add_feature(GEANT4_USE_SYSTEM_CLHEP "Using system CLHEP library${__system_clhep_mode}")
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Find required EXPAT package
|
||||
@@ -241,13 +256,14 @@ if(GEANT4_USE_ALL_USOLIDS OR GEANT4_USE_PARTIAL_USOLIDS)
|
||||
endforeach()
|
||||
GEANT4_ADD_FEATURE(GEANT4_USE_USOLIDS "Replacing Geant4 solids with USolids equivalents for ${GEANT4_USE_PARTIAL_USOLIDS_SHAPE_LIST} (EXPERIMENTAL)")
|
||||
endif()
|
||||
list (APPEND GEANT4_USOLIDS_COMPILE_DEFINITIONS ${VECGEOM_DEFINITIONS})
|
||||
|
||||
# Combined definitions
|
||||
add_definitions(${GEANT4_USOLIDS_COMPILE_DEFINITIONS})
|
||||
|
||||
# Add USolids inc dirs here - can be removed once USolids supports
|
||||
# INTERFACE_INCLUDE_DIRECTORIES
|
||||
include_directories(${USOLIDS_INCLUDE_DIRS})
|
||||
include_directories(${USOLIDS_INCLUDE_DIRS} ${VECGEOM_EXTERNAL_INCLUDES})
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
@@ -95,10 +95,11 @@
|
||||
# argument is set. This is because these options do not depend on specific
|
||||
# components being available.
|
||||
#
|
||||
# You can also query whether the Geant4 found uses the builtin versions
|
||||
# of CLHEP, ZLIB, or Expat after calling find_package via the variables
|
||||
# You can also query whether the Geant4 found uses the builtin or system
|
||||
# versions of CLHEP, ZLIB, or Expat after calling find_package via the variables
|
||||
#
|
||||
# Geant4_builtin_clhep_FOUND (TRUE if Geant4 built with internal CLHEP)
|
||||
# Geant4_system_clhep_FOUND (TRUE if Geant4 built with external CLHEP)
|
||||
# Geant4_builtin_expat_FOUND (TRUE if Geant4 built with internal Expat)
|
||||
# Geant4_builtin_zlib_FOUND (TRUE if Geant4 built with internal Zlib)
|
||||
#
|
||||
@@ -264,19 +265,32 @@ unset(Geant4_DATASET_DESCRIPTIONS)
|
||||
# but require additional compile definitions.
|
||||
#
|
||||
# Builtin/External packages
|
||||
set(Geant4_builtin_clhep_FOUND @GEANT4_USE_BUILTIN_CLHEP@)
|
||||
if(NOT Geant4_builtin_clhep_FOUND)
|
||||
set(Geant4_system_clhep_FOUND @GEANT4_USE_SYSTEM_CLHEP@)
|
||||
|
||||
if(Geant4_system_clhep_FOUND)
|
||||
set(Geant4_builtin_clhep_FOUND FALSE)
|
||||
set(Geant4_system_clhep_ISGRANULAR @GEANT4_USE_SYSTEM_CLHEP_GRANULAR@)
|
||||
|
||||
set(CLHEP_ROOT_DIR "@CLHEP_ROOT_DIR@")
|
||||
set(__GEANT4_OLD_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
|
||||
set(CMAKE_MODULE_PATH "${_geant4_thisdir}/Modules" ${CMAKE_MODULE_PATH})
|
||||
find_package(CLHEP @CLHEP_VERSION@ REQUIRED @__g4_clhep_components@)
|
||||
set(CMAKE_MODULE_PATH ${__GEANT4_OLD_CMAKE_MODULE_PATH})
|
||||
unset(CLHEP_ROOT_DIR)
|
||||
unset(__GEANT4_OLD_CMAKE_MODULE_PATH)
|
||||
#CLHEP doesn't use target properties fully yet, so always include_directories
|
||||
# TODO: Review hard-coding of build-time CLHEP_DIR, as this prevents
|
||||
# full relocatability, but minimizes client configuration. It is
|
||||
# also required by the testing system (due to tests/example *builds*
|
||||
# being tests.
|
||||
# TODO: See if hard-coded variables can be stored in an optional
|
||||
# "build settings" file that can be optionally installed/included
|
||||
set(CLHEP_DIR "@CLHEP_DIR@")
|
||||
find_package(CLHEP @CLHEP_VERSION@ EXACT REQUIRED @__g4_clhep_components@ CONFIG)
|
||||
|
||||
# HACK: Explicitly use include_directories.
|
||||
# - Geant4 and CLHEP use full imported targets with usage requirements,
|
||||
# but ROOT (used in the examples), ignores usage requirements in dictionary
|
||||
# generation steps.
|
||||
# To retain comptibility with examples, explictly include_directories
|
||||
# for CLHEP. This is a *pure workaround* for the use case of a project
|
||||
# using ROOT that generates dictionaries for class headers that
|
||||
# #include Geant4 headers...
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
else()
|
||||
set(Geant4_builtin_clhep_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
set(Geant4_builtin_expat_FOUND @GEANT4_USE_BUILTIN_EXPAT@)
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
#
|
||||
# IT SHOULD NOT BE INSTALLED!
|
||||
|
||||
include(CMakeMacroParseArguments)
|
||||
include(CMakeParseArguments)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Special internal functions for building tests.
|
||||
#-----------------------------------------------------------------------
|
||||
# function geant4_link_library(<name> source1 source2 ...
|
||||
# [TYPE STATIC|SHARED]
|
||||
# [TYPE STATIC|SHARED]
|
||||
# LIBRARIES library1 library2 ...)
|
||||
#
|
||||
function(geant4_link_library library)
|
||||
@@ -19,13 +19,13 @@ function(geant4_link_library library)
|
||||
set(sources)
|
||||
|
||||
# - Fill sources
|
||||
foreach(fp ${ARG_UNPARSED_ARGUMENTS})
|
||||
if(IS_ABSOLUTE ${fp})
|
||||
file(GLOB files ${fp})
|
||||
foreach(fp ${ARG_UNPARSED_ARGUMENTS})
|
||||
if(IS_ABSOLUTE ${fp})
|
||||
file(GLOB files ${fp})
|
||||
else()
|
||||
file(GLOB files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${fp})
|
||||
endif()
|
||||
if(files)
|
||||
if(files)
|
||||
set(sources ${sources} ${files})
|
||||
else()
|
||||
set(sources ${sources} ${fp})
|
||||
@@ -88,13 +88,13 @@ function(geant4_executable executable)
|
||||
endfunction()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# function geant4_add_test(<name> COMMAND cmd [arg1... ]
|
||||
# function geant4_add_test(<name> COMMAND cmd [arg1... ]
|
||||
# [PRECMD cmd [arg1...]] [POSTCMD cmd [arg1...]]
|
||||
# [OUTPUT outfile] [ERROR errfile]
|
||||
# [WORKING_DIRECTORY directory]
|
||||
# [ENVIRONMENT var1=val1 var2=val2 ...
|
||||
# [DEPENDS test1 ...]
|
||||
# [TIMEOUT seconds]
|
||||
# [TIMEOUT seconds]
|
||||
# [DEBUG]
|
||||
# [SOURCE_DIR dir] [BINARY_DIR dir]
|
||||
# [BUILD target] [PROJECT project]
|
||||
@@ -107,16 +107,16 @@ function(geant4_add_test test)
|
||||
return()
|
||||
endif()
|
||||
|
||||
cmake_parse_arguments(ARG
|
||||
"DEBUG"
|
||||
"TIMEOUT;BUILD;OUTPUT;ERROR;SOURCE_DIR;BINARY_DIR;PROJECT;PASSREGEX;FAILREGEX;WORKING_DIRECTORY"
|
||||
"COMMAND;PRECMD;POSTCMD;ENVIRONMENT;DEPENDS;LABELS"
|
||||
cmake_parse_arguments(ARG
|
||||
"DEBUG"
|
||||
"TIMEOUT;BUILD;OUTPUT;ERROR;SOURCE_DIR;BINARY_DIR;PROJECT;PASSREGEX;FAILREGEX;WORKING_DIRECTORY"
|
||||
"COMMAND;PRECMD;POSTCMD;ENVIRONMENT;DEPENDS;LABELS"
|
||||
${ARGN})
|
||||
|
||||
if(NOT CMAKE_GENERATOR MATCHES Makefiles)
|
||||
set(_cfg $<CONFIGURATION>/)
|
||||
endif()
|
||||
|
||||
|
||||
#- Handle COMMAND argument
|
||||
list(LENGTH ARG_COMMAND _len)
|
||||
if(_len LESS 1)
|
||||
@@ -165,11 +165,11 @@ function(geant4_add_test test)
|
||||
if(ARG_DEBUG)
|
||||
set(_command ${_command} -DDBG=ON)
|
||||
endif()
|
||||
|
||||
|
||||
if(ARG_WORKING_DIRECTORY)
|
||||
set(_command ${_command} -DCWD=${ARG_WORKING_DIRECTORY})
|
||||
endif()
|
||||
|
||||
|
||||
if(ARG_TIMEOUT)
|
||||
set(_command ${_command} -DTIM=${ARG_TIMEOUT})
|
||||
endif()
|
||||
@@ -202,7 +202,7 @@ function(geant4_add_test test)
|
||||
else()
|
||||
set(ARG_PROJECT ${ARG_BUILD})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
add_test(NAME ${test} COMMAND ${CMAKE_CTEST_COMMAND}
|
||||
--build-and-test ${ARG_SOURCE_DIR} ${ARG_BINARY_DIR}
|
||||
--build-generator ${CMAKE_GENERATOR}
|
||||
@@ -216,7 +216,7 @@ function(geant4_add_test test)
|
||||
if(ARG_FAILREGEX)
|
||||
set_property(TEST ${test} PROPERTY FAIL_REGULAR_EXPRESSION "warning:|(${ARG_FAILREGEX})")
|
||||
else()
|
||||
set_property(TEST ${test} PROPERTY FAIL_REGULAR_EXPRESSION "warning:")
|
||||
set_property(TEST ${test} PROPERTY FAIL_REGULAR_EXPRESSION "warning:")
|
||||
endif()
|
||||
else()
|
||||
add_test(NAME ${test} COMMAND ${_command})
|
||||
@@ -237,11 +237,11 @@ function(geant4_add_test test)
|
||||
if(ARG_PASSREGEX)
|
||||
set_property(TEST ${test} PROPERTY PASS_REGULAR_EXPRESSION ${ARG_PASSREGEX})
|
||||
endif()
|
||||
|
||||
|
||||
if(ARG_LABELS)
|
||||
set_property(TEST ${test} PROPERTY LABELS ${ARG_LABELS})
|
||||
else()
|
||||
set_property(TEST ${test} PROPERTY LABELS Nightly)
|
||||
set_property(TEST ${test} PROPERTY LABELS Nightly)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
||||
+9
-3
@@ -1,4 +1,4 @@
|
||||
svn log $Id: History 101512 2016-11-18 15:28:47Z gcosmo $
|
||||
svn log $Id: History 103646 2017-04-20 09:30:24Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -16,11 +16,17 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
18th November 2016 Gunter Folger (config-V10-02-07)
|
||||
20th April 2017 Gabriele Cosmo (config-V10-03-01)
|
||||
- binmake-gmk: added 'processses/solidstate' module include path.
|
||||
|
||||
14th March 2017 Gabriele Cosmo (config-V10-03-00)
|
||||
- Corrected order of linkage in binmake.gmk for analysis global library.
|
||||
|
||||
18th November 2016 Gunter Folger (config-V10-02-07)
|
||||
- add include for analysis/accumulables
|
||||
- revert change forcing load of libraries
|
||||
|
||||
9th November 2016 Gunter Folger (config-V10-02-06) *tag REJECTED*
|
||||
9th November 2016 Gunter Folger (config-V10-02-06) *tag REJECTED*
|
||||
- Force loading of symbols for physics_lists/constructor and builders
|
||||
libraries in granular mode for static libs
|
||||
|
||||
|
||||
+5
-4
@@ -1,4 +1,4 @@
|
||||
# $Id: binmake.gmk 101512 2016-11-18 15:28:47Z gcosmo $
|
||||
# $Id: binmake.gmk 103646 2017-04-20 09:30:24Z gcosmo $
|
||||
# ----------------------------------------------------------
|
||||
# Script defining rules and paths for making binaries.
|
||||
# First implementation: Gabriele Cosmo, 25/06/1998.
|
||||
@@ -88,7 +88,8 @@ ifndef INCFLAGS
|
||||
-I$(G4BASE)/processes/scoring/include \
|
||||
-I$(G4BASE)/processes/decay/include \
|
||||
-I$(G4BASE)/processes/optical/include \
|
||||
-I$(G4BASE)/processes/phonon/include \
|
||||
-I$(G4BASE)/processes/solidstate/channeling/include \
|
||||
-I$(G4BASE)/processes/solidstate/phonon/include \
|
||||
-I$(G4BASE)/processes/transportation/include \
|
||||
-I$(G4BASE)/processes/parameterisation/include \
|
||||
-I$(G4BASE)/processes/electromagnetic/adjoint/include \
|
||||
@@ -233,8 +234,7 @@ ifdef GLOBALLIBS
|
||||
LDLIBS2 += -lG3toG4
|
||||
endif
|
||||
|
||||
LDLIBS2 += -lG4analysis \
|
||||
-lG4error_propagation \
|
||||
LDLIBS2 += -lG4error_propagation \
|
||||
-lG4readout \
|
||||
-lG4physicslists \
|
||||
-lG4run \
|
||||
@@ -248,6 +248,7 @@ ifdef GLOBALLIBS
|
||||
-lG4geometry \
|
||||
-lG4materials \
|
||||
-lG4graphics_reps \
|
||||
-lG4analysis \
|
||||
-lG4intercoms \
|
||||
-lG4global
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
K 13
|
||||
svn:mergeinfo
|
||||
V 248
|
||||
/branches/geant4/_symbols/09-06-refmt-01_branch/examples/.doxygen:66825-66880,66925-66956
|
||||
/branches/geant4/_symbols/10-03-ref-00_branch/examples/.doxygen:101905,101910
|
||||
/tags/geant4/_symbols/geant4-09-06-refmt-01-step6a/examples/.doxygen:66881-66882
|
||||
END
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,9 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,9 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,9 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,9 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,9 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,9 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,9 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,9 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,9 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,9 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,9 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,9 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,9 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,9 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,9 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,9 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,9 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,9 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,9 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,9 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,9 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,9 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,13 @@
|
||||
K 13
|
||||
svn:eol-style
|
||||
V 2
|
||||
LF
|
||||
K 14
|
||||
svn:executable
|
||||
V 1
|
||||
*
|
||||
K 12
|
||||
svn:keywords
|
||||
V 2
|
||||
Id
|
||||
END
|
||||
@@ -0,0 +1,25 @@
|
||||
$Id$
|
||||
|
||||
///\file ".README.HowToNavigate.txt"
|
||||
///\brief Examples How To Navigate README page
|
||||
|
||||
/*! \page README_HowToNavigate How to navigate in the examples documentation
|
||||
|
||||
The examples documentation is composed from a <b> "global" documentation </b> including all examples with classes which has unique names (eg. A01DetectorConstruction etc.) and from <b> "standalone" documentations </b> for examples with classes which names are not not unique (DetectorConstruction etc.).
|
||||
|
||||
\section HowToNavigate_sec1 Global documentation
|
||||
|
||||
The lists of <a href="pages.html"> "Related Pages" </a> and <a href="modules.html"> "Modules"</a> in the global documentation include the README pages for all examples categories and examples with both unique class names and generic ones. The lists <a href="namespaces.html"> "Namespaces" </a>, <a href="classes.html"> "Classes" </a> and <a href="files.html"> "Files" </a> include only the examples with unique class names.
|
||||
|
||||
That's why the README pages for the examples with a standalone documentation generated in the global documentation do not contain links to their classes
|
||||
(one cannot click on a class name here to get the class documentation). See eg. \ref ExampleTestEm1.
|
||||
|
||||
\section HowToNavigate_sec2 Standalone documentations
|
||||
|
||||
The links from "global" documentation to the examples "standalone" documentation are available in the list of <a href="modules.html"> "Modules"</a>. When selecting eg. "TestEm1" here, you will be directed to <a href="../html_TestEm1/html/index.html"> the main page </a> of its standalone documentation. When selecting then <a href="../html_TestEm1/html/ExampleTestEm1.html"> "Example TestEm1" </a> from the <a href="../html_TestEm1/html/pages.html"> "Related Pages" </a> list here (there is only one page in the list) you will get the example documentation with hyperlinks to the classes etc.
|
||||
|
||||
All the lists in the examples "standalone" documentation include only the concerned example and eventually the classes shared with another examples or the classes from <a href="Examples_common.html"> common </a> if they are used in the example.
|
||||
|
||||
This organization was necessary as Doxygen does not support the classes with the same names in one system.
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,26 @@
|
||||
// $Id: .README 66536 2012-12-19 14:32:36Z ihrivnac $
|
||||
|
||||
///\file ".README.novice.txt"
|
||||
///\brief Geant4 Old Novice Examples README page
|
||||
|
||||
/*! \page README_novice Old Novice Examples
|
||||
|
||||
The old "novice" set of examples is now replaced with a new "basic" set,
|
||||
covering the most typical use-cases of a Geant4 application with keeping
|
||||
simplicity and ease of use.
|
||||
|
||||
The source code of the last version of the novice examples set
|
||||
(in 9.6.p02 release) can be viewed in
|
||||
<a href="http://www-geant4.kek.jp/lxr/source/examples/novice/?v=9.6.p2">
|
||||
the Geant4 LXR code browser </a>
|
||||
|
||||
The new location of each example in 10.0 release:
|
||||
- N01 - removed
|
||||
- N02 - \link ExampleB2 basic/B2 \endlink
|
||||
- N03 - \link ExampleB4 basic/B4 \endlink
|
||||
- N04 - \link ExampleRE05 extended/runAndEvent/RE05 \endlink
|
||||
- N05 - \link ExamplePar01 extended/parameterisations/Par01 \endlink
|
||||
- N06 - \link ExampleOpNovice extended/optical/OpNovice \endlink
|
||||
- N07 - \link ExampleRE06 extended/runAndEvent/RE06 \endlink
|
||||
|
||||
*/
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,53 @@
|
||||
// $Id$
|
||||
|
||||
/// \file Doxymain.h
|
||||
/// \brief The main page for Geant4 Examples code documenation
|
||||
|
||||
/*! \mainpage Geant4 Examples
|
||||
|
||||
This module collects four sets of user examples aimed to demonstrate to
|
||||
the user how to make correct use of the GEANT4 toolkit by implementing
|
||||
in a correct way those user-classes which the user is supposed to
|
||||
customize in order to define his/her own simulation setup.
|
||||
|
||||
The <b>"basic"</b> set of examples is oriented to novice users and covering
|
||||
the most typical use-cases of a Geant4 application with keeping simplicity
|
||||
and ease of use.
|
||||
|
||||
An <b>"extended"</b> set of examples may require some additional libraries besides
|
||||
of Geant4. This set covers many specific use cases for actual detector
|
||||
simulation.
|
||||
|
||||
An <b>"advanced"</b> set of examples covers the use-cases typical of a
|
||||
"toolkit"-oriented kind of development, where real complete applications
|
||||
for different simulation studies are provided; may require additional third
|
||||
party products to be built.
|
||||
|
||||
Most of the examples can be run both in interactive and batch mode, and
|
||||
input macro files (*.in) and reference output files (*.out) are provided.
|
||||
Basic and most of the extended examples are considered part of the
|
||||
system testing suite for validation of the official releases of the
|
||||
GEANT4 toolkit. Basic and some of the extended and advanced
|
||||
examples are also used as "acceptance"-tests for the release process.
|
||||
|
||||
See more on each examples category pages:
|
||||
- \ref README_basic
|
||||
- \ref README_extended
|
||||
- <a href="https://twiki.cern.ch/twiki/bin/view/Geant4/AdvancedExamples">
|
||||
<b>Advanced Examples </b></a>
|
||||
|
||||
The previous set of examples oriented to novice users, <b>"novice"</b>,
|
||||
has been refactored in "basic" and "extended" examples sets in Geant4 10.0.
|
||||
The information about the original set of these examples can be found at
|
||||
\link README_novice this page \endlink.
|
||||
|
||||
And more on what is common for all examples:
|
||||
- \ref README_HowToRun
|
||||
- \ref README_HowToRunMT
|
||||
- \ref README_HowToNavigate
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
// $Id$
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_analysis.h
|
||||
/// \brief The page that defines the extended/analysis examples modules
|
||||
|
||||
|
||||
/** @defgroup extended_analysis analysis
|
||||
* Extended examples analysis classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_analysis_AnaEx01 AnaEx01
|
||||
* Analysis AnaEx01 example has its
|
||||
* <a href="../html_AnaEx01/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_analysis
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_analysis_AnaEx02 AnaEx02
|
||||
* Analysis AnaEx02 example has its
|
||||
* <a href="../html_AnaEx02/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_analysis
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_analysis_AnaEx03 AnaEx03
|
||||
* Analysis AnaEx03 example has its
|
||||
* <a href="../html_AnaEx03/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_analysis
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_analysis_B1Con B1Con
|
||||
* Analysis example B1Con
|
||||
* @ingroup extended_analysis
|
||||
* @{
|
||||
*/
|
||||
|
||||
class B1ConActionInitialization{};
|
||||
class B1ConRunAction{};
|
||||
class B1ConRun{};
|
||||
class B1DetectorConstruction{};
|
||||
class B1EventAction{};
|
||||
class B1PrimaryGeneratorAction{};
|
||||
class B1Run{};
|
||||
class B1SteppingAction{};
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
/** @} */
|
||||
@@ -0,0 +1,209 @@
|
||||
// $Id$
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_basic.h
|
||||
/// \brief The page that defines the basic examples modules
|
||||
|
||||
|
||||
/** @defgroup basic basic
|
||||
* Basic examples classes
|
||||
* @{
|
||||
*/
|
||||
/** @} */
|
||||
|
||||
/** @defgroup B1 B1
|
||||
* Example B1
|
||||
* @ingroup basic
|
||||
* @{
|
||||
*/
|
||||
|
||||
class B1ActionInitialization{};
|
||||
class B1DetectorConstruction{};
|
||||
class B1EventAction{};
|
||||
class B1PrimaryGeneratorAction{};
|
||||
class B1Run{};
|
||||
class B1RunAction{};
|
||||
class B1SteppingAction{};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup B2 B2
|
||||
* Example B2
|
||||
* @ingroup basic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup B2a B2a
|
||||
* Example B2a
|
||||
* @ingroup B2
|
||||
* @{
|
||||
*/
|
||||
|
||||
class B2ActionInitialization{};
|
||||
class B2aDetectorConstruction{};
|
||||
class B2aDetectorMessenger{};
|
||||
class B2EventAction{};
|
||||
class B2PrimaryGeneratorAction{};
|
||||
class B2RunAction{};
|
||||
class B2TrackerHit{};
|
||||
class B2TrackerSD{};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup B2b B2b
|
||||
* Example B2b
|
||||
* @ingroup B2
|
||||
* @{
|
||||
*/
|
||||
|
||||
class B2ActionInitialization{};
|
||||
class B2bChamberParameterisation{};
|
||||
class B2bDetectorConstruction{};
|
||||
class B2bDetectorMessenger{};
|
||||
class B2EventAction{};
|
||||
class B2PrimaryGeneratorAction{};
|
||||
class B2RunAction{};
|
||||
class B2TrackerHit{};
|
||||
class B2TrackerSD{};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup B3 B3
|
||||
* Example B3
|
||||
* @ingroup basic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup B3a B3a
|
||||
* Example B3a
|
||||
* @ingroup B3
|
||||
* @{
|
||||
*/
|
||||
|
||||
class B3aActionInitialization{};
|
||||
class B3aEventAction{};
|
||||
class B3aRunAction{};
|
||||
class B3DetectorConstruction{};
|
||||
class B3PhysicsList{};
|
||||
class B3PrimaryGeneratorAction{};
|
||||
class B3StackingAction{};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup B3b B3b
|
||||
* Example B3b
|
||||
* @ingroup B3
|
||||
* @{
|
||||
*/
|
||||
|
||||
class B3bActionInitialization{};
|
||||
class B3bRun{};
|
||||
class B3bRunAction{};
|
||||
class B3DetectorConstruction{};
|
||||
class B3PhysicsList{};
|
||||
class B3PrimaryGeneratorAction{};
|
||||
class B3StackingAction{};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup B4 B4
|
||||
* Example B4
|
||||
* @ingroup basic
|
||||
* @{
|
||||
*/
|
||||
/** @} */
|
||||
|
||||
/** @defgroup B4a B4a
|
||||
* Example B4a
|
||||
* @ingroup B4
|
||||
* @{
|
||||
*/
|
||||
|
||||
class B4aActionInitialization{};
|
||||
class B4aEventAction{};
|
||||
class B4aSteppingAction{};
|
||||
class B4DetectorConstruction{};
|
||||
class B4PrimaryGeneratorAction{};
|
||||
class B4RunAction{};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
/** @defgroup B4b B4b
|
||||
* Example B4b
|
||||
* @ingroup B4
|
||||
* @{
|
||||
*/
|
||||
|
||||
class B4bActionInitialization{};
|
||||
class B4bEventAction{};
|
||||
class B4bRunAction{};
|
||||
class B4bRunData{};
|
||||
class B4bSteppingAction{};
|
||||
class B4DetectorConstruction{};
|
||||
class B4PrimaryGeneratorAction{};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup B4c B4c
|
||||
* Example B4c
|
||||
* @ingroup B4
|
||||
* @{
|
||||
*/
|
||||
|
||||
class B4cActionInitialization{};
|
||||
class B4cCalorHit{};
|
||||
class B4cCalorimeterSD{};
|
||||
class B4cDetectorConstruction{};
|
||||
class B4cEventAction{};
|
||||
class B4PrimaryGeneratorAction{};
|
||||
class B4RunAction{};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
/** @defgroup B4d B4d
|
||||
* Example B4d
|
||||
* @ingroup B4
|
||||
* @{
|
||||
*/
|
||||
|
||||
class B4dActionInitialization{};
|
||||
class B4dDetectorConstruction{};
|
||||
class B4dEventAction{};
|
||||
class B4PrimaryGeneratorAction{};
|
||||
class B4RunAction{};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup B5 B5
|
||||
* Example B5
|
||||
* @ingroup basic
|
||||
* @{
|
||||
*/
|
||||
|
||||
class B5ActionInitialization{};
|
||||
class B5CellParameterisation{};
|
||||
class B5DetectorConstruction{};
|
||||
class B5DriftChamberHit{};
|
||||
class B5DriftChamberSD{};
|
||||
class B5EmCalorimeterHit{};
|
||||
class B5EmCalorimeterSD{};
|
||||
class B5EventAction{};
|
||||
class B5HadCalorimeterHit{};
|
||||
class B5HadCalorimeterSD{};
|
||||
class B5HodoscopeHit{};
|
||||
class B5HodoscopeSD{};
|
||||
class B5MagneticField{};
|
||||
class B5PrimaryGeneratorAction{};
|
||||
class B5RunAction{};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
@@ -0,0 +1,169 @@
|
||||
// $Id$
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_biasing.h
|
||||
/// \brief The page that defines the extended/biasing examples modules
|
||||
|
||||
|
||||
/** @defgroup extended_biasing biasing
|
||||
* Extended examples biasing classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_biasing_B01 B01
|
||||
* Biasing example B01
|
||||
* @ingroup extended_biasing
|
||||
* @{
|
||||
*/
|
||||
|
||||
class B01ActionInitialization {};
|
||||
class B01DetectorConstruction {};
|
||||
class B01PrimaryGeneratorAction {};
|
||||
class B01RunAction {};
|
||||
class B01Run {};
|
||||
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_biasing_B02 B02
|
||||
* Biasing example B02
|
||||
* @ingroup extended_biasing
|
||||
* @{
|
||||
*/
|
||||
|
||||
class B02ActionInitialization {};
|
||||
class B02DetectorConstruction {};
|
||||
class B02ImportanceDetectorConstruction {};
|
||||
class B02PrimaryGeneratorAction {};
|
||||
class B02PVolumeStore {};
|
||||
class B02RunAction {};
|
||||
class B02Run {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_biasing_B03 B03
|
||||
* Biasing example B03
|
||||
* @ingroup extended_biasing
|
||||
* @{
|
||||
*/
|
||||
|
||||
class B03ActionInitialization {};
|
||||
class B03DetectorConstruction {};
|
||||
class B03ImportanceDetectorConstruction {};
|
||||
class B03PhysicsList {};
|
||||
class B03PrimaryGeneratorAction {};
|
||||
class B03PVolumeStore {};
|
||||
class B03RunAction {};
|
||||
class B03Run {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_biasing_GB01 GB01
|
||||
* Biasing example GB01
|
||||
* @ingroup extended_biasing
|
||||
* @{
|
||||
*/
|
||||
|
||||
class GB01ActionInitialization {};
|
||||
class GB01BOptrChangeCrossSection {};
|
||||
class GB01BOptrMultiParticleChangeCrossSection {};
|
||||
class GB01DetectorConstruction {};
|
||||
class GB01PrimaryGeneratorAction {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_biasing_GB02 GB02
|
||||
* Biasing example GB02
|
||||
* @ingroup extended_biasing
|
||||
* @{
|
||||
*/
|
||||
|
||||
class GB02ActionInitialization {};
|
||||
class GB02BOptrMultiParticleForceCollision {};
|
||||
class GB02DetectorConstruction {};
|
||||
class GB02PrimaryGeneratorAction {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_biasing_GB03 GB03
|
||||
* Biasing example GB03
|
||||
* @ingroup extended_biasing
|
||||
* @{
|
||||
*/
|
||||
|
||||
class GB03ActionInitialization {};
|
||||
class GB03BOptnSplitOrKillOnBoundary{};
|
||||
class GB03BOptrGeometryBasedBiasing{};
|
||||
class GB03DetectorConstruction {};
|
||||
class GB03DetectorMessenger{};
|
||||
class GB03PrimaryGeneratorAction {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_biasing_GB04 GB04
|
||||
* Biasing example GB04
|
||||
* @ingroup extended_biasing
|
||||
* @{
|
||||
*/
|
||||
|
||||
class GB04ActionInitialization {};
|
||||
class GB04BOptnBremSplitting {};
|
||||
class GB04BOptrBremSplitting {};
|
||||
class GB04DetectorConstruction {};
|
||||
class GB04PrimaryGeneratorAction {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_biasing_GB05 GB05
|
||||
* Biasing example GB05
|
||||
* @ingroup extended_biasing
|
||||
* @{
|
||||
*/
|
||||
|
||||
class GB05ActionInitialization {};
|
||||
class GB05BOptnSplitAndKillByCrossSection {};
|
||||
class GB05BOptrSplitAndKillByCrossSection {};
|
||||
class GB05DetectorConstruction {};
|
||||
class GB05PrimaryGeneratorAction {};
|
||||
class GB05SD {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_biasing_GB06 GB06
|
||||
* Biasing example GB06
|
||||
* @ingroup extended_biasing
|
||||
* @{
|
||||
*/
|
||||
|
||||
class GB06ActionInitialization {};
|
||||
class GB06BOptnSplitAndKillByImportance {};
|
||||
class GB06BOptrSplitAndKillByImportance {};
|
||||
class GB06DetectorConstruction {};
|
||||
class GB06ParallelWorldForSlices {};
|
||||
class GB06PrimaryGeneratorAction {};
|
||||
class GB06SD {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_biasing_ReverseMC01 ReverseMC01
|
||||
* Biasing example ReverseMC01
|
||||
* @ingroup extended_biasing
|
||||
* @{
|
||||
*/
|
||||
|
||||
class G4AdjointPhysicsList {};
|
||||
class G4AdjointPhysicsMessenger {};
|
||||
class RMC01AdjointEventAction {};
|
||||
class RMC01AnalysisManager {};
|
||||
class RMC01AnalysisManagerMessenger {};
|
||||
class RMC01DetectorConstruction {};
|
||||
class RMC01DetectorMessenger {};
|
||||
class RMC01DoubleWithWeightHit {};
|
||||
class RMC01EventAction {};
|
||||
class RMC01PrimaryGeneratorAction {};
|
||||
class RMC01RunAction {};
|
||||
class RMC01SD {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
@@ -0,0 +1,25 @@
|
||||
// $Id$
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_common.h
|
||||
/// \brief The page that defines the extended/common classes modules
|
||||
|
||||
|
||||
/** @defgroup extended_common common
|
||||
* Extended examples common classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
class ExG4DetectorConstruction01{};
|
||||
class ExG4DetectorConstruction01Messenger{};
|
||||
class ExG4DetectorConstruction02{};
|
||||
class ExG4DetectorConstruction02Messenger{};
|
||||
class ExG4EventAction01{};
|
||||
class ExG4EventAction01Messenger{};
|
||||
class ExG4PhysicsList00{};
|
||||
class ExG4PrimaryGeneratorAction01{};
|
||||
class ExG4PrimaryGeneratorAction02{};
|
||||
class ExG4RunAction01{};
|
||||
class ExG4RunAction01Messenger{};
|
||||
|
||||
/** @} */
|
||||
@@ -0,0 +1,185 @@
|
||||
// $Id$
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_electromagnetic.h
|
||||
/// \brief The page that defines the extended/electromagnetic examples modules
|
||||
|
||||
|
||||
/** @defgroup extended_electromagnetic electromagnetic
|
||||
* Extended examples electromagnetic classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_electromagnetic_TestEm0 TestEm0
|
||||
* The TestEm0 electromagnetic classes have their
|
||||
* <a href="../html_TestEm0/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_electromagnetic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_electromagnetic_TestEm1 TestEm1
|
||||
* The TestEm1 electromagnetic classes have their
|
||||
* <a href="../html_TestEm1/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_electromagnetic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_electromagnetic_TestEm2 TestEm2
|
||||
* The TestEm2 electromagnetic classes have their
|
||||
* <a href="../html_TestEm2/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_electromagnetic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_electromagnetic_TestEm3 TestEm3
|
||||
* The TestEm3 electromagnetic classes have their
|
||||
* <a href="../html_TestEm3/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_electromagnetic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_electromagnetic_TestEm4 TestEm4
|
||||
* The TestEm4 electromagnetic classes have their
|
||||
* <a href="../html_TestEm4/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_electromagnetic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_electromagnetic_TestEm5 TestEm5
|
||||
* The TestEm5 electromagnetic classes have their
|
||||
* <a href="../html_TestEm5/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_electromagnetic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_electromagnetic_TestEm6 TestEm6
|
||||
* The TestEm6 electromagnetic classes have their
|
||||
* <a href="../html_TestEm6/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_electromagnetic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_electromagnetic_TestEm7 TestEm7
|
||||
* The TestEm7 electromagnetic classes have their
|
||||
* <a href="../html_TestEm7/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_electromagnetic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_electromagnetic_TestEm8 TestEm8
|
||||
* The TestEm8 electromagnetic classes have their
|
||||
* <a href="../html_TestEm8/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_electromagnetic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_electromagnetic_TestEm9 TestEm9
|
||||
* The TestEm9 electromagnetic classes have their
|
||||
* <a href="../html_TestEm9/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_electromagnetic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_electromagnetic_TestEm10 TestEm10
|
||||
* The TestEm10 electromagnetic classes have their
|
||||
* <a href="../html_TestEm10/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_electromagnetic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_electromagnetic_TestEm11 TestEm11
|
||||
* The TestEm11 electromagnetic classes have their
|
||||
* <a href="../html_TestEm11/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_electromagnetic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_electromagnetic_TestEm12 TestEm12
|
||||
* The TestEm12 electromagnetic classes have their
|
||||
* <a href="../html_TestEm12/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_electromagnetic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_electromagnetic_TestEm13 TestEm13
|
||||
* The TestEm13 electromagnetic classes have their
|
||||
* <a href="../html_TestEm13/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_electromagnetic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_electromagnetic_TestEm14 TestEm14
|
||||
* The TestEm14 electromagnetic classes have their
|
||||
* <a href="../html_TestEm14/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_electromagnetic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_electromagnetic_TestEm15 TestEm15
|
||||
* The TestEm15 electromagnetic classes have their
|
||||
* <a href="../html_TestEm15/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_electromagnetic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_electromagnetic_TestEm16 TestEm16
|
||||
* The TestEm16 electromagnetic classes have their
|
||||
* <a href="../html_TestEm16/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_electromagnetic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_electromagnetic_TestEm17 TestEm17
|
||||
* The TestEm17 electromagnetic classes have their
|
||||
* <a href="../html_TestEm17/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_electromagnetic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_electromagnetic_TestEm18 TestEm18
|
||||
* The TestEm18 electromagnetic classes have their
|
||||
* <a href="../html_TestEm18/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_electromagnetic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
/** @} */
|
||||
@@ -0,0 +1,18 @@
|
||||
// $Id$
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_errorpropagation.h
|
||||
/// \brief The page that defines the extended/errorpropagation examples modules
|
||||
|
||||
|
||||
/** @defgroup extended_errorpropagation errorpropagation
|
||||
* Errorpropagation example
|
||||
* @ingroup extended
|
||||
* @{
|
||||
*/
|
||||
|
||||
class ExErrorDetectorConstruction {};
|
||||
class ExErrorDetectorMessenger {};
|
||||
class ExErrorMagneticField {};
|
||||
|
||||
/** @} */
|
||||
@@ -0,0 +1,131 @@
|
||||
// $Id$
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_eventgenerator.h
|
||||
/// \brief The page that defines the extended/eventgenerator examples modules
|
||||
|
||||
|
||||
/** @defgroup extended_eventgenerator eventgenerator
|
||||
* Extended examples eventgenerator classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_eventgenerator_exgps exgps
|
||||
* Eventgenerator example exgps has its
|
||||
* <a href="../html_exgps/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_eventgenerator
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_eventgenerator_HepMC HepMC
|
||||
* Extended examples eventgenerator/HepMC
|
||||
* @ingroup extended_eventgenerator
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/** @defgroup extended_eventgenerator_HepMC_HepMCEx01 HepMCEx01
|
||||
* Eventgenerator HepMC example HepMCEx01
|
||||
* @ingroup extended_eventgenerator_HepMC
|
||||
* @{
|
||||
*/
|
||||
|
||||
class ExN04CalorimeterHit {};
|
||||
class ExN04CalorimeterParametrisation {};
|
||||
class ExN04CalorimeterROGeometry {};
|
||||
class ExN04CalorimeterSD {};
|
||||
class ExN04DetectorConstruction {};
|
||||
class ExN04DetectorParameterDef {};
|
||||
class ExN04DummySD {};
|
||||
class ExN04EventAction {};
|
||||
class ExN04Field {};
|
||||
class ExN04MuonHit {};
|
||||
class ExN04MuonSD {};
|
||||
class ExN04PrimaryGeneratorAction {};
|
||||
class ExN04PrimaryGeneratorMessenger {};
|
||||
class ExN04RunAction {};
|
||||
class ExN04StackingAction {};
|
||||
class ExN04StackingActionMessenger {};
|
||||
class ExN04SteppingAction {};
|
||||
class ExN04SteppingVerbose {};
|
||||
class ExN04TrackerHit {};
|
||||
class ExN04TrackerParametrisation {};
|
||||
class ExN04TrackerSD {};
|
||||
class ExN04TrackingAction {};
|
||||
class HepMCG4AsciiReader {};
|
||||
class HepMCG4AsciiReaderMessenger {};
|
||||
class HepMCG4Interface {};
|
||||
class HepMCG4PythiaInterface {};
|
||||
class HepMCG4PythiaMessenger {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_eventgenerator_HepMC_HepMCEx02 HepMCEx02
|
||||
* Eventgenerator HepMC example HepMCEx02
|
||||
* @ingroup extended_eventgenerator_HepMC
|
||||
* @{
|
||||
*/
|
||||
|
||||
class H02DetectorConstruction {};
|
||||
class H02EventAction {};
|
||||
class H02Field {};
|
||||
class H02MuonHit {};
|
||||
class H02MuonSD {};
|
||||
class H02PrimaryGeneratorAction {};
|
||||
class H02PrimaryGeneratorMessenger {};
|
||||
class H02SteppingAction {};
|
||||
class HepMCG4AsciiReader {};
|
||||
class HepMCG4AsciiReaderMessenger {};
|
||||
class HepMCG4Interface {};
|
||||
class HepMCG4PythiaInterface {};
|
||||
class HepMCG4PythiaMessenger {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_eventgenerator_HepMC_MCTruth MCTruth
|
||||
* Eventgenerator example MCTruth has its
|
||||
* <a href="../html_MCTruth/html/index.html"> standalone documentation </a>
|
||||
* @ingroup extended_eventgenerator
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_eventgenerator_particleGun particleGun
|
||||
* Eventgenerator example particleGun has its
|
||||
* <a href="../html_particleGun/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_eventgenerator
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_eventgenerator_pythia_decayer6 pythia_decayer6
|
||||
* Eventgenerator example pythia_decayer6
|
||||
* @ingroup extended_eventgenerator
|
||||
* @{
|
||||
*/
|
||||
|
||||
enum EDecayType {};
|
||||
class G4Pythia6Decayer {};
|
||||
class G4Pythia6DecayerMessenger {};
|
||||
class P6DExtDecayerPhysics {};
|
||||
class P6DPhysicsList {};
|
||||
class Pythia6 {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_eventgenerator_userPrimaryGenerator userPrimaryGenerator
|
||||
* Eventgenerator example userPrimaryGenerator has its
|
||||
* <a href="../html_userPrimaryGenerator/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_eventgenerator
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
@@ -0,0 +1,71 @@
|
||||
// $Id$
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_exoticphysics.h
|
||||
/// \brief The page that defines the extended/exoticphysics examples modules
|
||||
|
||||
|
||||
/** @defgroup extended_exoticphysics exoticphysics
|
||||
* Extended examples eventgenerator classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_exoticphysics_channeling channeling
|
||||
* Exotic physics example channeling has its
|
||||
* <a href="../html_channeling/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_exoticphysics
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_exoticphysics_monopole monopole
|
||||
* Exoticphysics monopole example has its
|
||||
* <a href="../html_monopole/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_exoticphysics
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_exoticphysics_dmparticle dmparticle
|
||||
* Exoticphysics dmparticle example has its
|
||||
* <a href="../html_dmparticle/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_exoticphysics
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_exoticphysics_ucn ucn
|
||||
* Exotic physics example ucn
|
||||
* @ingroup extended_exoticphysics
|
||||
* @{
|
||||
*/
|
||||
|
||||
class ExUCNActionInitialization {};
|
||||
class ExUCNDetectorConstruction {};
|
||||
class ExUCNExtraPhysics {};
|
||||
class ExUCNPhysicsList {};
|
||||
class ExUCNPrimaryGeneratorAction {};
|
||||
class ExUCNRunAction {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_exoticphysics_phonon phonon
|
||||
* Exotic physics example phonon
|
||||
* @ingroup extended_exoticphysics
|
||||
* @{
|
||||
*/
|
||||
|
||||
class XActionInitialization {};
|
||||
class XAluminumElectrodeHit {};
|
||||
class XAluminumElectrodeSensitivity {};
|
||||
class XDetectorConstruction {};
|
||||
class XPhononStackingAction {};
|
||||
class XPhysicsList {};
|
||||
class XPrimaryGeneratorAction {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
@@ -0,0 +1,157 @@
|
||||
// $Id$
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_field.h
|
||||
/// \brief The page that defines the extended/field examples modules
|
||||
|
||||
|
||||
/** @defgroup extended_field field
|
||||
* Extended examples field classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_field_BlineTracer BlineTracer
|
||||
* Field example BlineTracer
|
||||
* @ingroup extended_field
|
||||
* @{
|
||||
*/
|
||||
|
||||
class G4BlineEquation {};
|
||||
class G4BlineEventAction {};
|
||||
class G4BlinePrimaryGeneratorAction {};
|
||||
class G4BlineSteppingAction {};
|
||||
class G4BlineTracer {};
|
||||
class G4BlineTracerMessenger {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_field_field01 field01
|
||||
* Field example field01
|
||||
* @{
|
||||
*/
|
||||
|
||||
class F01ActionInitialization {};
|
||||
class F01CalorHit {};
|
||||
class F01CalorimeterSD {};
|
||||
class F01DetectorConstruction {};
|
||||
class F01DetectorMessenger {};
|
||||
class F01EventAction {};
|
||||
class F01EventActionMessenger {};
|
||||
class F01FieldMessenger {};
|
||||
class F01FieldSetup {};
|
||||
class F01PrimaryGeneratorAction {};
|
||||
class F01PrimaryGeneratorMessenger {};
|
||||
class F01RunAction {};
|
||||
class F01RunMessenger {};
|
||||
class F01SteppingVerbose {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_field_field02 field02
|
||||
* Field example field02
|
||||
* @{
|
||||
*/
|
||||
|
||||
class F02ActionInitialization {};
|
||||
class F02CalorHit {};
|
||||
class F02CalorimeterSD {};
|
||||
class F02DetectorConstruction {};
|
||||
class F02DetectorMessenger {};
|
||||
class F02ElectricFieldSetup {};
|
||||
class F02EventAction {};
|
||||
class F02EventActionMessenger {};
|
||||
class F02FieldMessenger {};
|
||||
class F02PrimaryGeneratorAction {};
|
||||
class F02PrimaryGeneratorMessenger {};
|
||||
class F02RunAction {};
|
||||
class F02RunMessenger {};
|
||||
class F02SteppingVerbose {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_field_field03 field03
|
||||
* Field example field03
|
||||
* @{
|
||||
*/
|
||||
|
||||
class F03ActionInitialization {};
|
||||
class F03CalorHit {};
|
||||
class F03CalorimeterSD {};
|
||||
class F03DetectorConstruction {};
|
||||
class F03DetectorMessenger {};
|
||||
class F03EventAction {};
|
||||
class F03EventActionMessenger {};
|
||||
class F03FieldMessenger {};
|
||||
class F03FieldSetup {};
|
||||
class F03PrimaryGeneratorAction {};
|
||||
class F03PrimaryGeneratorMessenger {};
|
||||
class F03RunAction {};
|
||||
class F03RunMessenger {};
|
||||
class F03SteppingVerbose {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_field_field04 field04
|
||||
* Field example field04
|
||||
* @{
|
||||
*/
|
||||
|
||||
class F04ActionInitialization {};
|
||||
class F04DetectorConstruction {};
|
||||
class F04DetectorMessenger {};
|
||||
class F04ElementField {};
|
||||
class F04EventAction {};
|
||||
class F04EventActionMessenger {};
|
||||
class F04ExtraPhysics {};
|
||||
class F04FieldMessenger {};
|
||||
class F04FocusSolenoid {};
|
||||
class F04GlobalField {};
|
||||
class F04Materials {};
|
||||
class F04OpticalPhysics {};
|
||||
class F04PhysicsList {};
|
||||
class F04PhysicsListMessenger {};
|
||||
class F04PrimaryGeneratorAction {};
|
||||
class F04PrimaryGeneratorMessenger {};
|
||||
class F04RunAction {};
|
||||
class F04RunActionMessenger {};
|
||||
class F04SimpleSolenoid {};
|
||||
class F04StackingAction {};
|
||||
class F04StepMax {};
|
||||
class F04SteppingAction {};
|
||||
class F04SteppingActionMessenger {};
|
||||
class F04SteppingVerbose {};
|
||||
class F04TrackingAction {};
|
||||
class F04Trajectory {};
|
||||
class F04TrajectoryPoint {};
|
||||
class F04UserTrackInformation {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_field_field05 field05
|
||||
* Field example field05
|
||||
* @{
|
||||
*/
|
||||
|
||||
class F05ActionInitialization {};
|
||||
class F05DetectorConstruction {};
|
||||
class F05Field {};
|
||||
class F05PhysicsList {};
|
||||
class F05PrimaryGeneratorAction {};
|
||||
class F05SteppingAction {};
|
||||
class F05SteppingVerbose {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_field_field06 field06
|
||||
* Field example field06
|
||||
* @{
|
||||
*/
|
||||
|
||||
class F06ActionInitialization {};
|
||||
class F06DetectorConstruction {};
|
||||
class F06PhysicsList {};
|
||||
class F06PrimaryGeneratorAction {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
@@ -0,0 +1,23 @@
|
||||
// $Id$
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_g3tog4.h
|
||||
/// \brief The page that defines the extended/g3tog4 examples modules
|
||||
|
||||
|
||||
/** @defgroup extended_g3tog4 g3tog4
|
||||
* Extended examples g3tog4 classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_g3tog4_clGeometry clGeometry
|
||||
* g3tog4 example clGeometry
|
||||
* @{
|
||||
*/
|
||||
|
||||
class G3toG4ActionInitialization {};
|
||||
class G3toG4DetectorConstruction {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
@@ -0,0 +1,21 @@
|
||||
// $Id$
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_geometry.h
|
||||
/// \brief The page that defines the extended/geometry examples modules
|
||||
|
||||
|
||||
/** @defgroup extended_geometry geometry
|
||||
* Extended examples geometry classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_geometry_transforms transforms
|
||||
* Geometry example transforms has its
|
||||
* <a href="../html_transforms/html/index.html">standalone documentation </a>
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
@@ -0,0 +1,103 @@
|
||||
// $Id$
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_hadronic.h
|
||||
/// \brief The page that defines the extended/hadronic examples modules
|
||||
|
||||
|
||||
/** @defgroup extended_hadronic hadronic
|
||||
* Extended examples hadronic classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_hadronic_Hadr00 Hadr00
|
||||
* The Hadr00 hadronic classes have their
|
||||
* <a href="../html_Hadr00/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_hadronic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_hadronic_Hadr01 Hadr01
|
||||
* The Hadr01 hadronic classes have their
|
||||
* <a href="../html_Hadr01/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_hadronic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_hadronic_Hadr02 Hadr02
|
||||
* The Hadr02 hadronic classes have their
|
||||
* <a href="../html_Hadr02/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_hadronic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_hadronic_Hadr03 Hadr03
|
||||
* The Hadr03 hadronic classes have their
|
||||
* <a href="../html_Hadr03/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_hadronic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_hadronic_Hadr04 Hadr04
|
||||
* The Hadr04 hadronic classes have their
|
||||
* <a href="../html_Hadr04/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_hadronic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_hadronic_Hadr05 Hadr05
|
||||
* The Hadr05 hadronic classes have their
|
||||
* <a href="../html_Hadr05/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_hadronic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_hadronic_Hadr06 Hadr06
|
||||
* The Hadr06 hadronic classes have their
|
||||
* <a href="../html_Hadr06/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_hadronic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_hadronic_Hadr07 Hadr07
|
||||
* The Hadr07 hadronic classes have their
|
||||
* <a href="../html_Hadr05/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_hadronic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_hadronic_FissionFragment FissionFragment
|
||||
* Hadronic example FissionFragment
|
||||
* @ingroup extended_hadronic
|
||||
* @{
|
||||
*/
|
||||
|
||||
class FFActionInitialization {};
|
||||
class FFDetectorConstruction {};
|
||||
class FFPrimaryGeneratorAction {};
|
||||
class FFRunAction {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_hadronic_NeutronSource NeutronSource
|
||||
* The NeutronSource hadronic classes have their
|
||||
* <a href="../html_NeutronSource/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_hadronic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
@@ -0,0 +1,261 @@
|
||||
// $Id$
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_medical.h
|
||||
/// \brief The page that defines the extended/medical examples modules
|
||||
|
||||
|
||||
/** @defgroup extended_medical medical
|
||||
* Extended medical examples classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_medical_DICOM DICOM
|
||||
* Medical example DICOM
|
||||
* @ingroup extended_medical
|
||||
* @{
|
||||
*/
|
||||
|
||||
class DicomActionInitialization {};
|
||||
class DicomDetectorConstruction {};
|
||||
class DicomEventAction {};
|
||||
class DicomHandler {};
|
||||
class DicomIntersectVolume {};
|
||||
class DicomNestedParamDetectorConstruction {};
|
||||
class DicomNestedPhantomParameterisation {};
|
||||
class DicomPartialDetectorConstruction {};
|
||||
class DicomPhantomParameterisationColour {};
|
||||
class DicomPhantomZSliceHeader {};
|
||||
class DicomPhantomZSliceMerged {};
|
||||
class DicomPrimaryGeneratorAction {};
|
||||
class DicomRegularDetectorConstruction {};
|
||||
class DicomRunAction {};
|
||||
class DicomRun {};
|
||||
|
||||
/** @defgroup extended_medical_DICOM_dicomReader dicomReader
|
||||
* dicomReader in medical example DICOM
|
||||
* @ingroup extended_medical_DICOM
|
||||
* @{
|
||||
*/
|
||||
|
||||
class DicomBeam {};
|
||||
class DicomBeamBlock {};
|
||||
class DicomBeamCompensator {};
|
||||
class DicomBeamControlPoint {};
|
||||
class DicomBeamDevice {};
|
||||
class DicomBeamDevicePos {};
|
||||
class DicomBeamDeviceRef {};
|
||||
class DicomBeamWedge {};
|
||||
class DicomFileCT {};
|
||||
class DicomFileCT_NOdcmrt {};
|
||||
class DicomFileMgr {};
|
||||
class DicomFilePET {};
|
||||
class DicomFilePlan {};
|
||||
class DicomFileStructure {};
|
||||
class DicomROI {};
|
||||
class DicomROIContour {};
|
||||
class DicomVBeamDevice {};
|
||||
class DicomVFile {};
|
||||
class DicomVFileImage {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_electronScattering electronScattering
|
||||
* Medical electronScattering example has its
|
||||
* <a href="../html_electronScattering/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_medical
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_electronScattering2 electronScattering2
|
||||
* Medical electronScattering2 example has its
|
||||
* <a href="../html_electronScattering2/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_medical
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_fanoCavity fanoCavity
|
||||
* Medical fanoCavity example has its
|
||||
* <a href="../html_fanoCavity/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_medical
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_fanoCavity2 fanoCavity2
|
||||
* Medical fanoCavity2 example has its
|
||||
* <a href="../html_fanoCavity2/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_medical
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_GammaTherapy GammaTherapy
|
||||
* Medical GammaTherapy example has its
|
||||
* <a href="../html_GammaTherapy/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_medical
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_dna dna
|
||||
* Extended examples medical dna classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_medical_dna_chem1 chem1
|
||||
* Medical dna chem1 example has its
|
||||
* <a href="../html_chem1/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_medical_dna
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_dna_chem2 chem2
|
||||
* Medical dna chem2 example has its
|
||||
* <a href="../html_chem2/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_medical_dna
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_dna_chem3 chem3
|
||||
* Medical dna chem3 example has its
|
||||
* <a href="../html_chem3/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_medical_dna
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_dna_chem4 chem4
|
||||
* Medical dna chem4 example has its
|
||||
* <a href="../html_chem4/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_medical_dna
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_dna_clustering clustering
|
||||
* Medical dna chem4 example has its
|
||||
* <a href="../html_clustering/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_medical_dna
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_dna_dnaphysics dnaphysics
|
||||
* Medical dna dnaphysics example has its
|
||||
* <a href="../html_dnaphysics/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_medical_dna
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_dna_icsd icsd
|
||||
* Medical dna icsd example has its
|
||||
* <a href="../html_icsd/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_medical_dna
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_dna_microdosimetry microdosimetry
|
||||
* Medical dna microdosimetry example has its
|
||||
* <a href="../html_microdosimetry/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_medical_dna
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_dna_microyz microyz
|
||||
* Medical dna microyz example has its
|
||||
* <a href="../html_microyz/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_medical_dna
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_dna_pdb4dna pdb4dna
|
||||
* Medical dna pdb4dna example has its
|
||||
* <a href="../html_pdb4dna/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_medical_dna
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_dna_range range
|
||||
* Medical dna range example has its
|
||||
* <a href="../html_range/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_medical_dna
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_dna_slowing slowing
|
||||
* Medical dna slowing example has its
|
||||
* <a href="../html_slowing/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_medical_dna
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_dna_spower spower
|
||||
* Medical dna spower example has its
|
||||
* <a href="../html_spower/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_medical_dna
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_dna_svalue svalue
|
||||
* Medical dna svalue example has its
|
||||
* <a href="../html_svalue/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_medical_dna
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_dna_wholeNuclearDNA wholeNuclearDNA
|
||||
* Medical dna wholeNuclearDNA example has its
|
||||
* <a href="../html_wholeNuclearDNA/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_medical_dna
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_dna_wvalue wvalue
|
||||
* Medical dna wvalue example has its
|
||||
* <a href="../html_wvalue/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_medical_dna
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
@@ -0,0 +1,70 @@
|
||||
// $Id$
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_new.h
|
||||
/// \brief The page that defines the extended/new examples modules
|
||||
|
||||
|
||||
/** @defgroup extended_new new
|
||||
* New extended examples classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_new_decay decay
|
||||
* The extended/decay classes
|
||||
* @ingroup extended_new
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_new_decay_pythia6Decayer pythia6Decayer
|
||||
* The Example pythia6Decayer classes
|
||||
* @ingroup extended_new_decay
|
||||
* @{
|
||||
*/
|
||||
|
||||
class G4Pythia6Decayer{};
|
||||
class G4Pythia6DecayerMessenger{};
|
||||
class P6DExtDecayerPhysics{};
|
||||
class P6DPhysicsList{};
|
||||
class Pythia6{};
|
||||
|
||||
/** @} */
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_new_geometry geometry
|
||||
* The extended/geometry classes
|
||||
* @ingroup extended_new
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_new_geometry_transform transform
|
||||
* The Example transform classes
|
||||
* @ingroup extended_new_geometry
|
||||
* @{
|
||||
*/
|
||||
|
||||
class TrDetectorConstruction{};
|
||||
class TrDetectorConstructionMessenger{};
|
||||
|
||||
/** @} */
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_new_materials materials
|
||||
* The extended/materials classes
|
||||
* @ingroup extended_new
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_new_materials_mat01 mat01
|
||||
* The Example mat01 classes
|
||||
* @ingroup extended_new_materials
|
||||
* @{
|
||||
*/
|
||||
|
||||
class Mat01DetectorConstruction{};
|
||||
|
||||
/** @} */
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
// $Id$
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_optical.h
|
||||
/// \brief The page that defines the extended/optical examples modules
|
||||
|
||||
|
||||
/** @defgroup extended_optical optical
|
||||
* Extended optical examples classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_optical_OpNovice OpNovice
|
||||
* Optical example OpNovice
|
||||
* @ingroup extended_optical
|
||||
* @{
|
||||
*/
|
||||
|
||||
class OpNoviceActionInitialization {};
|
||||
class OpNoviceDetectorConstruction {};
|
||||
class OpNovicePhysicsList {};
|
||||
class OpNovicePhysicsListMessenger {};
|
||||
class OpNovicePrimaryGeneratorAction {};
|
||||
class OpNovicePrimaryGeneratorMessenger {};
|
||||
class OpNoviceRunAction {};
|
||||
class OpNoviceStackingAction {};
|
||||
class OpNoviceSteppingAction {};
|
||||
class OpNoviceSteppingVerbose {};
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
/** @defgroup extended_optical_LXe LXe
|
||||
* Optical example LXe
|
||||
* @ingroup extended_optical
|
||||
* @{
|
||||
*/
|
||||
|
||||
class LXeActionInitialization {};
|
||||
class LXeDetectorConstruction {};
|
||||
class LXeDetectorMessenger {};
|
||||
class LXeEMPhysics {};
|
||||
class LXeEventAction {};
|
||||
class LXeEventMessenger {};
|
||||
class LXeGeneralPhysics {};
|
||||
class LXeMainVolume {};
|
||||
class LXeMuonPhysics {};
|
||||
class LXePMTHit {};
|
||||
class LXePMTSD {};
|
||||
class LXePhysicsList {};
|
||||
class LXePrimaryGeneratorAction {};
|
||||
class LXeRecorderBase {};
|
||||
class LXeRunAction {};
|
||||
class LXeScintHit {};
|
||||
class LXeScintSD {};
|
||||
class LXeStackingAction {};
|
||||
class LXeSteppingAction {};
|
||||
class LXeSteppingMessenger {};
|
||||
class LXeSteppingVerbose {};
|
||||
class LXeTrackingAction {};
|
||||
class LXeTrajectory {};
|
||||
class LXeUserEventInformation {};
|
||||
class LXeUserTrackInformation {};
|
||||
class LXeWLSFiber {};
|
||||
class LXeWLSSlab {};
|
||||
class RecorderBase {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_optical_wls wls
|
||||
* Optical example wls
|
||||
* @ingroup extended_optical
|
||||
* @{
|
||||
*/
|
||||
|
||||
class WLSActionInitialization {};
|
||||
class WLSDetectorConstruction {};
|
||||
class WLSDetectorMessenger {};
|
||||
class WLSEventAction {};
|
||||
class WLSEventActionMessenger {};
|
||||
class WLSExtraPhysics {};
|
||||
class WLSMaterials {};
|
||||
class WLSOpticalPhysics {};
|
||||
class WLSPhotonDetHit {};
|
||||
class WLSPhotonDetSD {};
|
||||
class WLSPhysicsList {};
|
||||
class WLSPhysicsListMessenger {};
|
||||
class WLSPrimaryGeneratorAction {};
|
||||
class WLSPrimaryGeneratorMessenger {};
|
||||
class WLSRunAction {};
|
||||
class WLSRunActionMessenger {};
|
||||
class WLSStackingAction {};
|
||||
class WLSStepMax {};
|
||||
class WLSSteppingAction {};
|
||||
class WLSSteppingActionMessenger {};
|
||||
class WLSSteppingVerbose {};
|
||||
class WLSTrackingAction {};
|
||||
class WLSTrajectory {};
|
||||
class WLSTrajectoryPoint {};
|
||||
class WLSUserTrackInformation {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
@@ -0,0 +1,148 @@
|
||||
// $Id$
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_parallel.h
|
||||
/// \brief The page that defines the extended/parallel examples modules
|
||||
|
||||
|
||||
/** @defgroup extended_parallel parallel
|
||||
* Extended examples parallel classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/** @defgroup extended_parallel_MPI MPI
|
||||
* Extended examples parallel MPI classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/** @defgroup extended_parallel_MPI_exMPI01 exMPI01
|
||||
* Parallel MPI exMPI01 example has its
|
||||
* <a href="../html_exMPI01/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_parallel_MPI
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_parallel_MPI_exMPI02 exMPI02
|
||||
* Parallel MPI exMPI02 example has its
|
||||
* <a href="../html_exMPI02/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_parallel_MPI
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_parallel_MPI_exMPI03 exMPI03
|
||||
* Parallel MPI exMPI03 example has its
|
||||
* <a href="../html_exMPI03/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_parallel_MPI
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_parallel_MPI_libG4mpi libG4mpi
|
||||
* Library libG4mpi
|
||||
* @ingroup extended_parallel_MPI
|
||||
* @{
|
||||
*/
|
||||
|
||||
class G4MPIbatch {};
|
||||
class G4MPIhistoMerger {};
|
||||
class G4MPImanager {};
|
||||
class G4MPImessenger {};
|
||||
class G4MPIrandomSeedGenerator {};
|
||||
class G4MPIrunMerger {};
|
||||
class G4MPIscorerMerger {};
|
||||
class G4MPIsession {};
|
||||
class G4MPIstatus {};
|
||||
class G4MPIutils {};
|
||||
class G4UImpish {};
|
||||
class G4VMPIseedGenerator {};
|
||||
class G4VMPIsession {};
|
||||
class G4VUserMPIrunMerger {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_parallel_TBB TBB
|
||||
* Extended examples parallel TBB classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_parallel_TBB_B2b TBB B2b
|
||||
* Example TBB B2b
|
||||
* @ingroup extended_parallel_TBB
|
||||
* @{
|
||||
*/
|
||||
|
||||
class B2ActionInitialization {};
|
||||
class B2bChamberParameterisation {};
|
||||
class B2bDetectorConstruction {};
|
||||
class B2bDetectorMessenger {};
|
||||
class B2EventAction {};
|
||||
class B2PrimaryGeneratorAction {};
|
||||
class B2RunAction {};
|
||||
class B2TrackerHit {};
|
||||
class B2TrackerSD {};
|
||||
class tbbMasterRunManager {};
|
||||
class tbbTask {};
|
||||
class tbbUserWorkerInitialization {};
|
||||
class tbbWorkerRunManager {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_parallel_TopC TopC
|
||||
* Extended examples parallel TopC classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/** @defgroup extended_parallel_ParN02 ParN02
|
||||
* Parallel ParN02 example has its
|
||||
* <a href="../html_ParN02/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_parallel_TopC
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_parallel_ParN04 ParN04
|
||||
* Parallel ParN04 example has its
|
||||
* <a href="../html_ParN04/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_parallel_TopC
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_parallel_ThreadsafeScorers ThreadsafeScorers
|
||||
* Example ThreadsafeScorers
|
||||
* @ingroup extended_parallel
|
||||
* @{
|
||||
*/
|
||||
|
||||
class G4TAtomicHitsCollection {};
|
||||
class G4TAtomicHitsMap {};
|
||||
class G4atomic {};
|
||||
class G4atomic_defines {};
|
||||
class TSActionInitialization {};
|
||||
class TSDetectorConstruction {};
|
||||
class TSPhysicsList {};
|
||||
class TSPrimaryGeneratorAction {};
|
||||
class TSRun {};
|
||||
class TSRunAction {};
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
|
||||
/** @} */
|
||||
@@ -0,0 +1,72 @@
|
||||
// $Id$
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_parameterisations.h
|
||||
/// \brief The page that defines the extended/parameterisations examples modules
|
||||
|
||||
|
||||
/** @defgroup extended_parameterisations parameterisations
|
||||
* Extended examples parameterisations classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_parameterisations_Par01 Par01
|
||||
* parameterisations example Par01
|
||||
* @{
|
||||
*/
|
||||
|
||||
class Par01ActionInitialization {};
|
||||
class Par01CalorimeterHit {};
|
||||
class Par01CalorimeterSD {};
|
||||
class Par01DetectorConstruction {};
|
||||
class Par01EMShowerModel {};
|
||||
class Par01EnergySpot {};
|
||||
class Par01ParallelWorldForPion {};
|
||||
class Par01PiModel {};
|
||||
class Par01PionShowerModel {};
|
||||
class Par01PrimaryGeneratorAction {};
|
||||
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_parameterisations_Par02 Par02
|
||||
* parameterisations example Par02
|
||||
* @{
|
||||
*/
|
||||
|
||||
class Par02ActionInitialization {};
|
||||
class Par02DetectorConstruction {};
|
||||
class Par02DetectorParametrisation {};
|
||||
class Par02EventAction {};
|
||||
class Par02EventInformation {};
|
||||
class Par02FastSimModelEMCal {};
|
||||
class Par02FastSimModelHCal {};
|
||||
class Par02FastSimModelTracker {};
|
||||
class Par02Output {};
|
||||
class Par02PhysicsList {};
|
||||
class Par02PrimaryGeneratorAction {};
|
||||
class Par02PrimaryParticleInformation {};
|
||||
class Par02RunAction {};
|
||||
class Par02Smearer {};
|
||||
class Par02TrackingAction {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_parameterisations_gflash gflash
|
||||
* parameterisations example gflash
|
||||
* @{
|
||||
*/
|
||||
|
||||
class ExGflashActionInitialization {};
|
||||
class ExGflashDetectorConstruction {};
|
||||
class ExGflashEventAction {};
|
||||
class ExGflashHit {};
|
||||
class ExGflashHitsCollection {};
|
||||
class ExGflashPhysics {};
|
||||
class ExGflashPrimaryGeneratorAction {};
|
||||
class ExGflashRunAction {};
|
||||
class ExGflashSensitiveDetector {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
@@ -0,0 +1,131 @@
|
||||
// $Id$
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_persistency.h
|
||||
/// \brief The page that defines the extended/persistency examples modules
|
||||
|
||||
|
||||
/** @defgroup extended_persistency persistency
|
||||
* Extended examples persistency classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_persistency_gdml gdml
|
||||
* Extended examples persistency gdml classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_persistency_gdml_G01 G01
|
||||
* Persistency gdml example G01
|
||||
* @ingroup extended_persistency_gdml
|
||||
* @{
|
||||
*/
|
||||
|
||||
class G01DetectorConstruction {};
|
||||
class G01PrimaryGeneratorAction {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_persistency_gdml_G02 G02
|
||||
* Persistency gdml example G02
|
||||
* @ingroup extended_persistency_gdml
|
||||
* @{
|
||||
*/
|
||||
|
||||
class G02ChamberParameterisation {};
|
||||
class G02DetectorConstruction {};
|
||||
class G02DetectorMessenger {};
|
||||
class G02PrimaryGeneratorAction {};
|
||||
class G02RunAction {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_persistency_gdml_G03 G03
|
||||
* Persistency gdml example G03
|
||||
* @ingroup extended_persistency_gdml
|
||||
* @{
|
||||
*/
|
||||
|
||||
class G03ColorReader {};
|
||||
class G03ColorWriter {};
|
||||
class G03DetectorConstruction {};
|
||||
class G03DetectorMessenger {};
|
||||
class G03PrimaryGeneratorAction {};
|
||||
class G03RunAction {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_persistency_gdml_G04 G04
|
||||
* Persistency gdml example G04
|
||||
* @ingroup extended_persistency_gdml
|
||||
* @{
|
||||
*/
|
||||
|
||||
class G04DetectorConstruction {};
|
||||
class G04PrimaryGeneratorAction {};
|
||||
class G04SensitiveDetector {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
/** @defgroup extended_persistency_P01 P01
|
||||
* Persistency example P01
|
||||
* @ingroup extended_persistency
|
||||
* @{
|
||||
*/
|
||||
|
||||
class ExP01ChamberParameterisation {};
|
||||
class ExP01Classes {};
|
||||
class ExP01DetectorConstruction {};
|
||||
class ExP01DetectorMessenger {};
|
||||
class ExP01EventAction {};
|
||||
class ExP01MagneticField {};
|
||||
class ExP01PrimaryGeneratorAction {};
|
||||
class ExP01RunAction {};
|
||||
class ExP01SteppingAction {};
|
||||
class ExP01SteppingVerbose {};
|
||||
class ExP01TrackerHit {};
|
||||
class ExP01TrackerSD {};
|
||||
class RootIO {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_persistency_P02 P02
|
||||
* Persistency example P02
|
||||
* @ingroup extended_persistency
|
||||
* @{
|
||||
*/
|
||||
|
||||
class ExP02Classes {};
|
||||
class ExP02DetConstrReader {};
|
||||
class ExP02DetectorConstruction {};
|
||||
class ExP02GeoTree {};
|
||||
class ExP02PrimaryGeneratorAction {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_persistency_P03 P03
|
||||
* Persistency example P03
|
||||
* @ingroup extended_persistency
|
||||
* @{
|
||||
*/
|
||||
|
||||
class ExTGActionInitialization {};
|
||||
class ExTGDetectorConstruction {};
|
||||
class ExTGDetectorConstructionWithCpp {};
|
||||
class ExTGDetectorConstructionWithCuts {};
|
||||
class ExTGDetectorConstructionWithSD {};
|
||||
class ExTGPrimaryGeneratorAction {};
|
||||
class ExTGRCDetectorBuilder {};
|
||||
class ExTGRCLineProcessor {};
|
||||
class ExTGRCRegionCutsMgr {};
|
||||
class ExTGRCRegionData {};
|
||||
class ExTGRunAction {};
|
||||
class ExTGTrackerHit {};
|
||||
class ExTGTrackerSD {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
@@ -0,0 +1,22 @@
|
||||
// $Id$
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_polarisation.h
|
||||
/// \brief The page that defines the extended/polarisation examples modules
|
||||
|
||||
|
||||
/** @defgroup extended_polarisation polarisation
|
||||
* Extended examples eventgenerator classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_polarisation_Pol01 Pol01
|
||||
* polarisation Pol01 example has its
|
||||
* <a href="../html_Pol01/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_polarisation
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
@@ -0,0 +1,40 @@
|
||||
// $Id$
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_radioactivedecay.h
|
||||
/// \brief The page that defines the extended/radioactivedecay examples modules
|
||||
|
||||
|
||||
/** @defgroup extended_radioactivedecay radioactivedecay
|
||||
* Extended examples eventgenerator classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_radioactivedecay_Activation Activation
|
||||
* radioactivedecay Activation example has its
|
||||
* <a href="../html_Activation/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_radioactivedecay
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_radioactivedecay_rdecay01 rdecay01
|
||||
* radioactivedecay rdecay01 example has its
|
||||
* <a href="../html_rdecay01/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_radioactivedecay
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_radioactivedecay_rdecay02 rdecay02
|
||||
* radioactivedecay rdecay02 example has its
|
||||
* <a href="../html_rdecay02/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_radioactivedecay
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
@@ -0,0 +1,149 @@
|
||||
// $Id$
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_runAndEvent.h
|
||||
/// \brief The page that defines the extended/runAndEvent examples modules
|
||||
|
||||
|
||||
/** @defgroup extended_runAndEvent runAndEvent
|
||||
* Extended runAndEvent examples classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_runAndEvent_RE01 RE01
|
||||
* RunAndEvent example RE01
|
||||
* @ingroup extended_runAndEvent
|
||||
* @{
|
||||
*/
|
||||
|
||||
class RE01ActionInitialization {};
|
||||
class RE01CalorimeterHit {};
|
||||
class RE01CalorimeterParametrisation {};
|
||||
class RE01CalorimeterROGeometry {};
|
||||
class RE01CalorimeterSD {};
|
||||
class RE01DetectorConstruction {};
|
||||
class RE01DetectorParameterDef {};
|
||||
class RE01EventAction {};
|
||||
class RE01Field {};
|
||||
class RE01PrimaryGeneratorAction {};
|
||||
class RE01PrimaryGeneratorMessenger {};
|
||||
class RE01RegionInformation {};
|
||||
class RE01RunAction {};
|
||||
class RE01StackingAction {};
|
||||
class RE01SteppingAction {};
|
||||
class RE01TrackerHit {};
|
||||
class RE01TrackerParametrisation {};
|
||||
class RE01TrackerSD {};
|
||||
class RE01TrackInformation {};
|
||||
class RE01TrackingAction {};
|
||||
class RE01Trajectory {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_runAndEvent_RE02 RE02
|
||||
* RunAndEvent example RE02
|
||||
* @ingroup extended_runAndEvent
|
||||
* @{
|
||||
*/
|
||||
|
||||
class RE02ActionInitialization {};
|
||||
class RE02DetectorConstruction {};
|
||||
class RE02EventAction {};
|
||||
class RE02NestedPhantomParameterisation {};
|
||||
class RE02PSCellFlux {};
|
||||
class RE02PSEnergyDeposit {};
|
||||
class RE02PSFlatSurfaceCurrent {};
|
||||
class RE02PSFlatSurfaceFlux {};
|
||||
class RE02PSNofStep {};
|
||||
class RE02PSPassageCellFlux {};
|
||||
class RE02PrimaryGeneratorAction {};
|
||||
class RE02RunAction {};
|
||||
class RE02Run {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_runAndEvent_RE03 RE03
|
||||
* RunAndEvent example RE03
|
||||
* @ingroup extended_runAndEvent
|
||||
* @{
|
||||
*/
|
||||
|
||||
class RE03ActionInitialization {};
|
||||
class RE03DetectorConstruction {};
|
||||
class RE03PrimaryGeneratorAction {};
|
||||
class RE03UserScoreWriter {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_runAndEvent_RE04 RE04
|
||||
* RunAndEvent example RE04
|
||||
* @ingroup extended_runAndEvent
|
||||
* @{
|
||||
*/
|
||||
|
||||
class RE04ActionInitialization {};
|
||||
class RE04DetectorConstruction {};
|
||||
class RE04EventAction {};
|
||||
class RE04ParallelWorldConstruction {};
|
||||
class RE04ParallelWorldParam {};
|
||||
class RE04PrimaryGeneratorAction {};
|
||||
class RE04SteppingAction {};
|
||||
class RE04TrackingAction {};
|
||||
class RE04Trajectory {};
|
||||
class RE04TrajectoryPoint {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_runAndEvent_RE05 RE05
|
||||
* RunAndEvent example RE05
|
||||
* @ingroup extended_runAndEvent
|
||||
* @{
|
||||
*/
|
||||
|
||||
class RE05ActionInitialization {};
|
||||
class RE05CalorimeterHit {};
|
||||
class RE05CalorimeterParametrisation {};
|
||||
class RE05CalorimeterROGeometry {};
|
||||
class RE05CalorimeterSD {};
|
||||
class RE05DetectorConstruction {};
|
||||
class RE05DetectorParameterDef {};
|
||||
class RE05DummySD {};
|
||||
class RE05EventAction {};
|
||||
class RE05Field {};
|
||||
class RE05MuonHit {};
|
||||
class RE05MuonSD {};
|
||||
class RE05PrimaryGeneratorAction {};
|
||||
class RE05PrimaryGeneratorMessenger {};
|
||||
class RE05RunAction {};
|
||||
class RE05StackingAction {};
|
||||
class RE05StackingActionMessenger {};
|
||||
class RE05SteppingAction {};
|
||||
class RE05SteppingVerbose {};
|
||||
class RE05TrackerHit {};
|
||||
class RE05TrackerParametrisation {};
|
||||
class RE05TrackerSD {};
|
||||
class RE05TrackingAction {};
|
||||
class RE05WorkerInitialization {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_runAndEvent_RE06 RE06
|
||||
* RunAndEvent example RE06
|
||||
* @ingroup extended_runAndEvent
|
||||
* @{
|
||||
*/
|
||||
|
||||
class RE06ActionInitialization {};
|
||||
class RE06DetectorConstruction {};
|
||||
class RE06DetectorMessenger {};
|
||||
class RE06ParallelWorld {};
|
||||
class RE06PhysicsList {};
|
||||
class RE06PrimaryGeneratorAction {};
|
||||
class RE06RunAction {};
|
||||
class RE06Run {};
|
||||
class RE06SteppingVerbose {};
|
||||
class RE06WorkerInitialization {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
@@ -0,0 +1,44 @@
|
||||
// $Id$
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_visualization.h
|
||||
/// \brief The page that defines the extended/visualization examples modules
|
||||
|
||||
|
||||
/** @defgroup extended_visualization visualization
|
||||
* Extended visualization examples classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_visualization_perspective perspective
|
||||
* Visualization example perspective
|
||||
* @ingroup extended_visualization
|
||||
* @{
|
||||
*/
|
||||
|
||||
class PerspectiveVisAction {};
|
||||
class PerspectiveVisActionMessenger {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_visualization_standalone standalone
|
||||
* Visualization example standalone
|
||||
* @ingroup extended_visualization
|
||||
* @{
|
||||
*/
|
||||
|
||||
class StandaloneVisAction {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_visualization_userVisAction userVisAction
|
||||
* visualization example userVisAction
|
||||
* @ingroup extended_visualization
|
||||
* @{
|
||||
*/
|
||||
|
||||
class UVA_VisAction {};
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
@@ -0,0 +1,83 @@
|
||||
$Id$
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
|
||||
Configuration files for Examples Doxygen documentation
|
||||
----------------------------------------------------------
|
||||
|
||||
|
||||
This file should be used by the G4 example coordinator to briefly
|
||||
summarize all major modifications introduced in the code and keep
|
||||
track of all tags.
|
||||
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
13/06/17 I.Hrivnacova (doxygen-V10-03-00)
|
||||
- Added new extended examples exoticphysics/dmparticle,
|
||||
medical/dna/icsd, slowing, spower and radioactivedecay/Activation
|
||||
- Updated lists of classes in Doxymodules_* files
|
||||
|
||||
24/11/16 I.Hrivnacova (doxygen-V10-02-03)
|
||||
- Added new examples extended/medical/dna/clustering,range
|
||||
|
||||
14/11/16 I.Hrivnacova (doxygen-V10-02-02)
|
||||
- Updated Doxymodules_medical.h for new dicomReader
|
||||
|
||||
28/09/16 I.Hrivnacova (doxygen-V10-02-01)
|
||||
- Added new examples:
|
||||
extended/hadronic/NeutronSource
|
||||
extended/medical/dna/chem4
|
||||
|
||||
05/07/16 I.Hrivnacova (doxygen-V10-02-00)
|
||||
- Updated configuration files (suppressed warnings from files present in more examples)
|
||||
- Added new example hadronic/Hadr07
|
||||
|
||||
27/11/15 I.Hrivnacova (doxygen-V10-01-03)
|
||||
- Added extended/parallel/MPI/source classes in the documentation
|
||||
|
||||
23/11/15 I.Hrivnacova (doxygen-V10-01-02)
|
||||
- Updated configuration files for 10.2 release
|
||||
- Upgraded Doxyfiles to Doxygen 1.8.9.1
|
||||
|
||||
09/03/15 I.Hrivnacova (doxygen-V10-01-01)
|
||||
- Added new example extended/medical/dna/microyz
|
||||
|
||||
23/01/15 I.Hrivnacova (doxygen-V10-01-00)
|
||||
- Fixes in configuration files for 10.1 release
|
||||
|
||||
26/11/14 I.Hrivnacova (doxygen-V10-00-02)
|
||||
- Updated link to the advanced examples page which has been moved
|
||||
|
||||
12/11/14 I.Hrivnacova (doxygen-V10-00-01)
|
||||
- Updated configuration files for 10.1 release
|
||||
|
||||
06/06/14 P.Gumplinger (doxygen-V10-00-00)
|
||||
- Updated Doxyfile, Doxymodules_category.h adding new
|
||||
exoticphysics channeling and ucn examples
|
||||
|
||||
29/11/12 I.Hrivnacova (doxygen-V09-06-01)
|
||||
- Updated configuration files for 10.0 release
|
||||
|
||||
17/11/12 I.Hrivnacova (doxygen-V09-06-00)
|
||||
- Updated configuration files for 10.0 release
|
||||
|
||||
26/11/12 I.Hrivnacova (doxygen-V09-05-02)
|
||||
- Updated Doxyfile for removing .README.HowToRunTestEm1
|
||||
|
||||
26/11/12 I.Hrivnacova (doxygen-V09-05-01)
|
||||
- Completed extended examples
|
||||
|
||||
27/06/12 I.Hrivnacova (doxygen-V09-05-00)
|
||||
- First tag on Doxygen configuration files which now included
|
||||
extended examples in the generated documentation.
|
||||
See README file how to process to generate complete examples
|
||||
(basic & extended) documentation.
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
$Id:$
|
||||
|
||||
To generate Doxygen documentation for all examples:
|
||||
|
||||
1) Check in Doxyfile, Doxyfile_standalone the value of
|
||||
STRIP_FROM_PATH variable and adjust it if needed
|
||||
|
||||
2) Download geant4.tag file from:
|
||||
http://www-geant4.kek.jp/Reference/10.01/geant4.tag
|
||||
and update the version number in TAGFILES value
|
||||
in Doxyfile, Doxyfile_standalone
|
||||
|
||||
3) Generate documentation for all examples with unique class names
|
||||
(alltogether):
|
||||
doxygen >& doxygen.out
|
||||
|
||||
4) Generate documentation for examples with non-unique class names
|
||||
(a standalone documentation will be generated for each example)
|
||||
./generate_standalone.sh
|
||||
|
||||
To extract coding guildelines violations from Doxygen output
|
||||
(requires using patched Doxygen):
|
||||
|
||||
cat doxygen*.out | grep "### Geant4 guidelines violation: data member" >> data_members_violations.txt
|
||||
cat doxygen*.out | grep "### Geant4 guidelines violation: function member" >> function_members_violations.txt
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/* The standard CSS for doxygen 1.8.5 */
|
||||
/* Extension for Geant4 example documentation */
|
||||
|
||||
/* header style */
|
||||
#g4header {
|
||||
color: black;
|
||||
background-color: #CCCC99;
|
||||
border: 1px solid #999966;
|
||||
/* border: 10px solid white; */
|
||||
padding-top: .5em;
|
||||
padding-right: 1em;
|
||||
width: 100%;
|
||||
margin-bottom: .5em;
|
||||
-moz-border-radius: 15px;
|
||||
}
|
||||
|
||||
#g4header img {
|
||||
padding-left: 1em;
|
||||
background: #cccc99;
|
||||
}
|
||||
|
||||
#breadcrumb {
|
||||
color: #003366;
|
||||
background-color: #9999FF;
|
||||
border: 0;
|
||||
border-right: 1em solid white;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
/* overwrite default size of \section and \subsection titles: 150% */
|
||||
h1 {
|
||||
font-size: 130%;
|
||||
}
|
||||
h2 {
|
||||
font-size: 110%;
|
||||
}
|
||||
h3 {
|
||||
font-size: 100%;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<!-- HTML footer for doxygen 1.8.5-->
|
||||
<!-- Updated for Geant4 examples documentation-->
|
||||
<!-- start footer part -->
|
||||
<!--BEGIN GENERATE_TREEVIEW-->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
$navpath
|
||||
<li class="footer">$generatedby
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/></a> $doxygenversion </li>
|
||||
</ul>
|
||||
</div>
|
||||
<!--END GENERATE_TREEVIEW-->
|
||||
<!--BEGIN !GENERATE_TREEVIEW-->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
$generatedby  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/>
|
||||
</a> $doxygenversion
|
||||
</small></address>
|
||||
<!--END !GENERATE_TREEVIEW-->
|
||||
<hr>
|
||||
<a href="http://cern.ch/geant4/applications/index.shtml">Applications</a> |
|
||||
<a href="http://cern.ch/geant4/support/index.shtml">User Support</a> |
|
||||
<a href="http://cern.ch/geant4/results/index.shtml">Results & Publications</a> |
|
||||
<a href="http://cern.ch/geant4/collaboration/index.shtml">Collaboration</a> |
|
||||
<a href="http://cern.ch/geant4/sitemap.shtml">Site Map</a><br />
|
||||
<p></p>
|
||||
<script type="text/javascript">
|
||||
<!--//
|
||||
var zap_domain = "cern.ch"
|
||||
var zap_user = "Gunter.Folger"
|
||||
var zap_recipient = zap_user + "@" + zap_domain
|
||||
var zap_url = "mailto:" + zap_recipient +"?subject=Feedback&body=My feedback concerns the page at: " + " " + escape(top.parent.location.href)
|
||||
document.write('<a href="' + zap_url + '" target=>Contact Webmaster</a>')
|
||||
//-->
|
||||
</script>
|
||||
<br/><br/>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,62 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Script to generate standalone Doxygen documentation
|
||||
# for the examples with non unique class names.
|
||||
|
||||
CURDIR=`pwd`
|
||||
|
||||
BACK_PATH2="../../../.doxygen/doc"
|
||||
BACK_PATH3="../../../../.doxygen/doc"
|
||||
BACK_PATH4="../../../../../.doxygen/doc"
|
||||
|
||||
# generate documentation
|
||||
# {1} example directory
|
||||
# {2} relative path from the example to the doc directory
|
||||
generate() {
|
||||
echo "processing ${1}"
|
||||
cd ../extended/${1}
|
||||
EXAMPLE_NAME=${PWD##*/}
|
||||
# add directory if shared
|
||||
if [ "${EXAMPLE_NAME}" = "shared" ]; then
|
||||
cd ..
|
||||
DIR_NAME=${PWD##*/}
|
||||
EXAMPLE_NAME=${DIR_NAME}"_shared"
|
||||
cd shared
|
||||
fi
|
||||
# detect use of classes from shared
|
||||
ADD_SHARED=""
|
||||
if [ -f SharedFilesList.txt ]; then
|
||||
if [ "`grep SHARED_CLASSES_LIST SharedFilesList.txt`" = "SHARED_CLASSES_LIST" ]; then
|
||||
ADD_SHARED="../shared"
|
||||
fi
|
||||
fi
|
||||
# detect use of classes from common
|
||||
ADD_COMMON=""
|
||||
if [ -f SharedFilesList.txt ]; then
|
||||
if [ "`grep COMMON_CLASSES_LIST SharedFilesList.txt`" = "COMMON_CLASSES_LIST" ]; then
|
||||
ADD_COMMON="../../common ../../../common"
|
||||
fi
|
||||
fi
|
||||
#echo "Generating Doxyfile for example: ${EXAMPLE_NAME}"
|
||||
cat $CURDIR/Doxyfile_standalone | sed s/"EXAMPLE_NAME"/"${EXAMPLE_NAME}"/g | sed sY"BACK_PATH"Y"${2}"Yg | sed sY"ADD_SHARED"Y"${ADD_SHARED}"Yg | sed sY"ADD_COMMON"Y"${ADD_COMMON}"Yg > Doxyfile
|
||||
doxygen >& $CURDIR/doxygen_${EXAMPLE_NAME}.out
|
||||
rm Doxyfile
|
||||
cd $CURDIR
|
||||
}
|
||||
|
||||
# process examples in second level directory in extended
|
||||
for DIR in analysis/shared analysis/AnaEx01 analysis/AnaEx02 analysis/AnaEx03 electromagnetic/TestEm0 electromagnetic/TestEm1 electromagnetic/TestEm2 electromagnetic/TestEm3 electromagnetic/TestEm4 electromagnetic/TestEm5 electromagnetic/TestEm6 electromagnetic/TestEm7 electromagnetic/TestEm8 electromagnetic/TestEm9 electromagnetic/TestEm10 electromagnetic/TestEm11 electromagnetic/TestEm12 electromagnetic/TestEm13 electromagnetic/TestEm14 electromagnetic/TestEm15 electromagnetic/TestEm16 electromagnetic/TestEm17 electromagnetic/TestEm18 eventgenerator/particleGun eventgenerator/exgps eventgenerator/userPrimaryGenerator exoticphysics/channeling exoticphysics/dmparticle exoticphysics/monopole geometry/transforms hadronic/Hadr00 hadronic/Hadr01 hadronic/Hadr02 hadronic/Hadr03 hadronic/Hadr04 hadronic/Hadr05 hadronic/Hadr06 hadronic/Hadr07 hadronic/NeutronSource medical/electronScattering medical/electronScattering2 medical/fanoCavity medical/fanoCavity2 medical/GammaTherapy polarisation/Pol01 radioactivedecay/Activation radioactivedecay/rdecay01 radioactivedecay/rdecay02; do
|
||||
generate ${DIR} ${BACK_PATH2}
|
||||
done
|
||||
|
||||
# process examples in third level directory in extended
|
||||
for DIR in eventgenerator/HepMC/MCTruth parallel/TopC/ParN02 parallel/TopC/ParN04 medical/dna/chem1 medical/dna/chem2 medical/dna/chem3 medical/dna/chem4 medical/dna/clustering medical/dna/dnaphysics medical/dna/microdosimetry medical/dna/microyz medical/dna/pdb4dna medical/dna/range medical/dna/svalue medical/dna/wholeNuclearDNA medical/dna/wvalue; do
|
||||
generate ${DIR} ${BACK_PATH3}
|
||||
done
|
||||
|
||||
# process examples in fourth level directory in extended
|
||||
for DIR in parallel/MPI/examples/exMPI01 parallel/MPI/examples/exMPI02 parallel/MPI/examples/exMPI03; do
|
||||
generate ${DIR} ${BACK_PATH4}
|
||||
done
|
||||
|
||||
cd $CURDIR
|
||||
@@ -0,0 +1,67 @@
|
||||
<!-- HTML header for doxygen 1.8.5-->
|
||||
<!-- Updated for Geant4 examples documentation-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen $doxygenversion"/>
|
||||
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
|
||||
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
|
||||
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="$relpath^jquery.js"></script>
|
||||
<script type="text/javascript" src="$relpath^dynsections.js"></script>
|
||||
$treeview
|
||||
$search
|
||||
$mathjax
|
||||
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
|
||||
$extrastylesheet
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
|
||||
<!--BEGIN TITLEAREA-->
|
||||
<div id="titlearea">
|
||||
<div id="g4header">
|
||||
<table cellpadding="0" cellspacing="0" width="98%">
|
||||
<tr>
|
||||
<td><a href="index.shtml">
|
||||
<img alt="Geant4 Home" src="geanttiny.gif" width="164" height="40" /></a>
|
||||
</td>
|
||||
<td align="right" class="doNotPrint">
|
||||
<a href="http://cern.ch/geant4/support/download.shtml">Download</a>
|
||||
| <a href="http://hypernews.slac.stanford.edu/HyperNews/geant4/cindex">User
|
||||
Forum</a> | <a href="http://cern.ch/geant4/gallery/index.html">
|
||||
Gallery</a><br />
|
||||
<a href="http://cern.ch/geant4/collaboration/contacts.shtml">
|
||||
Contact Us</a><br />
|
||||
<form method="get" action="http://www.cern.ch/cgi-bin/directory-search.pl">
|
||||
<input type="hidden" value="No" name="SubSearch" />
|
||||
<input type="hidden" value="url:wwwinfo.cern.ch/asd/geant4/G4UsersDocuments/
|
||||
url:geant4.web.cern.ch/geant4/G4UsersDocuments/" name="AdditionalQuery" />
|
||||
<input type="hidden" value="searchbrowse.html" name="TemplateFile" />
|
||||
<input type="hidden" value="http://wwwinfo.cern.ch/asd/" name="Referer" />
|
||||
<input type="hidden" value="cern" name="qc" />
|
||||
<input type="hidden" value="cern" name="col" />
|
||||
<input size="35" name="qt" />
|
||||
<input type="submit" value="Search Geant4" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<table cellspacing="6" cellpadding="0" width="100%">
|
||||
<tr>
|
||||
<td id="breadcrumb" colspan="4">
|
||||
<!-- start bread crumb -->
|
||||
<a href="http://geant4.web.cern.ch/geant4/index.shtml">Home</a> >
|
||||
<a href="http://geant4.web.cern.ch/geant4/UserDocumentation/Doxygen/examples_doc/html/index.html">Examples</a>
|
||||
<!-- end bread crumb-->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--END TITLEAREA-->
|
||||
<!-- end header part -->
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,53 @@
|
||||
// $Id$
|
||||
|
||||
/// \file Doxymain.h
|
||||
/// \brief The main page for Geant4 Examples code documenation
|
||||
|
||||
/*! \mainpage Geant4 Examples
|
||||
|
||||
This module collects four sets of user examples aimed to demonstrate to
|
||||
the user how to make correct use of the GEANT4 toolkit by implementing
|
||||
in a correct way those user-classes which the user is supposed to
|
||||
customize in order to define his/her own simulation setup.
|
||||
|
||||
The <b>"basic"</b> set of examples is oriented to novice users and covering
|
||||
the most typical use-cases of a Geant4 application with keeping simplicity
|
||||
and ease of use.
|
||||
|
||||
An <b>"extended"</b> set of examples may require some additional libraries besides
|
||||
of Geant4. This set covers many specific use cases for actual detector
|
||||
simulation.
|
||||
|
||||
An <b>"advanced"</b> set of examples covers the use-cases typical of a
|
||||
"toolkit"-oriented kind of development, where real complete applications
|
||||
for different simulation studies are provided; may require additional third
|
||||
party products to be built.
|
||||
|
||||
Most of the examples can be run both in interactive and batch mode, and
|
||||
input macro files (*.in) and reference output files (*.out) are provided.
|
||||
Basic and most of the extended examples are considered part of the
|
||||
system testing suite for validation of the official releases of the
|
||||
GEANT4 toolkit. Basic and some of the extended and advanced
|
||||
examples are also used as "acceptance"-tests for the release process.
|
||||
|
||||
See more on each examples category pages:
|
||||
- \ref README_basic
|
||||
- \ref README_extended
|
||||
- <a href="https://twiki.cern.ch/twiki/bin/view/Geant4/AdvancedExamples">
|
||||
<b>Advanced Examples </b></a>
|
||||
|
||||
The previous set of examples oriented to novice users, <b>"novice"</b>,
|
||||
has been refactored in "basic" and "extended" examples sets in Geant4 10.0.
|
||||
The information about the original set of these examples can be found at
|
||||
\link README_novice this page \endlink.
|
||||
|
||||
And more on what is common for all examples:
|
||||
- \ref README_HowToRun
|
||||
- \ref README_HowToRunMT
|
||||
- \ref README_HowToNavigate
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
// $Id$
|
||||
|
||||
/// \file Doxymain.h
|
||||
/// \brief The main page for Geant4 Examples code documenation
|
||||
|
||||
/*! \mainpage Geant4 Examples
|
||||
|
||||
This module collects four sets of user examples aimed to demonstrate to
|
||||
the user how to make correct use of the GEANT4 toolkit by implementing
|
||||
in a correct way those user-classes which the user is supposed to
|
||||
customize in order to define his/her own simulation setup.
|
||||
|
||||
The <b>"basic"</b> set of examples is oriented to novice users and covering
|
||||
the most typical use-cases of a Geant4 application with keeping simplicity
|
||||
and ease of use.
|
||||
|
||||
An <b>"extended"</b> set of examples may require some additional libraries besides
|
||||
of Geant4. This set covers many specific use cases for actual detector
|
||||
simulation.
|
||||
|
||||
An <b>"advanced"</b> set of examples covers the use-cases typical of a
|
||||
"toolkit"-oriented kind of development, where real complete applications
|
||||
for different simulation studies are provided; may require additional third
|
||||
party products to be built.
|
||||
|
||||
Most of the examples can be run both in interactive and batch mode, and
|
||||
input macro files (*.in) and reference output files (*.out) are provided.
|
||||
Basic and most of the extended examples are considered part of the
|
||||
system testing suite for validation of the official releases of the
|
||||
GEANT4 toolkit. Basic and some of the extended and advanced
|
||||
examples are also used as "acceptance"-tests for the release process.
|
||||
|
||||
See more on each examples category pages:
|
||||
- \ref README_basic
|
||||
- \ref README_extended
|
||||
- <a href="https://twiki.cern.ch/twiki/bin/view/Geant4/AdvancedExamples">
|
||||
<b>Advanced Examples </b></a>
|
||||
|
||||
The previous set of examples oriented to novice users, <b>"novice"</b>,
|
||||
has been refactored in "basic" and "extended" examples sets in Geant4 10.0.
|
||||
The information about the original set of these examples can be found at
|
||||
\link README_novice this page \endlink.
|
||||
|
||||
And more on what is common for all examples:
|
||||
- \ref README_HowToRun
|
||||
- \ref README_HowToRunMT
|
||||
- \ref README_HowToNavigate
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
// $Id$
|
||||
|
||||
/// \file Doxymain.h
|
||||
/// \brief The main page for Geant4 Examples code documenation
|
||||
|
||||
/*! \mainpage Geant4 Examples
|
||||
|
||||
This module collects four sets of user examples aimed to demonstrate to
|
||||
the user how to make correct use of the GEANT4 toolkit by implementing
|
||||
in a correct way those user-classes which the user is supposed to
|
||||
customize in order to define his/her own simulation setup.
|
||||
|
||||
The <b>"basic"</b> set of examples is oriented to novice users and covering
|
||||
the most typical use-cases of a Geant4 application with keeping simplicity
|
||||
and ease of use.
|
||||
|
||||
An <b>"extended"</b> set of examples may require some additional libraries besides
|
||||
of Geant4. This set covers many specific use cases for actual detector
|
||||
simulation.
|
||||
|
||||
An <b>"advanced"</b> set of examples covers the use-cases typical of a
|
||||
"toolkit"-oriented kind of development, where real complete applications
|
||||
for different simulation studies are provided; may require additional third
|
||||
party products to be built.
|
||||
|
||||
Most of the examples can be run both in interactive and batch mode, and
|
||||
input macro files (*.in) and reference output files (*.out) are provided.
|
||||
Basic and most of the extended examples are considered part of the
|
||||
system testing suite for validation of the official releases of the
|
||||
GEANT4 toolkit. Basic and some of the extended and advanced
|
||||
examples are also used as "acceptance"-tests for the release process.
|
||||
|
||||
See more on each examples category pages:
|
||||
- \ref README_basic
|
||||
- \ref README_extended
|
||||
- <a href="https://twiki.cern.ch/twiki/bin/view/Geant4/AdvancedExamples">
|
||||
<b>Advanced Examples </b></a>
|
||||
|
||||
The previous set of examples oriented to novice users, <b>"novice"</b>,
|
||||
has been refactored in "basic" and "extended" examples sets in Geant4 10.0.
|
||||
The information about the original set of these examples can be found at
|
||||
\link README_novice this page \endlink.
|
||||
|
||||
And more on what is common for all examples:
|
||||
- \ref README_HowToRun
|
||||
- \ref README_HowToRunMT
|
||||
- \ref README_HowToNavigate
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
// $Id$
|
||||
|
||||
/// \file Doxymain.h
|
||||
/// \brief The main page for Geant4 Examples code documenation
|
||||
|
||||
/*! \mainpage Geant4 Examples
|
||||
|
||||
This module collects four sets of user examples aimed to demonstrate to
|
||||
the user how to make correct use of the GEANT4 toolkit by implementing
|
||||
in a correct way those user-classes which the user is supposed to
|
||||
customize in order to define his/her own simulation setup.
|
||||
|
||||
The <b>"basic"</b> set of examples is oriented to novice users and covering
|
||||
the most typical use-cases of a Geant4 application with keeping simplicity
|
||||
and ease of use.
|
||||
|
||||
An <b>"extended"</b> set of examples may require some additional libraries besides
|
||||
of Geant4. This set covers many specific use cases for actual detector
|
||||
simulation.
|
||||
|
||||
An <b>"advanced"</b> set of examples covers the use-cases typical of a
|
||||
"toolkit"-oriented kind of development, where real complete applications
|
||||
for different simulation studies are provided; may require additional third
|
||||
party products to be built.
|
||||
|
||||
Most of the examples can be run both in interactive and batch mode, and
|
||||
input macro files (*.in) and reference output files (*.out) are provided.
|
||||
Basic and most of the extended examples are considered part of the
|
||||
system testing suite for validation of the official releases of the
|
||||
GEANT4 toolkit. Basic and some of the extended and advanced
|
||||
examples are also used as "acceptance"-tests for the release process.
|
||||
|
||||
See more on each examples category pages:
|
||||
- \ref README_basic
|
||||
- \ref README_extended
|
||||
- <a href="https://twiki.cern.ch/twiki/bin/view/Geant4/AdvancedExamples">
|
||||
<b>Advanced Examples </b></a>
|
||||
|
||||
The previous set of examples oriented to novice users, <b>"novice"</b>,
|
||||
has been refactored in "basic" and "extended" examples sets in Geant4 10.0.
|
||||
The information about the original set of these examples can be found at
|
||||
\link README_novice this page \endlink.
|
||||
|
||||
And more on what is common for all examples:
|
||||
- \ref README_HowToRun
|
||||
- \ref README_HowToRunMT
|
||||
- \ref README_HowToNavigate
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user