Import Geant4 10.0.0 source tree
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
# - add libs components
|
||||
|
||||
if (${PYTHON_VERSION_MAJOR} MATCHES "2")
|
||||
add_subdirectory(emcalculator)
|
||||
elseif (${PYTHON_VERSION_MAJOR} MATCHES "3")
|
||||
add_subdirectory(emcalculator/python3)
|
||||
endif()
|
||||
@@ -1,5 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.1 2008-12-01 07:04:08 kmura Exp $
|
||||
# $Name: not supported by cvs2svn $
|
||||
# $Id: GNUmakefile 76884 2013-11-18 12:54:03Z gcosmo $
|
||||
# ===========================================================
|
||||
# Makefile for building Geant4Py site-modules
|
||||
# ===========================================================
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
# - build library
|
||||
|
||||
file (GLOB PY_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.py)
|
||||
|
||||
foreach (_pyfile ${PY_FILES})
|
||||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/${_pyfile}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${_pyfile} COPYONLY)
|
||||
list (APPEND PYC_FILES "${CMAKE_CURRENT_BINARY_DIR}/${_pyfile}c")
|
||||
list (APPEND PYO_FILES "${CMAKE_CURRENT_BINARY_DIR}/${_pyfile}o")
|
||||
endforeach()
|
||||
|
||||
add_custom_target (emcalculator ALL)
|
||||
|
||||
add_custom_command (
|
||||
TARGET emcalculator
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
ARGS -m compileall -f ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
ARGS -O -m compileall -f ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
# install
|
||||
|
||||
install (FILES ${PY_FILES} DESTINATION ${G4SITEMODULES_INSTALL_DIR})
|
||||
install (FILES ${PYC_FILES} DESTINATION ${G4SITEMODULES_INSTALL_DIR})
|
||||
install (FILES ${PYO_FILES} DESTINATION ${G4SITEMODULES_INSTALL_DIR})
|
||||
@@ -1,5 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.3 2010-12-02 08:34:07 kmura Exp $
|
||||
# $Name: not supported by cvs2svn $
|
||||
# $Id: GNUmakefile 76884 2013-11-18 12:54:03Z gcosmo $
|
||||
# ===========================================================
|
||||
# Makefile for building Geant4Py modules
|
||||
# ===========================================================
|
||||
@@ -14,7 +13,7 @@ ifeq ($(Q_WITH_PYTHON3), 0)
|
||||
|
||||
else
|
||||
|
||||
.PHONY: all install clean
|
||||
.PHONY: all install clean
|
||||
|
||||
all:
|
||||
@cd python3 && $(MAKE)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#$Id: emcalculator.py,v 1.1 2008-12-01 07:04:08 kmura Exp $
|
||||
#$Id: emcalculator.py 66892 2013-01-17 10:57:59Z gunter $
|
||||
"""
|
||||
# ==================================================================
|
||||
# Python module
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
# - build library
|
||||
|
||||
file (GLOB PY_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.py)
|
||||
|
||||
foreach (_pyfile ${PY_FILES})
|
||||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/${_pyfile}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${_pyfile} COPYONLY)
|
||||
list (APPEND PYC_FILES "${CMAKE_CURRENT_BINARY_DIR}/${_pyfile}c")
|
||||
list (APPEND PYO_FILES "${CMAKE_CURRENT_BINARY_DIR}/${_pyfile}o")
|
||||
endforeach()
|
||||
|
||||
add_custom_target (emcalculator ALL)
|
||||
|
||||
add_custom_command (
|
||||
TARGET emcalculator
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
ARGS -m compileall -f ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
ARGS -O -m compileall -f ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
# install
|
||||
|
||||
install (FILES ${PY_FILES} DESTINATION ${G4SITEMODULES_INSTALL_DIR})
|
||||
install (FILES ${PYC_FILES} DESTINATION ${G4SITEMODULES_INSTALL_DIR})
|
||||
install (FILES ${PYO_FILES} DESTINATION ${G4SITEMODULES_INSTALL_DIR})
|
||||
@@ -1,5 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.1 2010-12-02 08:43:22 kmura Exp $
|
||||
# $Name: not supported by cvs2svn $
|
||||
# $Id: GNUmakefile 76884 2013-11-18 12:54:03Z gcosmo $
|
||||
# ===========================================================
|
||||
# Makefile for building Geant4Py modules
|
||||
# ===========================================================
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#$Id: emcalculator.py,v 1.1 2010-12-02 08:43:22 kmura Exp $
|
||||
#$Id: emcalculator.py 66892 2013-01-17 10:57:59Z gunter $
|
||||
"""
|
||||
# ==================================================================
|
||||
# Python module (Python3)
|
||||
|
||||
Reference in New Issue
Block a user