Import Geant4 10.6.0 source tree
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
# add teting
|
||||
|
||||
add_test(test01 python test.py)
|
||||
configure_file(test.py test.py)
|
||||
|
||||
if (${PYTHON_VERSION_MAJOR} MATCHES "2")
|
||||
configure_file(test.py test.py)
|
||||
elseif (${PYTHON_VERSION_MAJOR} MATCHES "3")
|
||||
configure_file(python3/test.py test.py)
|
||||
endif()
|
||||
|
||||
set_property(TEST test01 PROPERTY ENVIRONMENT PYTHONPATH=./module)
|
||||
|
||||
@@ -20,8 +20,7 @@ set_target_properties(${_TARGET} PROPERTIES OUTPUT_NAME "test01")
|
||||
set_target_properties(${_TARGET} PROPERTIES SUFFIX ".so")
|
||||
|
||||
|
||||
target_link_libraries (${_TARGET} boost_python ${PYTHON_LIBRARIES})
|
||||
target_link_libraries (${_TARGET} ${BOOST_PYTHON_LIB} ${PYTHON_LIBRARIES})
|
||||
|
||||
# install
|
||||
install(TARGETS ${_TARGET} LIBRARY DESTINATION ${TEST_MODULES_INSTALL_DIR})
|
||||
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/python3
|
||||
# ==================================================================
|
||||
# python script for Geant4Py test
|
||||
#
|
||||
#
|
||||
# ==================================================================
|
||||
import test01
|
||||
|
||||
print("importing created module...\n")
|
||||
|
||||
a= test01.AClass()
|
||||
b= test01.AClass(0)
|
||||
c= test01.AClass(1, 1.)
|
||||
|
||||
print(" >>a<<", a.AMethod())
|
||||
print(" >>b<<", b.AMethod())
|
||||
print(" >>c<<", c.AMethod())
|
||||
Reference in New Issue
Block a user