Import Geant4 10.6.2 source tree

This commit is contained in:
Gabriele Cosmo
2020-05-29 14:54:29 +02:00
parent 8c87fe78c4
commit c02c370437
448 changed files with 23779 additions and 31516 deletions
+4 -20
View File
@@ -1,9 +1,5 @@
# - build library
# library
set(_TARGET pyG4global)
add_library(
${_TARGET} SHARED
# - Module
geant4_add_pymodule(pyG4global
G4PyCoutDestination.cc
pyG4ApplicationState.cc
pyG4Exception.cc
@@ -27,17 +23,5 @@ add_library(
pymodG4global.cc
)
set_target_properties(${_TARGET} PROPERTIES PREFIX "")
set_target_properties(${_TARGET} PROPERTIES OUTPUT_NAME "G4global")
set_target_properties(${_TARGET} PROPERTIES SUFFIX ".so")
set_target_properties(${_TARGET}
PROPERTIES INSTALL_RPATH
${GEANT4_LIBRARY_DIR}
BUILD_WITH_INSTALL_RPATH TRUE)
target_link_libraries (${_TARGET}
${GEANT4_LIBRARIES_WITH_VIS} ${BOOST_PYTHON_LIB}
${PYTHON_LIBRARIES})
# install
install(TARGETS ${_TARGET} LIBRARY DESTINATION ${G4MODULES_INSTALL_DIR})
target_link_libraries(pyG4global PRIVATE G4global G4track pyG4Boost)
install(TARGETS pyG4global DESTINATION "${CMAKE_INSTALL_PYTHONDIR}/Geant4")
@@ -30,6 +30,8 @@
// ====================================================================
#include <boost/python.hpp>
#include "G4UserLimits.hh"
// Needed to avoid "incomplete type" error on G4Track
#include "G4Track.hh"
using namespace boost::python;
+3 -3
View File
@@ -40,15 +40,15 @@
using namespace boost::python;
extern G4strstreambuf G4coutbuf;
extern G4strstreambuf G4cerrbuf;
//extern G4strstreambuf G4coutbuf;
//extern G4strstreambuf G4cerrbuf;
namespace pyglobals {
// G4cout/cerr are set to Python stdout
void SetG4PyCoutDestination()
{
G4UImanager* UImgr= G4UImanager::GetUIpointer();
G4UImanager::GetUIpointer();
G4PyCoutDestination* pycout= new G4PyCoutDestination();
G4coutbuf.SetDestination(pycout);
G4cerrbuf.SetDestination(pycout);