Import Geant4 11.0.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2021-06-25 16:12:29 +02:00
parent c968e26a39
commit 6399a014b6
4200 changed files with 207479 additions and 237366 deletions
+40 -43
View File
@@ -104,11 +104,17 @@ endfunction()
#-----------------------------------------------------------------------
# Only create script if we have a global library build...
#
if(NOT GEANT4_BUILD_GRANULAR_LIBS AND UNIX)
#if(NOT GEANT4_BUILD_GRANULAR_LIBS AND UNIX)
if(NOT GEANT4_BUILD_GRANULAR_LIBS)
# Get implicit search paths
get_system_include_dirs(_cxx_compiler_dirs)
# Setup variables needed for expansion in configuration file
# - C++ Filesystem, if needed
if(GEANT4_CXX_FILESYSTEM_LIBRARY)
set(G4_LINK_CXX_FILESYSTEM "-l${GEANT4_CXX_FILESYSTEM_LIBRARY}")
endif()
# - Static libs
if(BUILD_STATIC_LIBS)
set(G4_BUILTWITH_STATICLIBS "yes")
@@ -255,20 +261,6 @@ if(NOT GEANT4_BUILD_GRANULAR_LIBS AND UNIX)
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")
@@ -337,34 +329,20 @@ if(NOT GEANT4_BUILD_GRANULAR_LIBS AND UNIX)
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
)
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()
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
)
# - Install Tree
# Much easier :-)
@@ -407,5 +385,24 @@ if(NOT GEANT4_BUILD_GRANULAR_LIBS AND UNIX)
WORLD_READ WORLD_EXECUTE
COMPONENT Development
)
endif()
# Win32 helper file geant4-config.cmd
if(WIN32)
# No configuration just a copy
configure_file(
${CMAKE_SOURCE_DIR}/cmake/Templates/geant4-config-cmd.in
${PROJECT_BINARY_DIR}/InstallTreeFiles/geant4-config.cmd
@ONLY
)
# Install helper
install(FILES ${PROJECT_BINARY_DIR}/InstallTreeFiles/geant4-config.cmd
DESTINATION ${CMAKE_INSTALL_BINDIR}
PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
COMPONENT Development
)
endif()
endif()