Import Geant4 11.2.2 source tree
This commit is contained in:
@@ -1,19 +1,56 @@
|
||||
# Locate Pythia6 library
|
||||
# in a directory defined via PYTHIA6 environment variable
|
||||
#
|
||||
# Defines:
|
||||
# PYTHIA6_FOUND
|
||||
# PYTHIA6_LIBRARIES
|
||||
|
||||
find_library(PYTHIA6_LIBRARY NAMES Pythia6 pythia6-$ENV{PYTHIA6_VERSION}
|
||||
HINTS $ENV{PYTHIA6} $ENV{PYTHIA6}/lib)
|
||||
|
||||
set(PYTHIA6_LIBRARIES ${PYTHIA6_LIBRARY})
|
||||
#message(STATUS PYTHIA6_LIBRARIES ${PYTHIA6_LIBRARIES} )
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set PYTHIA6_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Pythia6 DEFAULT_MSG PYTHIA6_LIBRARIES)
|
||||
|
||||
mark_as_advanced(PYTHIA6_FOUND PYTHIA6_LIBRARIES)
|
||||
#[=======================================================================[.rst:
|
||||
FindPythia6
|
||||
---------
|
||||
|
||||
Find the Pythia6 event generator library.
|
||||
|
||||
Imported Targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module defines the following :prop_tgt:`IMPORTED` targets:
|
||||
|
||||
``Pythia6::Pythia6``
|
||||
The Pythia6 ``pythia6`` library, if found.
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module will set the following variables in your project:
|
||||
|
||||
``Pythia6_FOUND``
|
||||
true if the Pythia6 headers and libraries were found.
|
||||
|
||||
Hints
|
||||
^^^^^
|
||||
|
||||
A user may set ``Pythia6_ROOT`` to a Pythia6 installation root to tell this
|
||||
module where to look.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# WE DO NOT ALLOW USE OF THIS MODULE OUTSIDE GEANT4 AND EXAMPLES
|
||||
if(NOT PROJECT_NAME MATCHES "Geant4|HepMCEx0[1-2]|decayer6")
|
||||
message(FATAL_ERROR "This FindPythia6.cmake module is only supported for use in Geant4's HepMCEx0{1,2} "
|
||||
"and decayer6 extended examples. No support or extension of this module for use outside of these examples "
|
||||
"will be provided.")
|
||||
endif()
|
||||
|
||||
find_library(Pythia6_LIBRARY
|
||||
NAMES Pythia6 pythia6 pythia6-$ENV{PYTHIA6_VERSION}
|
||||
HINTS $ENV{PYTHIA6} $ENV{PYTHIA6}/lib $ENV{PYTHIA6}/lib64 ${Pythia6_ROOT}/lib ${Pythia6_ROOT}/lib64)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set Pythia6_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Pythia6 DEFAULT_MSG Pythia6_LIBRARY)
|
||||
|
||||
mark_as_advanced(Pythia6_LIBRARY)
|
||||
|
||||
if(Pythia6_FOUND)
|
||||
set(Pythia6_LIBRARIES ${Pythia6_LIBRARY})
|
||||
if(NOT TARGET Pythia6::Pythia6)
|
||||
add_library(Pythia6::Pythia6 UNKNOWN IMPORTED)
|
||||
set_target_properties(Pythia6::Pythia6 PROPERTIES
|
||||
IMPORTED_LOCATION ${Pythia6_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -1,24 +1,76 @@
|
||||
# Locate Pythia8 library
|
||||
# in a directory defined via PYTHIA8 environment variable
|
||||
#
|
||||
# Defines:
|
||||
# PYTHIA8_FOUND
|
||||
# PYTHIA8_LIBRARIES
|
||||
# PYTHIA8_INCLUDES
|
||||
|
||||
find_library(PYTHIA8_LIBRARY NAMES pythia8
|
||||
HINTS $ENV{PYTHIA8} $ENV{PYTHIA8}/lib)
|
||||
|
||||
set(PYTHIA8_LIBRARIES ${PYTHIA8_LIBRARY})
|
||||
#message(STATUS PYTHIA8_LIBRARIES ${PYTHIA8_LIBRARIES} )
|
||||
|
||||
find_path( PYTHIA8_INCLUDES Pythia8/Pythia.h
|
||||
HINTS $ENV{PYTHIA8} $ENV{PYTHIA8}/include $ENV{PYTHIA8}/include/Pythia8 )
|
||||
set(PYTHIA8_INCLUDES ${PYTHIA8_INCLUDES})
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set PYTHIA8_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Pythia8 DEFAULT_MSG PYTHIA8_LIBRARIES)
|
||||
|
||||
mark_as_advanced(PYTHIA8_FOUND PYTHIA8_LIBRARIES PYTHIA8_INCLUDES)
|
||||
#[=======================================================================[.rst:
|
||||
FindPythia8
|
||||
---------
|
||||
|
||||
Find the Pythia8 event generator headers and library.
|
||||
|
||||
Imported Targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module defines the following :prop_tgt:`IMPORTED` targets:
|
||||
|
||||
``Pythia8::Pythia8``
|
||||
The Pythia8 ``pythia8`` library, if found.
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module will set the following variables in your project:
|
||||
|
||||
``Pythia8_FOUND``
|
||||
true if the Pythia8 headers and libraries were found.
|
||||
|
||||
Hints
|
||||
^^^^^
|
||||
|
||||
A user may set ``Pythia8_ROOT`` to a Pythia8 installation root to tell this
|
||||
module where to look.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# WE ONLY ALLOW USE OF THIS MODULE IN GEANT4 OR py8decayer EXAMPLE
|
||||
if(NOT PROJECT_NAME MATCHES "Geant4|py8decayer")
|
||||
message(FATAL_ERROR "This FindPythia8.cmake module is only supported for use in Geant4's py8decayer "
|
||||
"extended example. No support or extension of this module for use outside of this example "
|
||||
"will be provided.")
|
||||
endif()
|
||||
|
||||
# Look for the header file
|
||||
find_path(Pythia8_INCLUDE_DIR
|
||||
NAMES Pythia8/Pythia.h
|
||||
HINTS ${Pythia8_ROOT}/include)
|
||||
|
||||
if(NOT Pythia8_LIBRARY)
|
||||
find_library(Pythia8_LIBRARY
|
||||
NAMES pythia8 Pythia8
|
||||
HINTS ${Pythia8_ROOT}/lib ${Pythia8_ROOT}/lib64)
|
||||
endif()
|
||||
|
||||
# Determine the version
|
||||
if(Pythia8_INCLUDE_DIR AND EXISTS "${Pythia8_INCLUDE_DIR}/Pythia8/Pythia.h")
|
||||
file(STRINGS "${Pythia8_INCLUDE_DIR}/Pythia8/Pythia.h" PYTHIA8_H REGEX "^#define PYTHIA_VERSION.*$")
|
||||
if(PYTHIA8_H MATCHES "PYTHIA_VERSION ([0-9]\\.[0-9]+)$")
|
||||
set(Pythia8_VERSION "${CMAKE_MATCH_1}")
|
||||
else()
|
||||
set(Pythia8_VERSION "")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set Pythia8_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Pythia8
|
||||
REQUIRED_VARS Pythia8_INCLUDE_DIR Pythia8_LIBRARY
|
||||
VERSION_VAR Pythia8_VERSION)
|
||||
|
||||
mark_as_advanced(Pythia8_INCLUDE_DIR Pythia8_LIBRARY)
|
||||
|
||||
# Create imported target
|
||||
if(Pythia8_FOUND)
|
||||
if(NOT TARGET Pythia8::Pythia8)
|
||||
add_library(Pythia8::Pythia8 UNKNOWN IMPORTED)
|
||||
set_target_properties(Pythia8::Pythia8 PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Pythia8_INCLUDE_DIR}"
|
||||
IMPORTED_LOCATION ${Pythia8_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
# - NDL
|
||||
geant4_add_dataset(
|
||||
NAME G4NDL
|
||||
VERSION 4.7
|
||||
VERSION 4.7.1
|
||||
FILENAME G4NDL
|
||||
EXTENSION tar.gz
|
||||
ENVVAR G4NEUTRONHPDATA
|
||||
MD5SUM b001a2091bf9392e6833830347672ea2
|
||||
MD5SUM 54f0ed3995856f02433d42ec96d70bc6
|
||||
)
|
||||
|
||||
# - Low energy electromagnetics
|
||||
|
||||
@@ -333,20 +333,21 @@ function(geant4_configure_datasets)
|
||||
message(" ${_missing} (${_vers})")
|
||||
endforeach()
|
||||
message(" ")
|
||||
message(" If you want to have these datasets installed automatically")
|
||||
message(" simply re-run cmake and set the GEANT4_INSTALL_DATA")
|
||||
message(" variable to ON. This will configure the build to download")
|
||||
message(" and install these datasets for you. For example, on the")
|
||||
message(" command line, do:")
|
||||
message(" - If you have access to cvmfs, you can use standard datasets")
|
||||
message(" by reconfiguring with:")
|
||||
message(" cmake -DGEANT4_INSTALL_DATADIR=/cvmfs/geant4.cern.ch/share/data <...>")
|
||||
message(" The variable can also be set in ccmake or cmake-gui.")
|
||||
message(" - If you want to have these datasets installed by Geant4,")
|
||||
message(" simply re-run cmake with GEANT4_INSTALL_DATA=ON. This will")
|
||||
message(" configure the build to download and install these datasets for you.")
|
||||
message(" For example, use:")
|
||||
message(" cmake -DGEANT4_INSTALL_DATA=ON <otherargs>")
|
||||
message(" ")
|
||||
message(" cmake -DGEANT4_INSTALL_DATA=ON <otherargs>")
|
||||
message(" ")
|
||||
message(" The variable can also be toggled in ccmake or cmake-gui.")
|
||||
message(" If you're running on a Windows system, this is the best")
|
||||
message(" solution as CMake will unpack the datasets for you")
|
||||
message(" without any further software being required")
|
||||
message(" ")
|
||||
message(" Alternatively, you can install these datasets manually")
|
||||
message(" - Alternatively, you can install these datasets manually")
|
||||
message(" now or after you have installed Geant4. To do this,")
|
||||
message(" download the following files:")
|
||||
message(" ")
|
||||
|
||||
@@ -153,12 +153,12 @@ if(GEANT4_USE_INVENTOR)
|
||||
geant4_save_package_variables(Inventor SoQt_DIR)
|
||||
else()
|
||||
if(UNIX)
|
||||
find_package(SoXt 1.4.0 REQUIRED)
|
||||
find_package(SoXt REQUIRED)
|
||||
check_sobind_version(SoXt 1.4.0)
|
||||
geant4_save_package_variables(Inventor SoXt_DIR)
|
||||
set(GEANT4_USE_INVENTOR_XT ON)
|
||||
elseif(WIN32)
|
||||
find_package(SoWin 1.4.0 REQUIRED)
|
||||
find_package(SoWin REQUIRED)
|
||||
check_sobind_version(SoWin 1.4.0)
|
||||
geant4_save_package_variables(Inventor SoWin_DIR)
|
||||
set(GEANT4_USE_INVENTOR_WIN ON)
|
||||
|
||||
@@ -142,7 +142,7 @@ def scan_includes(input_file, settings):
|
||||
m = re.search("^ *# *include *\"(.*)\"(.*)$", line)
|
||||
if m:
|
||||
c = re.search(
|
||||
"\s*//\s*no_geant4_module_check\s*(\((.*)\))?.*$", m.group(2))
|
||||
"\\s*//\\s*no_geant4_module_check\\s*(\\((.*)\\))?.*$", m.group(2))
|
||||
if c:
|
||||
conds = set()
|
||||
if c.group(2):
|
||||
|
||||
Reference in New Issue
Block a user