diff --git a/Geant4/G4config/doc/release.notes b/Geant4/G4config/doc/release.notes index 325affe01311e3ea85be019f2b5bac5e435fd877..7456d84ef281b50da2b78ff145e14a32eeef67b0 100755 --- a/Geant4/G4config/doc/release.notes +++ b/Geant4/G4config/doc/release.notes @@ -4,6 +4,9 @@ ! Purpose : Configuration package for Geant4 build !----------------------------------------------------------------------------- +! 2015-10-13 - Marco Clemencic + - Fixed build of the selected examples. + ! 2015-09-09 - Marco Clemencic - Fixed ccache (and custom launchers) support in CMake build. - Use the same C++ standard as Gaudi in CMake builds. @@ -20,7 +23,7 @@ ! ======================= G4config v96r3p0 2015-05-11 ======================== ! 2015-05-12 - Timothy Williams - Updated copy_examples_source.csh to copy private sources for TestEm5 - + ! 2015-05-11 - Timothy Williams - Added execution of srcnew copying to copy_examples_source.csh diff --git a/Geant4/G4config/patches/geant4.cmake.patch b/Geant4/G4config/patches/geant4.cmake.patch index 896a6b3eefa24c16bf9ed643e70ad99a3df17242..f83ec947cfa83d05d0a68df747a241eb6d56c2ce 100644 --- a/Geant4/G4config/patches/geant4.cmake.patch +++ b/Geant4/G4config/patches/geant4.cmake.patch @@ -190,7 +190,7 @@ diff -urN a/geant4.9.6.p04/cmake/Templates/Geant4Config.cmake.in b/geant4.9.6.p0 G4RayTracer${_geant4_lib_use_suffix} G4VRML${_geant4_lib_use_suffix} ) -@@ -413,13 +411,14 @@ +@@ -413,13 +411,15 @@ list(APPEND _geant4_internal_libraries G4vis_management${_geant4_lib_use_suffix} G4modeling${_geant4_lib_use_suffix} @@ -205,6 +205,7 @@ diff -urN a/geant4.9.6.p04/cmake/Templates/Geant4Config.cmake.in b/geant4.9.6.p0 G4readout${_geant4_lib_use_suffix} - G4physicslists${_geant4_lib_use_suffix} + G4physics_lists${_geant4_lib_use_suffix} ++ G4LHCblists${_geant4_lib_use_suffix} G4run${_geant4_lib_use_suffix} G4event${_geant4_lib_use_suffix} G4tracking${_geant4_lib_use_suffix} @@ -747,3 +748,31 @@ diff -urN a/geant4.9.6.p04/source/visualization/OpenInventor/sources.cmake b/gea G4materials G4modeling G4tracking +--- a/geant4.9.6.p04/examples/extended/electromagnetic/TestEm5/CMakeLists.txt 2015-02-04 10:01:02.000000001 +0100 ++++ b/geant4.9.6.p04/examples/extended/electromagnetic/TestEm5/CMakeLists.txt 2015-10-13 14:12:01.000000001 +0200 +@@ -20,11 +20,14 @@ + # + include(${Geant4_USE_FILE}) + ++find_package(ROOT REQUIRED Hist Gpad) ++ + #---------------------------------------------------------------------------- + # Locate sources and headers for this project + # +-include_directories(${PROJECT_SOURCE_DIR}/include +- ${Geant4_INCLUDE_DIR}) ++include_directories(${PROJECT_SOURCE_DIR}/include ++ ${Geant4_INCLUDE_DIR} ++ ${ROOT_INCLUDE_DIR}) + file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc) + file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh) + +@@ -32,7 +35,7 @@ + # Add the executable, and link it to the Geant4 libraries + # + add_executable(TestEm5 TestEm5.cc ${sources} ${headers}) +-target_link_libraries(TestEm5 ${Geant4_LIBRARIES} ) ++target_link_libraries(TestEm5 ${Geant4_LIBRARIES} ${ROOT_LIBRARIES}) + + #---------------------------------------------------------------------------- + # Copy all scripts to the build directory, i.e. the directory in which we diff --git a/Geant4/G4config/patches/patch_g4_sources.py b/Geant4/G4config/patches/patch_g4_sources.py index c82d6c174837ee482ba44834b23dca84198780c6..0b498d4de28a501caf78297d5366ea4f402df9a3 100644 --- a/Geant4/G4config/patches/patch_g4_sources.py +++ b/Geant4/G4config/patches/patch_g4_sources.py @@ -45,7 +45,7 @@ copydir(join(root_dir, 'Geant4', 'G4LHCblists', 'src'), # replace fixed files fixes_root = join(root_dir, 'Geant4', 'G4processes', 'srcnew') -fixes_dst_root = join('source', 'processes', 'hadronic') +fixes_dst_root = join('source', 'processes', 'hadronic') # (fixes is a list of pairs, src+dst) fixes = [(join('cross_sections', 'G4ElectroNuclearCrossSection.cc'), join(fixes_dst_root, 'cross_sections', 'src'))] for src, dst in fixes: @@ -60,3 +60,13 @@ for src, dst in fixes: copydir(join(script_dir, 'cmake', 'Modules'), join('cmake', 'Modules')) +# patches to examples +for proc_type, ex_name, patch_map in [('electromagnetic', 'TestEm3', [('srcnew', 'src')]), + ('electromagnetic', 'TestEm5', [('incnew', 'include'), + ('srcnew', '.')])]: + for patches, orig in patch_map: + src = join(root_dir, 'Geant4', 'G4examples', 'extended', proc_type, 'G4' + ex_name, patches) + dst = join('examples', 'extended', proc_type, ex_name, orig) + #print src, dst + if exists(src): + copydir(src, dst)