Skip to content

Commit 32390e8

Browse files
committed
Import Geant4 11.3.0 source tree
1 parent e58e650 commit 32390e8

File tree

1,984 files changed

+93976
-79259
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,984 files changed

+93976
-79259
lines changed

ReleaseNotes/Beta4.11.3-1.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,11 @@ List of features and fixes included in this Beta release since 11.2.p02:
133133
o Minor cleanup in QSS classes.
134134
+ management:
135135
o Added new capability to run voxel optimisation in threads in MT mode.
136-
Parallelises only over volumes. The user must currently call
137-
G4GeometryManager::RequestParallelOptimisation(optimise, verbose) to
138-
use it. Set 'verbose=true' to obtain statistics on the volumes with
139-
biggest contribution to memory size and CPU time for voxelisation.
136+
Parallelises only over volumes. The user can call the method
137+
RequestParallelOptimisation(optimise, verbose) from G4GeometryManager
138+
to turn it on/off. Set 'verbose=true' to obtain statistics on the
139+
volumes with biggest contribution to memory size and CPU time for
140+
voxelisation.
140141
New method BuildOptimisationsParallel() can be called by
141142
G4WorkerRunManager to initialise. New method ReportVoxelInfo() to
142143
write out for verification. Checked with simple and complex/large

ReleaseNotes/ReleaseNotes.11.3.html

Lines changed: 2424 additions & 0 deletions
Large diffs are not rendered by default.

cmake/History

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,61 @@ It must **not** be used as a substitute for writing good git commit messages!
66

77
-------------------------------------------------------------------------------
88

9+
## 2024-11-25 Ben Morgan (cmake-V11-02-30)
10+
- Bump RadioactiveDecay dataset version to 6.1.2
11+
- Fixes Issue #237
12+
13+
## 2024-11-19 Ben Morgan (cmake-V11-02-29)
14+
- Bump RadioactiveDecay dataset version to 6.1.1
15+
16+
## 2024-11-08 Ben Morgan (cmake-V11-02-28)
17+
- Bump dataset versions:
18+
- PhotonEvaporation 6.1
19+
- RadioactiveDecay 6.1
20+
- Fixes Issue 234
21+
22+
## 2024-10-30 Ben Morgan (cmake-V11-02-27)
23+
- Ensure sanitizer flags are forwarded to the linker when using Xcode, and all
24+
linker flags are forwarded to builds of tests done by geant4_add_test.
25+
- Fixes Issue #227
26+
27+
## 2024-10-02 Ben Morgan (cmake-V11-02-26)
28+
- Bump URRPT dataset version to 1.1
29+
- Fixes Issue #228
30+
31+
## 2024-09-25 Ben Morgan (cmake-V11-02-25)
32+
- Default GEANT4_INSTALL_PACKAGE_CACHE to OFF
33+
- This file is highly unstable on macOS and SPack installs, and causes more problems
34+
for most users than it solves.
35+
36+
## 2024-09-24 Ben Morgan (cmake-V11-02-24)
37+
- Support running example build-and-run tests in Xcode
38+
- Part of Issue #227
39+
40+
## 2024-09-23 Gunter Folger (cmake-V11-02-23)
41+
- Bump dataset version:
42+
- RadioactiveDecay 6.0.1
43+
- Fixes Issue #226
44+
45+
## 2024-09-19 Ben Morgan (cmake-V11-02-22)
46+
- Bump dataset versions:
47+
- G4ENSDFSTATE 3.0
48+
- PhotonEvaporation 6.0
49+
- RadioactiveDecay 6.0
50+
- Fixes Issue #224
51+
52+
## 2024-08-28 Ben Morgan (cmake-V11-02-21)
53+
- Bump G4EMLOW dataset version to 8.6.1
54+
55+
## 2024-08-27 Ben Morgan (cmake-V11-02-20)
56+
- Add new G4CHANNELING dataset to support channeling physics processes/models.
57+
58+
## 2024-06-24 Ben Morgan (cmake-V11-02-19)
59+
- Simplify CMake/CTest functions and settings
60+
- Move geant4_add_test function to dedicated module, retiring "UseGeant4_internal"
61+
file
62+
- Reduce oversetting of Geant4_DIR variable for use by tests
63+
964
## 2024-06-07 Ben Morgan (cmake-V11-02-18)
1065
- Add optional install of new URRPT data model
1166
- Fixes Issue #217

cmake/Modules/G4BuildSettings.cmake

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,14 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|.*Clang")
271271
# Add flags - longer term, make compile/link options
272272
# frame pointer flag to get more meaningful stack traces
273273
# May need others for better/reliable output
274-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer -fsanitize=${GEANT4_BUILD_SANITIZER}")
274+
set(__geant4_sanitizer_flags "-fno-omit-frame-pointer -fsanitize=${GEANT4_BUILD_SANITIZER}")
275+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${__geant4_sanitizer_flags}")
276+
# Xcode does not forward CXX_FLAGS to the linker, and sanitizer link flags need propagating to final
277+
# link steps
278+
if(CMAKE_GENERATOR MATCHES Xcode)
279+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${__geant4_sanitizer_flags}")
280+
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${__geant4_sanitizer_flags}")
281+
endif()
275282

276283
geant4_add_feature(GEANT4_BUILD_SANITIZER "Compiling/linking with sanitizer '${GEANT4_BUILD_SANITIZER}'")
277284
endif()

cmake/Modules/G4CTest.cmake

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,15 @@ if(GEANT4_ENABLE_TESTING)
1414
# - Core CTest
1515
enable_testing()
1616
include(CTest)
17+
include(G4TestAPI)
1718

1819
# - Geant4_DIR is needed to locate GeantConfig.cmake file required
19-
# by tests and examples
20-
set(Geant4_DIR ${PROJECT_BINARY_DIR} CACHE PATH "Current build directory")
20+
# for tests and examples that are built as direct subprojects
21+
# (as opposed to "build-and-test" type situations)
22+
set(Geant4_DIR ${PROJECT_BINARY_DIR})
23+
24+
# - Base URL for test reference files
25+
set(GEANT4_TEST_REFERENCES_URL "http://cern.ch/geant4-data/stt/references/")
2126

2227
# - Add datasets to testing environment
2328
geant4_get_datasetnames(_dslist)
@@ -27,18 +32,13 @@ if(GEANT4_ENABLE_TESTING)
2732
list(APPEND GEANT4_TEST_ENVIRONMENT ${_dsenvvar}=${_dspath})
2833
endforeach()
2934

30-
# - Add base URL for test reference files
31-
set(GEANT4_TEST_REFERENCES_URL "http://cern.ch/geant4-data/stt/references/" CACHE
32-
STRING "base URL for test reference files")
33-
mark_as_advanced(GEANT4_TEST_REFERENCES_URL)
34-
35-
# - Add TOOLS_FONT_PATH if freetype enabled
35+
# - Add TOOLS_FONT_PATH to testing environment if required
3636
if(GEANT4_USE_FREETYPE)
3737
list(APPEND GEANT4_TEST_ENVIRONMENT TOOLS_FONT_PATH=${PROJECT_SOURCE_DIR}/source/externals/g4tools/fonts)
3838
endif()
3939

4040
# - Configure 'G4RunManagerFactory::CreateRunManager(G4RunManagerType::Default)'
41-
# to use TBB
41+
# to use TBB if required
4242
if(GEANT4_BUILD_MULTITHREADED AND GEANT4_USE_TBB)
4343
list(APPEND GEANT4_TEST_ENVIRONMENT G4RUN_MANAGER_TYPE=TBB)
4444
endif()

cmake/Modules/G4ConfigureCMakeHelpers.cmake

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,6 @@ configure_file(
206206
COPYONLY
207207
)
208208

209-
configure_file(
210-
${PROJECT_SOURCE_DIR}/cmake/Templates/UseGeant4_internal.cmake
211-
${PROJECT_BINARY_DIR}/UseGeant4_internal.cmake
212-
COPYONLY
213-
)
214-
215209
#-----------------------------------------------------------------------
216210
# - Generate Install Tree Configuration Files
217211
#-----------------------------------------------------------------------
@@ -272,8 +266,9 @@ install(FILES
272266
COMPONENT Development
273267
)
274268

275-
# Install the package settings file if required (always for now)
276-
option(GEANT4_INSTALL_PACKAGE_CACHE "Install file recording build-time locations of required packages" ON)
269+
# Install the package settings file if required
270+
# Default to OFF because it's a hand-holding solution that hinders more than helps.
271+
option(GEANT4_INSTALL_PACKAGE_CACHE "Install file recording build-time locations of required packages" OFF)
277272
mark_as_advanced(GEANT4_INSTALL_PACKAGE_CACHE)
278273
if(GEANT4_INSTALL_PACKAGE_CACHE)
279274
install(FILES ${PROJECT_BINARY_DIR}/Geant4PackageCache.cmake

cmake/Modules/G4DatasetDefinitions.cmake

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,31 @@ geant4_add_dataset(
1818
# - Low energy electromagnetics
1919
geant4_add_dataset(
2020
NAME G4EMLOW
21-
VERSION 8.6
21+
VERSION 8.6.1
2222
FILENAME G4EMLOW
2323
EXTENSION tar.gz
2424
ENVVAR G4LEDATA
25-
MD5SUM 080576674061a0649629649879655bb9
25+
MD5SUM 9db67a37acc3eae9b0ffdace41a23b74
2626
)
2727

2828
# - Photon evaporation
2929
geant4_add_dataset(
3030
NAME PhotonEvaporation
31-
VERSION 5.7
31+
VERSION 6.1
3232
FILENAME G4PhotonEvaporation
3333
EXTENSION tar.gz
3434
ENVVAR G4LEVELGAMMADATA
35-
MD5SUM 81ff27deb23af4aa225423e6b3a06b39
35+
MD5SUM 92d68b937cdad0fd49892a66878863de
3636
)
3737

3838
# - Radioisotopes
3939
geant4_add_dataset(
4040
NAME RadioactiveDecay
41-
VERSION 5.6
41+
VERSION 6.1.2
4242
FILENAME G4RadioactiveDecay
4343
EXTENSION tar.gz
4444
ENVVAR G4RADIOACTIVEDATA
45-
MD5SUM acc1dbeb87b6b708b2874ced729a3a8f
45+
MD5SUM 20d494f73d4bddabd7fab5c06a58895c
4646
)
4747

4848
# - Particle XS - replaces Neutron XS
@@ -109,11 +109,21 @@ geant4_add_dataset(
109109
# - ENSDFSTATE
110110
geant4_add_dataset(
111111
NAME G4ENSDFSTATE
112-
VERSION 2.3
112+
VERSION 3.0
113113
FILENAME G4ENSDFSTATE
114114
EXTENSION tar.gz
115115
ENVVAR G4ENSDFSTATEDATA
116-
MD5SUM 6f18fce8f217e7aaeaa3711be9b2c7bf
116+
MD5SUM c500728534ce3e9fb2fefa0112eb3a74
117+
)
118+
119+
# - Channeling
120+
geant4_add_dataset(
121+
NAME G4CHANNELING
122+
VERSION 1.0
123+
FILENAME G4CHANNELING
124+
EXTENSION tar.gz
125+
ENVVAR G4CHANNELINGDATA
126+
MD5SUM b2f692ec7109418c6354ea1ecbc62da7
117127
)
118128

119129
# - TENDL
@@ -153,10 +163,10 @@ mark_as_advanced(GEANT4_INSTALL_DATASETS_URRPT)
153163
if(GEANT4_INSTALL_DATASETS_URRPT)
154164
geant4_add_dataset(
155165
NAME G4URRPT
156-
VERSION 1.0
166+
VERSION 1.1
157167
FILENAME G4URRPT
158168
EXTENSION tar.gz
159169
ENVVAR G4URRPTDATA
160-
MD5SUM acc94698e4199455b4fac33c3384ccb4
170+
MD5SUM ec9a2acb0745c8bfb6365ca3434bd3b8
161171
)
162172
endif()

cmake/Templates/UseGeant4_internal.cmake renamed to cmake/Modules/G4TestAPI.cmake

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
# - Internal Use file for Geant4
2-
# This file is designed for inclusion by the UseGeant4.cmake file, but
3-
# only in the build tree. It contains functions and macros that are only
4-
# intended to help in building the Geant4 tests.
5-
#
6-
# IT SHOULD NOT BE INSTALLED!
7-
81
#-----------------------------------------------------------------------
92
# Special internal functions for building tests.
103
#-----------------------------------------------------------------------
@@ -23,11 +16,6 @@
2316
# [LABELS label1 label2 ...])
2417
#
2518
function(geant4_add_test test)
26-
if(NOT CMAKE_PROJECT_NAME STREQUAL Geant4)
27-
message(WARNING "geant4_add_test is only for internal Geant4 usage, test '${test}' is disabled")
28-
return()
29-
endif()
30-
3119
cmake_parse_arguments(ARG
3220
"DEBUG"
3321
"TIMEOUT;BUILD;OUTPUT;ERROR;SOURCE_DIR;BINARY_DIR;PROJECT;PASSREGEX;FAILREGEX;WORKING_DIRECTORY"
@@ -38,19 +26,31 @@ function(geant4_add_test test)
3826
set(_cfg $<CONFIGURATION>/)
3927
endif()
4028

29+
# ARG_BUILD is treated as "zero or one"
30+
# zero arg: build everything
31+
# one arg: just that target
32+
if(ARG_BUILD OR "BUILD" IN_LIST ARG_KEYWORDS_MISSING_VALUES)
33+
set(_is_build_test TRUE)
34+
endif()
35+
4136
# COMMAND AND BUILD: split test
4237
# - In this case, we have to create a -build and a -run test with the latter depending on the former
4338
# NOT COMMAND AND BUILD: pure build
4439
# COMMAND AND NOT BUILD: pure test
45-
if(ARG_COMMAND AND ARG_BUILD)
40+
if(ARG_COMMAND AND _is_build_test)
4641
set(_is_split_test TRUE)
4742
endif()
4843

44+
# Supplying a PROJECT argument is now a deprecation warning and will be removed
45+
if(ARG_PROJECT)
46+
message(WARNING "Test '${test}' uses the deprecated 'PROJECT' argument to 'geant4_add_test'. This argument is obsolete")
47+
endif()
48+
4949
#- Handle COMMAND argument
5050
list(LENGTH ARG_COMMAND _len)
5151
if(_len LESS 1)
52-
if(NOT ARG_BUILD)
53-
message(FATAL_ERROR "GEANT4_ADD_TEST: command is mandatory (without build)")
52+
if(NOT _is_build_test)
53+
message(FATAL_ERROR "geant4_add_test: COMMAND argument is mandatory when BUILD argument is not supplied")
5454
endif()
5555
else()
5656
list(GET ARG_COMMAND 0 _prg)
@@ -125,20 +125,13 @@ function(geant4_add_test test)
125125
set(_command ${_command} -P ${_driver})
126126

127127
#- Now we can actually add the test
128-
if(ARG_BUILD)
128+
if(_is_build_test)
129129
if(NOT ARG_SOURCE_DIR)
130130
set(ARG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
131131
endif()
132132
if(NOT ARG_BINARY_DIR)
133133
set(ARG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
134134
endif()
135-
if(NOT ARG_PROJECT)
136-
if(NOT PROJECT_NAME STREQUAL "Geant4")
137-
set(ARG_PROJECT ${PROJECT_NAME})
138-
else()
139-
set(ARG_PROJECT ${ARG_BUILD})
140-
endif()
141-
endif()
142135

143136
set(__build_test_name "${test}")
144137
set(__run_test_name "")
@@ -148,15 +141,18 @@ function(geant4_add_test test)
148141
set(__run_test_name "${test}")
149142
endif()
150143

144+
if(ARG_BUILD)
145+
set(__build_argument --build-target ${ARG_BUILD})
146+
endif()
147+
151148
# Build part of the test
152149
# Again, note that we scope Geant4_DIR to Geant4_BINARY_DIR so we don't accidentally pickup
153150
# local or higher scopes
154151
add_test(NAME ${__build_test_name} COMMAND ${CMAKE_CTEST_COMMAND}
155152
--build-and-test ${ARG_SOURCE_DIR} ${ARG_BINARY_DIR}
156153
--build-generator ${CMAKE_GENERATOR}
157154
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
158-
--build-target ${ARG_BUILD}
159-
--build-project ${ARG_PROJECT}
155+
${__build_argument}
160156
--build-config $<CONFIGURATION>
161157
--build-noclean
162158
--build-options
@@ -175,9 +171,11 @@ function(geant4_add_test test)
175171
-DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
176172
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
177173
-DCMAKE_CXX_FLAGS_FULLRELWITHDEBINFO=${CMAKE_CXX_FLAGS_FULLRELWITHDEBINFO}
174+
-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS}
175+
-DCMAKE_SHARED_LINKER_FLAGS=${CMAKE_SHARED_LINKER_FLAGS}
176+
-DCMAKE_STATIC_LINKER_FLAGS=${CMAKE_STATIC_LINKER_FLAGS}
178177
-DCMAKE_DISABLE_FIND_PACKAGE_ROOT=$<BOOL:${CMAKE_DISABLE_FIND_PACKAGE_ROOT}>
179178
)
180-
set_property(TEST ${__build_test_name} PROPERTY ENVIRONMENT Geant4_DIR=${Geant4_BINARY_DIR})
181179

182180
# Build part of the test should have additional regex, and *must* have same labels
183181
if(ARG_FAILREGEX)

cmake/Templates/UseGeant4.cmake

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
# - Use file for Geant4
2-
#
3-
# Optional inclusion of internal Use file. This file can contain
4-
# variables, functions and macros for strict internal use in Geant4,
5-
# such as building and running validation tests.
6-
#
7-
include(${CMAKE_CURRENT_LIST_DIR}/UseGeant4_internal.cmake OPTIONAL)
8-
92
# Add Module directory so that examples can use internal "FindXXX"
103
# modules. Appended to minimize any conflict with consumer project
114
# settings
5+
# DEPRECATED: Only needed by certain examples
126
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/Modules)

0 commit comments

Comments
 (0)