Warning, /geant4/examples/extended/parallel/MPI/exMPI03/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 #----------------------------------------------------------------------------
0002 # Create a new project level to avoid name clashes with other exMPI0N
0003 project(exMPI03)
0004
0005 #----------------------------------------------------------------------------
0006 # Locate sources and headers for this project
0007 #
0008 file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
0009 file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
0010
0011 #----------------------------------------------------------------------------
0012 # Add the executable, and link it to the Geant4 libraries
0013 #
0014 add_executable(exMPI03 exMPI03.cc ${sources} ${headers})
0015 target_include_directories(exMPI03 PRIVATE include)
0016 target_link_libraries(exMPI03 ${Geant4_LIBRARIES} G4mpi::G4mpi)
0017
0018 #----------------------------------------------------------------------------
0019 # Copy all scripts to the build directory, i.e. the directory in which we
0020 # build exMPI03. This is so that we can run the executable directly because it
0021 # relies on these scripts being in the current working directory.
0022 #
0023 set(exMPI03_SCRIPTS
0024 run.mac
0025 vis.mac
0026 )
0027
0028 foreach(_script ${exMPI03_SCRIPTS})
0029 configure_file(
0030 ${PROJECT_SOURCE_DIR}/${_script}
0031 ${PROJECT_BINARY_DIR}/${_script}
0032 COPYONLY
0033 )
0034 endforeach()
0035