Skip to content
Snippets Groups Projects
Commit 720779c8 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Fixed build of the selected examples.

parent 8261d889
Branches
Tags
No related merge requests found
......@@ -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.
......
......@@ -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
......@@ -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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment