Skip to content

Commit 1a1316f

Browse files
committed
Import Geant4 10.4.0.beta source tree
1 parent 3a54076 commit 1a1316f

File tree

2,180 files changed

+232602
-53831
lines changed

Some content is hidden

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

2,180 files changed

+232602
-53831
lines changed

CMakeLists.txt

+19-116
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
#
44
# 21st September 2010 Ben Morgan
55
#
6-
# $Id: CMakeLists.txt 102581 2017-02-09 09:30:38Z gcosmo $
6+
# $Id: CMakeLists.txt 104643 2017-06-08 14:43:49Z gcosmo $
77
#
88

99
#-----------------------------------------------------------------------
1010
# - Enforce an out-of-source builds before anything else
1111
#
1212
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
13-
message(STATUS "Geant4 requires an out-of-source build.")
14-
message(STATUS "Please remove these files from ${CMAKE_BINARY_DIR} first:")
15-
message(STATUS "CMakeCache.txt")
16-
message(STATUS "CMakeFiles")
17-
message(STATUS "Once these files are removed, create a separate directory")
18-
message(STATUS "and run CMake from there")
19-
message(FATAL_ERROR "in-source build detected")
13+
message(STATUS "Geant4 requires an out-of-source build.")
14+
message(STATUS "Please remove these files from ${CMAKE_BINARY_DIR} first:")
15+
message(STATUS "CMakeCache.txt")
16+
message(STATUS "CMakeFiles")
17+
message(STATUS "Once these files are removed, create a separate directory")
18+
message(STATUS "and run CMake from there")
19+
message(FATAL_ERROR "in-source build detected")
2020
endif()
2121

2222
#-----------------------------------------------------------------------
@@ -26,20 +26,20 @@ cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
2626

2727
# - Any policy requirements should go here
2828

29+
# - Make overrides for default flags, so they appear in interfaces
2930
set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX
3031
${CMAKE_SOURCE_DIR}/cmake/Modules/Geant4MakeRules_cxx.cmake)
3132

3233
#-----------------------------------------------------------------------
3334
# - Project definition and basic configuration
34-
#
35+
# Version handled manually as project(... VERSION ...) is not used
36+
# in tests/examples which are subprojects. All calls must use
37+
# the same form.
3538
project(Geant4)
36-
37-
# - Versioning. We do this here for now
38-
set(${PROJECT_NAME}_VERSION "10.3.1")
39-
set(${PROJECT_NAME}_VERSION_MAJOR "10")
40-
set(${PROJECT_NAME}_VERSION_MINOR "3")
41-
set(${PROJECT_NAME}_VERSION_PATCH "1")
42-
39+
set(${PROJECT_NAME}_VERSION_MAJOR 10)
40+
set(${PROJECT_NAME}_VERSION_MINOR 4)
41+
set(${PROJECT_NAME}_VERSION_PATCH 0)
42+
set(${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}")
4343

4444
# - Prepend our own CMake Modules to the search path
4545
# NB: if our custom modules include others that we don't supply, those in
@@ -50,105 +50,8 @@ set(CMAKE_MODULE_PATH
5050
${CMAKE_MODULE_PATH})
5151

5252
#-----------------------------------------------------------------------
53-
# - Add functionality provided by standard and custom modules
54-
# See the documentation in each of these modules for further details.
55-
#
56-
# - Provide dependent options as these are needed for some Geant4 features
57-
include(CMakeDependentOption)
58-
59-
# - Provide general CMake utilities for Geant4.
60-
include(Geant4MacroUtilities)
61-
62-
# - Provide an 'uninstall' target.
63-
include(CMakeUninstallTarget)
64-
65-
# - Provide the 'validate_sources' target.
66-
include(Geant4ValidateSources)
67-
68-
# - Provide standard install directories permitting customization.
69-
include(Geant4InstallDirs)
70-
71-
# - Provide options to control how Geant4 libraries are built
72-
include(Geant4LibraryBuildOptions)
73-
74-
# - Provide interface to control use of optional components
75-
include(Geant4OptionalComponents)
76-
77-
# - Provide interface to control use of UI/Vis components
78-
# Written in a separate module from other optional components because
79-
# there are many complex options to handle.
80-
include(Geant4InterfaceOptions)
81-
82-
# - Provide options to enable wrapping of Geant4 by other languages
83-
include(Geant4Wrapping)
84-
85-
#-----------------------------------------------------------------------
86-
# Add the source and environments subdirectories
87-
# source : Process all the Geant4 core targets
88-
# environments : Process optional wrappings of Geant4 (NOTYETIMPLEMENTED)
89-
add_subdirectory(source)
90-
#add_subdirectory(environments)
91-
92-
#-----------------------------------------------------------------------
93-
# - Perform all post build tasks
94-
# At the CMake level, this simply means that we must know about targets
95-
# and other properties processed in source and environments trees before
96-
# these tasks can be performed.
97-
#
98-
# - Installation of optional read-only architecture independent data files.
99-
# E.g. Examples, data libraries, documentation.
100-
# Done before toolchain generation because it may affect what we have to do
101-
# there!
102-
#
103-
include(Geant4InstallData)
104-
105-
# - Generate any Use/Config/Support files here once everything else has
106-
# been processed e.g. "UseGeant4.cmake", "Geant4Config.cmake", library
107-
# dependencies etc.
108-
# - Geant4Make
109-
include(Geant4ToolchainBackwardCompatibility)
110-
111-
# - 'geant4-config'
112-
include(Geant4ConfigureConfigScript)
113-
114-
# - Geant4Config.cmake
115-
include(Geant4BuildProjectConfig)
116-
117-
#-----------------------------------------------------------------------
118-
# - Testing configuration.
119-
# Done here, as projects under 'tests' require Geant4Config.
120-
if(GEANT4_ENABLE_TESTING)
121-
include(Geant4CTest)
122-
add_subdirectory(tests)
123-
if(EXISTS ${CMAKE_SOURCE_DIR}/benchmarks)
124-
add_subdirectory(benchmarks)
125-
endif()
126-
endif()
127-
128-
#-----------------------------------------------------------------------
129-
# - Examples build/install
130-
# NB: Build of examples is a *testing* proceedure. It is *not* intended
131-
# that examples be built and installed as part of a full Geant4 install.
132-
if(GEANT4_BUILD_EXAMPLES)
133-
set(Geant4_DIR ${CMAKE_BINARY_DIR} CACHE PATH "Current build directory")
134-
add_subdirectory(examples)
135-
endif()
136-
137-
# - Install example code to datarootdir
138-
install(DIRECTORY examples
139-
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Geant4-${Geant4_VERSION}
140-
COMPONENT Examples
141-
PATTERN "CVS" EXCLUDE
142-
PATTERN ".svn" EXCLUDE
143-
)
144-
145-
#-----------------------------------------------------------------------
146-
# - CPack-aging
147-
include(Geant4CPackBase)
148-
149-
#-----------------------------------------------------------------------
150-
# Final output - show what's been enabled so that user knows what's
151-
# happening - also useful for later problem solving!
53+
# - Include CMake category main module
54+
# Factored into category for convenience in tagging
15255
#
153-
GEANT4_PRINT_ENABLED_FEATURES()
56+
include(G4CMakeMain)
15457

0 commit comments

Comments
 (0)