Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/basic/B3/B3a/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 #----------------------------------------------------------------------------
0002 # Setup the project
0003 #
0004 cmake_minimum_required(VERSION 3.16...3.27)
0005 project(B3a)
0006 
0007 #----------------------------------------------------------------------------
0008 # Find Geant4 package, activating all available UI and Vis drivers by default
0009 # See the documentation for a guide on how to enable/disable specific components
0010 #
0011 find_package(Geant4 REQUIRED ui_all vis_all)
0012 
0013 #----------------------------------------------------------------------------
0014 # Locate sources and headers for this project
0015 # NB: headers are included so they will show up in IDEs
0016 #
0017 file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
0018 file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
0019 
0020 #----------------------------------------------------------------------------
0021 # Add the executable, use our local headers, and link it to the Geant4 libraries
0022 #
0023 add_executable(exampleB3a exampleB3a.cc ${sources} ${headers})
0024 target_include_directories(exampleB3a PRIVATE include)
0025 target_link_libraries(exampleB3a PRIVATE ${Geant4_LIBRARIES})
0026 
0027 #----------------------------------------------------------------------------
0028 # Copy all scripts to the build directory, i.e. the directory in which we
0029 # build B3a. This is so that we can run the executable directly because it
0030 # relies on these scripts being in the current working directory.
0031 #
0032 set(EXAMPLEB3_SCRIPTS
0033   debug.mac
0034   exampleB3.in
0035   exampleB3.out
0036   init_vis.mac
0037   run1.mac
0038   run2.mac
0039   vis.mac
0040   )
0041 
0042 foreach(_script ${EXAMPLEB3_SCRIPTS})
0043   configure_file(
0044     ${PROJECT_SOURCE_DIR}/${_script}
0045     ${PROJECT_BINARY_DIR}/${_script}
0046     COPYONLY
0047     )
0048 endforeach()