Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DD4hep
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eic_tools
DD4hep
Commits
057a3be9
Commit
057a3be9
authored
5 years ago
by
Andre Sailer
Committed by
Marko Petric
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
PyROOT: adapt to new root python call ROOTTPython
parent
5a6f8f85
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
DDCore/CMakeLists.txt
+3
-3
3 additions, 3 deletions
DDCore/CMakeLists.txt
DDG4/CMakeLists.txt
+4
-5
4 additions, 5 deletions
DDG4/CMakeLists.txt
cmake/DD4hepBuild.cmake
+7
-0
7 additions, 0 deletions
cmake/DD4hepBuild.cmake
with
14 additions
and
8 deletions
DDCore/CMakeLists.txt
+
3
−
3
View file @
057a3be9
...
...
@@ -104,15 +104,15 @@ ELSE()
ENDIF
()
#--------------------------- Specialized PYTHON plugin ----------------------------
IF
(
TARGET
ROOT::PyROOT
)
IF
(
TARGET
${
DD4HEP_ROOT_PYTHON
}
)
dd4hep_add_plugin
(
DDPythonPlugins
SOURCES src/python/*.cpp
USES DDCore ROOT::Core
ROOT::PyROOT
USES DDCore ROOT::Core
${
DD4HEP_ROOT_PYTHON
}
)
set_target_properties
(
DDPythonPlugins PROPERTIES VERSION
${
DD4hep_VERSION
}
SOVERSION
${
DD4hep_SOVERSION
}
)
LIST
(
APPEND OPTIONAL_TARGETS DDPythonPlugins
)
ELSE
()
dd4hep_print
(
"ROOT does not include Py
Roo
t, not building DDCore DDPython Plugins"
)
dd4hep_print
(
"ROOT does not include Py
thon suppor
t, not building DDCore DDPython Plugins"
)
ENDIF
()
# install python files
...
...
This diff is collapsed.
Click to expand it.
DDG4/CMakeLists.txt
+
4
−
5
View file @
057a3be9
...
...
@@ -49,8 +49,7 @@ dd4hep_add_plugin(DDG4Plugins
)
#--------------------------- Plugin library for the simulation framework ---------
if
(
TARGET Python::Python AND TARGET ROOT::PyROOT
)
if
(
TARGET Python::Python AND TARGET
${
DD4HEP_ROOT_PYTHON
}
)
dd4hep_print
(
"|++> Python found, creating DDG4Python Dictionary"
)
dd4hep_add_dictionary
(
G__DDG4Python
SOURCES src/python/DDG4Python.C
...
...
@@ -64,7 +63,7 @@ if(TARGET Python::Python AND TARGET ROOT::PyROOT)
dd4hep_print
(
"|++> ROOT Has Python, creating DDPython library and plugins"
)
add_library
(
DDPython G__DDPython.cxx tpython/DDPython.cpp
)
add_library
(
DD4hep::DDPython ALIAS DDPython
)
target_link_libraries
(
DDPython DD4hep::DDG4 ROOT::Core Python::Python
ROOT::PyROOT
)
target_link_libraries
(
DDPython DD4hep::DDG4 ROOT::Core Python::Python
${
DD4HEP_ROOT_PYTHON
}
)
IF
(
${
CMAKE_CXX_STANDARD
}
GREATER 16
)
# python header not cxx17 compatible, gives error in clang
target_compile_options
(
DDPython PUBLIC -Wno-register
)
...
...
@@ -76,7 +75,7 @@ if(TARGET Python::Python AND TARGET ROOT::PyROOT)
)
#---Helper to overcome deficiency of the python executable concerning multi-threading
add_executable
(
pyddg4 pyddg4.cpp
)
target_link_libraries
(
pyddg4 PUBLIC DD4hep::DDPython ROOT::Core
ROOT::PyROOT
)
target_link_libraries
(
pyddg4 PUBLIC DD4hep::DDPython ROOT::Core
${
DD4HEP_ROOT_PYTHON
}
)
# install these libraries
set_target_properties
(
DDPython DDG4Python PROPERTIES VERSION
${
DD4hep_VERSION
}
SOVERSION
${
DD4hep_SOVERSION
}
)
...
...
@@ -84,7 +83,7 @@ if(TARGET Python::Python AND TARGET ROOT::PyROOT)
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
else
()
dd4hep_print
(
"|+++++> Python or PyR
OOT
not found, not creating DDG4 Python Dictionaries"
)
dd4hep_print
(
"|+++++> Python or PyR
oot/ROOTTPython
not found, not creating DDG4 Python Dictionaries"
)
endif
()
#--------------------------- Plugin library for the simulation framework ---------
...
...
This diff is collapsed.
Click to expand it.
cmake/DD4hepBuild.cmake
+
7
−
0
View file @
057a3be9
...
...
@@ -654,6 +654,13 @@ macro(DD4HEP_SETUP_ROOT_TARGETS)
ENDIF
()
ENDIF
()
# root python changes target name in 6.22
IF
(
TARGET ROOT::PyROOT
)
SET
(
DD4HEP_ROOT_PYTHON ROOT::PyROOT
)
ELSEIF
(
TARGET ROOT::ROOTTPython
)
# New "pyroot" in 6.22
SET
(
DD4HEP_ROOT_PYTHON ROOT::ROOTTPython
)
ENDIF
()
#ROOT CXX Flags are a string with quotes, not a list, so we need to convert to a list...
string
(
REPLACE
" "
";"
DD4HEP_ROOT_CXX_FLAGS
${
ROOT_CXX_FLAGS
}
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment