Import Geant4 10.3.0 source tree
This commit is contained in:
+106
@@ -31,6 +31,112 @@ add this in the documentation for the changed file as [BUGFIX #BUGNUMBER].
|
||||
|
||||
----------------------------------------------------------
|
||||
|
||||
24th November 2016 - Gunter Folger (cmake-V10-02-37)
|
||||
- Switch to PhotonEvaporation 4.3
|
||||
|
||||
22nd November 2016 - Ben Morgan (cmake-V10-02-36)
|
||||
- Modules/Geant4MakeRules_cxx.cmake : Change optimization level for MSVC in
|
||||
Release mode to -Ox for consistentcy with GNUmake system.
|
||||
|
||||
18th November 2016 - Ben Morgan (cmake-V10-02-35)
|
||||
- Modules/Geant4BuildModes.cmake : Change default build type to Release
|
||||
when using single mode tools like Make/Ninja.
|
||||
- Modules/Geant4InstallData.cmake : Always convert exported data paths to
|
||||
native CMake paths. Prevents parse errors on Windows, where native
|
||||
paths are exported (reported by Brian Smith)
|
||||
|
||||
17th November 2016 - Ben Morgan (cmake-V10-02-34)
|
||||
- Fix bug in Qt4/5 handling on Windows
|
||||
- Templates/Geant4Config.cmake.in : Move re-find of Qt4 inside overall
|
||||
Qt4/5 setup section.
|
||||
- Modules/Geant4BuildProjectConfig.cmake : Remove setting of GEANT4_THIRD_PARTY_IMPORT_SETUP
|
||||
variable, and replace with dedicated GEANT4_QT4_IMPORT_SETUP variable for Qt
|
||||
- Export Qt library path to dynamic loader path in Geant4GNUmake environment setup
|
||||
- Modules/Geant4ToolchainBackwardCompatibility.cmake :
|
||||
Prepend Qt library path to dynamic loader path, noting obselescense on
|
||||
macOS.
|
||||
- Templates/geant4make-skeleton.in : Add expansion variable for Qt dynamic
|
||||
loader setup.
|
||||
|
||||
15th November 2016 - Ben Morgan (cmake-V10-02-33)
|
||||
- Export USolids/VecGeom compile defs to Geant4GNUmake environment setup scripts
|
||||
- Modules/Geant4ToolchainBackwardCompatibility.cmake :
|
||||
Configure export variables based on choice of USolids full/partial
|
||||
replacement
|
||||
- Templates/geant4make-skeleton.in : Add entries for required env vars
|
||||
|
||||
9th November 2016 - Ivana Hrivnacova (cmake-V10-02-32)
|
||||
- Added FindDCMTK.cmake needed for extended/medical/DICOM example
|
||||
|
||||
8th November 2016 - Gunter Folger (cmake-V10-02-31)
|
||||
- switch to RadioactiveDecay5.1, PhotonEvaporation4.2, G4ENSDFSTATE2.1
|
||||
|
||||
3rd November 2016 - Gunter Folger (cmake-V10-02-30)
|
||||
- switch to PhotonEvaporation 4.1
|
||||
|
||||
31st October 2016 - Ben Morgan (cmake-V10-02-29)
|
||||
- Modules/Geant4MakeRules_cxx.cmake : fix bug - use correct
|
||||
CMAKE_CXX_FLAGS_INIT variable to add -pipe argument to.
|
||||
|
||||
31st October 2016 - Ben Morgan (cmake-V10-02-28)
|
||||
- Bugfix #1877
|
||||
- Templates/geant4-env-skeleton.in : Provide placeholder
|
||||
variable for adding setting of XercesC libpath
|
||||
- Modules/Geant4ToolchainBackwardCompatibility.cmake
|
||||
Extract and export XercesC library directory to geant4.(c)sh
|
||||
scripts. Add new _g4tc_append_path function to allow appending
|
||||
of entries to a path-like variable. This ensures paths to third
|
||||
party libraries appear after the core Geant4 library path which
|
||||
should prevent clashes.
|
||||
|
||||
27th October 2016 - Gunter Folger (cmake-V10-02-27)
|
||||
- switch to G4EMLOW 6.50
|
||||
|
||||
6th October 2016 - Ben Morgan (cmake-V10-02-26)
|
||||
- Modules/Geant4MakeRules_cxx.cmake : Move all -f optimization options
|
||||
to Release mode only. Add -fno-math-errno and -ftree-vectorize.
|
||||
|
||||
|
||||
6th October 2016 - Ben Morgan (cmake-V10-02-25)
|
||||
- Modules/Geant4MakeRules_cxx.cmake : Add -fno-trapping-math to default
|
||||
flags of GCC/Clang compielrs to assist in auto-vectorization (recommended
|
||||
by CMS/GCC). Bump optimization level in Release mode to O3 on all supported
|
||||
compilers.
|
||||
|
||||
3rd October 2016- Gunter Folger (cmake-V10-02-24)
|
||||
- switch to use G4ENSDFSTATE 2.0
|
||||
(requires tag particles-V10-02-28)
|
||||
|
||||
29th September 2016 - Robert Hatcher (cmake-V10-02-23)
|
||||
- Templates/Geant4Config.cmake.in : No longer use --whole-archive for
|
||||
G4physicslists on static builds; this was never possible for _WIN32 and recent
|
||||
physics list factory work makes this untenable on some build platforms.
|
||||
|
||||
28th September 2016 - Andrea Dotti (cmake-V10-02-22)
|
||||
- add option for TEXT output file in FindStatTest.cmake script
|
||||
|
||||
19th September 2016 - Gunter Folger (cmake-V10-02-21)
|
||||
- switch to PhotonEvaporation 4.0
|
||||
|
||||
7th September 2016 - Gunter Folger (cmake-V10-02-20)
|
||||
- switch to G4RadioactiveDecay.5.0
|
||||
|
||||
22nd August 2016 - Ben Morgan (cmake-V10-02-19)
|
||||
- Templates/UseGeant4.cmake : Force core and per-mode flags to those used to
|
||||
build Geant4. When Geant4 is built with a single mode generator, default
|
||||
CMAKE_BUILD_TYPE for the client to that used to build this install. This
|
||||
guarantees matching of librayr/application optimization for most use cases.
|
||||
NB: No default mode can be provided if Geant4 itself was built/installed using
|
||||
multimode tool like Xcode/VS. This is because multiple modes may be installed
|
||||
at once so a sensible default cannot be set (to be looked at further).
|
||||
- Templates/Geant4Config.cmake.in : Add new Geant4_BUILD_TYPE variable to hold
|
||||
build type of install when Geant4 is installed using a single mode tool.
|
||||
- Modules/Geant4BuildProjectConfig.cmake : Set Geant4_BUILD_TYPE to CMAKE_BUILD_TYPE
|
||||
when building with a single mode tool.
|
||||
|
||||
15th August 2016 - Gunter Folger (cmake-V10-02-18)
|
||||
- switch to G4EMLOW.6.49
|
||||
|
||||
17th June 2016 - Gabriele Cosmo (cmake-V10-02-17)
|
||||
- Modules/Geant4OptionalComponents.cmake: set CLHEP-2.3.3.0 as the required
|
||||
version for external CLHEP library.
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
# Locate DCMTK package
|
||||
# in a directory defined via DCMTK_DIR CMake or environment variable
|
||||
# Defines:
|
||||
#
|
||||
# DCMTK_INCLUDE_DIRS
|
||||
# DCMTK_LIBRARIES
|
||||
# DCMTK_FOUND
|
||||
|
||||
# includes
|
||||
#
|
||||
find_path(DCMTK_INCLUDE_DIR dcmtk/dcmdata/dcfilefo.h
|
||||
HINTS $ENV{DCMTK_DIR}/include ${DCMTK_DIR}/include)
|
||||
set(DCMTK_INCLUDE_DIRS ${DCMTK_INCLUDE_DIR})
|
||||
|
||||
|
||||
# libraries
|
||||
#
|
||||
find_library(DCMTK_DCMPSTAT_LIBRARY
|
||||
NAMES dcmpstat
|
||||
HINTS "$ENV{DCMTK_DIR}/lib" "${DCMTK_DIR}/lib")
|
||||
|
||||
get_filename_component(DCMTK_LIBRARY_DIR
|
||||
${DCMTK_DCMPSTAT_LIBRARY} DIRECTORY)
|
||||
|
||||
set(DCMTK_LIBRARIES
|
||||
-L${DCMTK_LIBRARY_DIR} -ldcmpstat -ldcmwlm -lijg8 -ldcmdata -ldcmjpeg -ldcmqrdb
|
||||
-li2d -loflog -ldcmdsig -ldcmjpls -ldcmsr -lijg12 -lofstd -ldcmimage -ldcmnet
|
||||
-ldcmtls -lijg16 -ldcmjpeg -ldcmrt -lcharls -ldcmimgle)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set DCMTK_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DCMTK DEFAULT_MSG DCMTK_INCLUDE_DIRS DCMTK_LIBRARIES)
|
||||
|
||||
mark_as_advanced(DCMTK_FOUND DCMTK_INCLUDE_DIRS DCMTK_LIBRARIES)
|
||||
@@ -1,3 +1,4 @@
|
||||
# Copied from Geant4 installation, need patch
|
||||
# - Find StatTest
|
||||
# This module tries to find the StatTest application
|
||||
# Once done this will define
|
||||
@@ -13,7 +14,6 @@
|
||||
#
|
||||
# STATTEST_ROOT_DIR Root directory to StatTest package
|
||||
#
|
||||
|
||||
#Search application
|
||||
#Note that the second suggested path is G4 specific...
|
||||
find_path(STATTEST_APP_DIR
|
||||
@@ -68,12 +68,13 @@ if(STATTEST_FOUND)
|
||||
# G4TEST testname
|
||||
# CONFIG conffile
|
||||
# INPUT inputfile
|
||||
# [DEBUG]
|
||||
# [DEBUG]
|
||||
# [TEXT] #Input is text file instead of root
|
||||
# [REFERENCE reference]
|
||||
# [LABELS label1 label2 ...]
|
||||
# [IMG filename])
|
||||
function(STATTEST_ADD_TEST stattest)
|
||||
CMAKE_PARSE_ARGUMENTS(ARG "DEBUG"
|
||||
CMAKE_PARSE_ARGUMENTS(ARG "DEBUG;TEXT"
|
||||
"CONFIG;INPUT;REFERENCE;G4TEST;IMG"
|
||||
"LABELS" ${ARGN}
|
||||
)
|
||||
@@ -99,7 +100,11 @@ if(STATTEST_FOUND)
|
||||
set(_command ${STATTEST_CMD} -g ${ARG_IMG})
|
||||
else()
|
||||
set(_command ${STATTEST_CMD})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ARG_TEXT)
|
||||
set(_command ${_command} "-T")
|
||||
endif()
|
||||
|
||||
#Mandatory parameters
|
||||
set(_command ${_command} ${ARG_CONFIG} ${ARG_INPUT})
|
||||
|
||||
@@ -70,7 +70,7 @@ endif()
|
||||
if(NOT CMAKE_CONFIGURATION_TYPES)
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
# Default to a Release build if nothing else...
|
||||
set(CMAKE_BUILD_TYPE RelWithDebInfo
|
||||
set(CMAKE_BUILD_TYPE Release
|
||||
CACHE STRING "Choose the type of build, options are: None Release TestRelease MinSizeRel Debug RelWithDebInfo MinSizeRel Maintainer."
|
||||
FORCE
|
||||
)
|
||||
|
||||
@@ -13,10 +13,15 @@ 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_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 )
|
||||
|
||||
@@ -88,7 +93,7 @@ if(GEANT4_USE_QT)
|
||||
|
||||
# On WIN32, re-import the Qt targets.
|
||||
if(WIN32)
|
||||
set(GEANT4_THIRD_PARTY_IMPORT_SETUP "${GEANT4_THIRD_PARTY_IMPORT_SETUP}
|
||||
set(GEANT4_QT4_IMPORT_SETUP "
|
||||
# Qt reimport on WIN32
|
||||
set(QT_QMAKE_EXECUTABLE ${QT_QMAKE_EXECUTABLE})
|
||||
set(QT_USE_IMPORTED_TARGETS ON)
|
||||
|
||||
@@ -18,31 +18,31 @@ geant4_add_dataset(
|
||||
# - Low energy electromagnetics
|
||||
geant4_add_dataset(
|
||||
NAME G4EMLOW
|
||||
VERSION 6.48
|
||||
VERSION 6.50
|
||||
FILENAME G4EMLOW
|
||||
EXTENSION tar.gz
|
||||
ENVVAR G4LEDATA
|
||||
MD5SUM 844064faa16a063a6a08406dc7895b68
|
||||
MD5SUM 2a0dbeb2dd57158919c149f33675cce5
|
||||
)
|
||||
|
||||
# - Photon evaporation
|
||||
geant4_add_dataset(
|
||||
NAME PhotonEvaporation
|
||||
VERSION 3.2
|
||||
VERSION 4.3
|
||||
FILENAME G4PhotonEvaporation
|
||||
EXTENSION tar.gz
|
||||
ENVVAR G4LEVELGAMMADATA
|
||||
MD5SUM 01d5ba17f615d3def01f7c0c6b19bd69
|
||||
MD5SUM 012fcdeaa517efebba5770e6c1cbd882
|
||||
)
|
||||
|
||||
# - Radioisotopes
|
||||
geant4_add_dataset(
|
||||
NAME RadioactiveDecay
|
||||
VERSION 4.4.1
|
||||
VERSION 5.1
|
||||
FILENAME G4RadioactiveDecay
|
||||
EXTENSION tar.gz
|
||||
ENVVAR G4RADIOACTIVEDATA
|
||||
MD5SUM 0aa6c879c17b26f1ca85d3ac915fc30e
|
||||
MD5SUM 994853b153c6f805e60e2b83b9ac10e0
|
||||
)
|
||||
|
||||
# - Neutron XS
|
||||
@@ -98,10 +98,10 @@ geant4_add_dataset(
|
||||
# - ENSDFSTATE
|
||||
geant4_add_dataset(
|
||||
NAME G4ENSDFSTATE
|
||||
VERSION 1.3.1
|
||||
VERSION 2.1
|
||||
FILENAME G4ENSDFSTATE
|
||||
EXTENSION tar.gz
|
||||
ENVVAR G4ENSDFSTATEDATA
|
||||
MD5SUM eddd153110184256a57ce6b753f0d527
|
||||
MD5SUM 95d970b97885aeafaa8909f29997b0df
|
||||
)
|
||||
|
||||
|
||||
@@ -185,6 +185,8 @@ function(geant4_export_datasets _type _output)
|
||||
else()
|
||||
message(FATAL_ERROR "incorrect argument to geant4_export_datasets")
|
||||
endif()
|
||||
# Ensure CMake paths
|
||||
file(TO_CMAKE_PATH "${_tmpprop}" _tmpprop)
|
||||
list(APPEND _tuple ${_tmpprop})
|
||||
|
||||
get_property(_fname GLOBAL PROPERTY ${_ds}_FILENAME)
|
||||
|
||||
@@ -24,9 +24,16 @@ endfunction()
|
||||
#-----------------------------------------------------------------------
|
||||
# GNU C++ or Clang/AppleClang Compiler on all(?) platforms
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
|
||||
set(CMAKE_CXX_FLAGS_INIT "-W -Wall -pedantic -Wno-non-virtual-dtor -Wno-long-long -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -Wno-variadic-macros -Wshadow -pipe")
|
||||
# Warnings
|
||||
set(CMAKE_CXX_FLAGS_INIT "-W -Wall -pedantic -Wno-non-virtual-dtor -Wno-long-long -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -Wno-variadic-macros -Wshadow")
|
||||
# Use pipes rather than temp files
|
||||
set(CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS_INIT} -pipe")
|
||||
|
||||
# Additional per-mode flags
|
||||
set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g -DG4FPE_DEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
|
||||
# Assist auto-vectorization
|
||||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "${CMAKE_CXX_FLAGS_RELEASE_INIT} -fno-trapping-math -ftree-vectorize -fno-math-errno")
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
||||
|
||||
@@ -60,7 +67,7 @@ if(MSVC)
|
||||
# best for native build.
|
||||
set(CMAKE_CXX_FLAGS_INIT "-GR -EHsc -Zm200 -nologo -D_CONSOLE -D_WIN32 -DWIN32 -DOS -DXPNET -D_CRT_SECURE_NO_DEPRECATE")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG_INIT "-MDd -Od -Zi")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-MD -O2 -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-MD -Ox -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-MD -Os -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-MD -O2 -Zi")
|
||||
|
||||
@@ -77,7 +84,7 @@ endif()
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
|
||||
set(CMAKE_CXX_FLAGS_INIT "-w1 -Wno-non-virtual-dtor -Wpointer-arith -Wwrite-strings -fp-model precise")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
||||
|
||||
|
||||
@@ -256,6 +256,43 @@ endif
|
||||
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
|
||||
@@ -408,6 +445,28 @@ macro(_g4tc_configure_tc_variables SHELL_FAMILY SCRIPT_NAME)
|
||||
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)
|
||||
@@ -433,7 +492,12 @@ macro(_g4tc_configure_tc_variables SHELL_FAMILY SCRIPT_NAME)
|
||||
_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)
|
||||
|
||||
# Might need library setup, but for now recommend system install....
|
||||
# Dynamic loader path (NB Darwin section is obsolete on El Capitan and higher)
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
|
||||
_g4tc_prepend_path(GEANT4_TC_QT_LIB_PATH_SETUP ${SHELL_FAMILY} DYLD_LIBRARY_PATH \${QTLIBPATH})
|
||||
else()
|
||||
_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()
|
||||
@@ -769,13 +833,26 @@ foreach(_shell bourne;cshell)
|
||||
get_filename_component(_CLHEP_LIB_DIR "${_CLHEP_LIB_DIR}" REALPATH)
|
||||
get_filename_component(_CLHEP_LIB_DIR "${_CLHEP_LIB_DIR}" DIRECTORY)
|
||||
|
||||
_g4tc_prepend_path(GEANT4_TC_CLHEP_LIB_PATH_SETUP
|
||||
_g4tc_append_path(GEANT4_TC_CLHEP_LIB_PATH_SETUP
|
||||
${_shell}
|
||||
${_libpathname}
|
||||
"${_CLHEP_LIB_DIR}"
|
||||
)
|
||||
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)
|
||||
_g4tc_append_path(GEANT4_TC_XERCESC_LIB_PATH_SETUP
|
||||
${_shell}
|
||||
${_libpathname}
|
||||
"${_XERCESC_LIB_DIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
# - Set data paths
|
||||
set(GEANT4_ENV_DATASETS )
|
||||
foreach(_ds ${GEANT4_EXPORTED_DATASETS})
|
||||
@@ -786,7 +863,7 @@ foreach(_shell bourne;cshell)
|
||||
# - Set Font Path
|
||||
set(GEANT4_ENV_TOOLS_FONT_PATH "# FREETYPE SUPPORT NOT AVAILABLE")
|
||||
if(GEANT4_USE_FREETYPE)
|
||||
_g4tc_prepend_path(GEANT4_ENV_TOOLS_FONT_PATH
|
||||
_g4tc_append_path(GEANT4_ENV_TOOLS_FONT_PATH
|
||||
${_shell}
|
||||
TOOLS_FONT_PATH
|
||||
"${TOOLS_FONT_PATH}"
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
# Geant4_INCLUDE_DIRS - include directories for Geant4
|
||||
# Geant4_DEFINITIONS - compile definitions needed to use Geant4
|
||||
# Geant4_LIBRARIES - libraries to link against
|
||||
# Geant4_BUILD_TYPE - Build type (e.g. "Release") used to build this
|
||||
# install. Only set if Geant4 was installed using
|
||||
# a single mode tool (e.g. make, ninja).
|
||||
# Geant4_CXX_FLAGS - Recommended CXX flags for the compiler used to
|
||||
# build the Geant4 libraries.
|
||||
# Geant4_CXX_FLAGS_<CONFIG> - Recommended CXX flags for build mode CONFIG.
|
||||
@@ -216,7 +219,7 @@ endif()
|
||||
# to find the actual package we were built against.
|
||||
# THIS IS NOT PERFECT, AS IT CANNOT GUARANTEE A BINARY COMPATIBLE
|
||||
# PACKAGE IS FOUND.
|
||||
@GEANT4_THIRD_PARTY_IMPORT_SETUP@
|
||||
#@GEANT4_THIRD_PARTY_IMPORT_SETUP@
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Configure the path(s) to third party headers.
|
||||
@@ -384,13 +387,12 @@ if(Geant4_qt_FOUND)
|
||||
find_package(Qt5Widgets REQUIRED PATHS "@Qt5Widgets_DIR@")
|
||||
find_package(Qt5OpenGL REQUIRED PATHS "@Qt5OpenGL_DIR@")
|
||||
find_package(Qt5PrintSupport REQUIRED PATHS "@Qt5PrintSupport_DIR@")
|
||||
else()
|
||||
# On Windows, must refind Qt4 because this always uses imported targets
|
||||
@GEANT4_QT4_IMPORT_SETUP@
|
||||
endif()
|
||||
|
||||
if(Geant4_FIND_REQUIRED_qt OR Geant4_FIND_REQUIRED_ui_all OR Geant4_FIND_REQUIRED_vis_all)
|
||||
# If we have Qt5, we need to refind the components because they use
|
||||
# imported targets, so linking will not work unless we recreate
|
||||
# them
|
||||
|
||||
list(APPEND
|
||||
Geant4_DEFINITIONS
|
||||
-DG4INTY_USE_QT
|
||||
@@ -561,7 +563,14 @@ endif()
|
||||
# - Factory registration mechanism in physics_lists requires whole
|
||||
# archive to be linked when using static libs, so requires wrapping
|
||||
# with suitable compiler dependent flags
|
||||
# 2016-05-24: use an alternate means of forcing linking of references for
|
||||
# static builds. --whole-archive never was implemented for _WIN32
|
||||
# (appears not to even be possible)
|
||||
# In order re-implement whole-archive, switch Geant4_FORCE_WHOLE_ARCHIVE ON
|
||||
set(_geant4_physicslists_library G4physicslists${_geant4_lib_use_suffix})
|
||||
|
||||
set(Geant4_FORCE_WHOLE_ARCHIVE OFF)
|
||||
if( Geant4_FORCE_WHOLE_ARCHIVE )
|
||||
if(_geant4_lib_use_suffix STREQUAL "-static")
|
||||
# - Use CMAKE_CXX_COMPILER_ID, which should be reliable enough...
|
||||
# Though the GNU/Clang/Intel compilers/linkers *should* use identical
|
||||
@@ -576,9 +585,12 @@ if(_geant4_lib_use_suffix STREQUAL "-static")
|
||||
else()
|
||||
# Needs determination of other compiler options.
|
||||
# NB: MSVC has /OPT:NOREF, but may apply globally...
|
||||
# reading up on this ... doesn't seem that it applies for subtle reasons
|
||||
# only real way is to actually reference the static variables
|
||||
set(_geant4_physicslists_library G4physicslists${_geant4_lib_use_suffix})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# - 'Kernel' libraries
|
||||
list(APPEND _geant4_internal_libraries
|
||||
|
||||
@@ -37,18 +37,41 @@ add_definitions(${Geant4_DEFINITIONS})
|
||||
include_directories(AFTER SYSTEM ${Geant4_INCLUDE_DIRS})
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Because Geant4 is sensitive to the compiler flags, let's set the base
|
||||
# Because Geant4 is sensitive to the compiler flags, set the base
|
||||
# set here. This reproduces as far as possible the behaviour of the
|
||||
# original makefile system. However, we append any existing CMake flags in
|
||||
# case the user wishes to override these (at their own risk).
|
||||
# Though this may lead to duplication, that should not affect behaviour.
|
||||
# original makefile system. Users requiring additional flags must append them
|
||||
# *after* inclusion of this file
|
||||
#
|
||||
set(CMAKE_CXX_FLAGS "${Geant4_CXX_FLAGS} ${CMAKE_CXX_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${Geant4_CXX_FLAGS_DEBUG} ${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL "${Geant4_CXX_FLAGS_MINSIZEREL} ${CMAKE_CXX_FLAGS_MINSIZEREL}")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${Geant4_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${Geant4_CXX_FLAGS_RELWITHDEBINFO} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${Geant4_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${Geant4_CXX_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${Geant4_CXX_FLAGS_DEBUG}")
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL "${Geant4_CXX_FLAGS_MINSIZEREL}")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${Geant4_CXX_FLAGS_RELEASE}")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${Geant4_CXX_FLAGS_RELWITHDEBINFO}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${Geant4_EXE_LINKER_FLAGS}")
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Update build type information ONLY for single mode build tools, adding
|
||||
# type used to build this install if none has been set, but otherwise leaving
|
||||
# value alone.
|
||||
# NB: this doesn't allow "None" for the build type - would need something
|
||||
# more sophisticated using an internal cache variable.
|
||||
# Good enough for now!
|
||||
#
|
||||
if(NOT CMAKE_CONFIGURATION_TYPES)
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
# Default to type used to build this install.
|
||||
set(CMAKE_BUILD_TYPE "${Geant4_BUILD_TYPE}"
|
||||
CACHE STRING "Choose the type of build, options are: None Release MinSizeRel Debug RelWithDebInfo MinSizeRel."
|
||||
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 MinSizeRel Debug RelWithDebInfo MinSizeRel."
|
||||
FORCE
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Locate ourselves
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
# - CLHEP
|
||||
@GEANT4_TC_CLHEP_LIB_PATH_SETUP@
|
||||
|
||||
# - XercesC
|
||||
@GEANT4_TC_XERCESC_LIB_PATH_SETUP@
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Resource file paths
|
||||
# - Datasets
|
||||
|
||||
@@ -58,6 +58,26 @@
|
||||
@GEANT4_TC_UNSET_COMMAND@ G4LIB_BUILD_G3TOG4
|
||||
@GEANT4_TC_UNSET_COMMAND@ G4LIB_USE_G3TOG4
|
||||
|
||||
# - USolids/VecGeom
|
||||
@GEANT4_TC_UNSET_COMMAND@ USOLIDS_BASE_DIR
|
||||
@GEANT4_TC_UNSET_COMMAND@ G4GEOM_USE_USOLIDS
|
||||
@GEANT4_TC_UNSET_COMMAND@ G4GEOM_USE_PARTIAL_USOLIDS
|
||||
@GEANT4_TC_UNSET_COMMAND@ G4GEOM_USE_UBOX
|
||||
@GEANT4_TC_UNSET_COMMAND@ G4GEOM_USE_UCONS
|
||||
@GEANT4_TC_UNSET_COMMAND@ G4GEOM_USE_UEXTRUDEDSOLID
|
||||
@GEANT4_TC_UNSET_COMMAND@ G4GEOM_USE_UGENERICPOLYCONE
|
||||
@GEANT4_TC_UNSET_COMMAND@ G4GEOM_USE_UGENERICTRAP
|
||||
@GEANT4_TC_UNSET_COMMAND@ G4GEOM_USE_UORB
|
||||
@GEANT4_TC_UNSET_COMMAND@ G4GEOM_USE_UPARABOLOID
|
||||
@GEANT4_TC_UNSET_COMMAND@ G4GEOM_USE_UPOLYCONE
|
||||
@GEANT4_TC_UNSET_COMMAND@ G4GEOM_USE_UPOLYHEDRA
|
||||
@GEANT4_TC_UNSET_COMMAND@ G4GEOM_USE_USPHERE
|
||||
@GEANT4_TC_UNSET_COMMAND@ G4GEOM_USE_UTET
|
||||
@GEANT4_TC_UNSET_COMMAND@ G4GEOM_USE_UTRAP
|
||||
@GEANT4_TC_UNSET_COMMAND@ G4GEOM_USE_UTRD
|
||||
@GEANT4_TC_UNSET_COMMAND@ G4GEOM_USE_UTORUS
|
||||
@GEANT4_TC_UNSET_COMMAND@ G4GEOM_USE_UTUBS
|
||||
|
||||
# - UI Build and Use options
|
||||
# USE options only for applications.
|
||||
@GEANT4_TC_UNSET_COMMAND@ G4UI_NONE
|
||||
@@ -183,6 +203,29 @@
|
||||
#
|
||||
@GEANT4_TC_G4LIB_USE_G3TOG4@
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# USolids/VecGeom Setup
|
||||
#
|
||||
@GEANT4_TC_USOLIDS_BASE_DIR@
|
||||
@GEANT4_TC_G4GEOM_USE_USOLIDS@
|
||||
@GEANT4_TC_G4GEOM_USE_PARTIAL_USOLIDS@
|
||||
@GEANT4_TC_G4GEOM_USE_UBOX@
|
||||
@GEANT4_TC_G4GEOM_USE_UCONS@
|
||||
@GEANT4_TC_G4GEOM_USE_UEXTRUDEDSOLID@
|
||||
@GEANT4_TC_G4GEOM_USE_UGENERICPOLYCONE@
|
||||
@GEANT4_TC_G4GEOM_USE_UGENERICTRAP@
|
||||
@GEANT4_TC_G4GEOM_USE_UORB@
|
||||
@GEANT4_TC_G4GEOM_USE_UPARABOLOID@
|
||||
@GEANT4_TC_G4GEOM_USE_UPOLYCONE@
|
||||
@GEANT4_TC_G4GEOM_USE_UPOLYHEDRA@
|
||||
@GEANT4_TC_G4GEOM_USE_USPHERE@
|
||||
@GEANT4_TC_G4GEOM_USE_UTET@
|
||||
@GEANT4_TC_G4GEOM_USE_UTRAP@
|
||||
@GEANT4_TC_G4GEOM_USE_UTRD@
|
||||
@GEANT4_TC_G4GEOM_USE_UTORUS@
|
||||
@GEANT4_TC_G4GEOM_USE_UTUBS@
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# USER INTERFACE AND VISUALIZATION MODULES
|
||||
#
|
||||
@@ -200,6 +243,7 @@
|
||||
@GEANT4_TC_GLQTLIBS@
|
||||
@GEANT4_TC_G4UI_USE_QT@
|
||||
@GEANT4_TC_G4VIS_USE_OPENGLQT@
|
||||
@GEANT4_TC_QT_LIB_PATH_SETUP@
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Wt UI/Vis
|
||||
|
||||
Reference in New Issue
Block a user