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
+3 -25
View File
@@ -1,30 +1,8 @@
# - build library
if(GEANT4_HAS_GDML)
add_definitions(-DENABLE_GDML)
endif()
include_directories (${XERCESC_INCLUDE_DIRS})
# library
set(_TARGET pyG4gdml)
add_library(
${_TARGET} SHARED
geant4_add_pymodule(pyG4gdml
pyG4GDMLParser.cc
pymodG4g4gdml.cc
)
set_target_properties(${_TARGET} PROPERTIES PREFIX "")
set_target_properties(${_TARGET} PROPERTIES OUTPUT_NAME "G4gdml")
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} ${XERCESC_LIBRARY}
${BOOST_PYTHON_LIB} ${PYTHON_LIBRARIES})
# install
install(TARGETS ${_TARGET} LIBRARY DESTINATION ${G4MODULES_INSTALL_DIR})
target_link_libraries(pyG4gdml PRIVATE G4persistency)
install(TARGETS pyG4gdml DESTINATION "${CMAKE_INSTALL_PYTHONDIR}/Geant4")
@@ -28,7 +28,6 @@
//
// 2007 Q
// ====================================================================
#ifdef ENABLE_GDML
#include <boost/python.hpp>
#include "G4GDMLParser.hh"
@@ -43,21 +42,21 @@ using namespace boost::python;
// ====================================================================
namespace pyG4GDMLParser {
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_GetWorldVolume,
GetWorldVolume, 0, 1);
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_GetWorldVolume,
GetWorldVolume, 0, 1)
void (G4GDMLParser::*f1_Write)
(const G4String&, const G4VPhysicalVolume*, G4bool,
(const G4String&, const G4VPhysicalVolume*, G4bool,
const G4String&) = &G4GDMLParser::Write;
void (G4GDMLParser::*f2_Write)
(const G4String&, const G4LogicalVolume*, G4bool,
const G4String&) = &G4GDMLParser::Write;
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(g_Write, Write, 2, 4);
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_Read, Read, 1, 2);
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_ReadModule, ReadModule, 1, 2);
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_Write, Write, 1, 4);
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(g_Write, Write, 2, 4)
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_Read, Read, 1, 2)
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_ReadModule, ReadModule, 1, 2)
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_Write, Write, 1, 4)
}
@@ -83,4 +82,3 @@ void export_G4GDMLParser()
;
}
#endif
@@ -36,14 +36,10 @@ using namespace boost::python;
// module definition
// ====================================================================
#ifdef ENABLE_GDML
void export_G4GDMLParser();
#endif
BOOST_PYTHON_MODULE(G4gdml)
{
#ifdef ENABLE_GDML
export_G4GDMLParser();
#endif
}