diff options
author | Hadrien G <knights_of_ni@gmx.com> | 2020-02-12 02:17:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-11 17:17:05 -0800 |
commit | 947dabc35688a658f0be45e924d4a5cc0a0fd496 (patch) | |
tree | 7ff335f072d27fe116b5c029b7bde3c879691ad0 /var | |
parent | 2c63ea49d1130a6f668c7b449f5f63adffe8d72a (diff) | |
download | spack-947dabc35688a658f0be45e924d4a5cc0a0fd496.tar.gz spack-947dabc35688a658f0be45e924d4a5cc0a0fd496.tar.bz2 spack-947dabc35688a658f0be45e924d4a5cc0a0fd496.tar.xz spack-947dabc35688a658f0be45e924d4a5cc0a0fd496.zip |
[dd4hep] Make DDDigi work with current TBB releases (#14791)
Add patch for DDDigi's broken TBB support. The issue is fixed in
DD4hep master so the patch is only required for 1.11.0
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/dd4hep/package.py | 4 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/dd4hep/tbb-workarounds.patch | 41 |
2 files changed, 45 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/dd4hep/package.py b/var/spack/repos/builtin/packages/dd4hep/package.py index 46d64b9a82..6fd63f76c6 100644 --- a/var/spack/repos/builtin/packages/dd4hep/package.py +++ b/var/spack/repos/builtin/packages/dd4hep/package.py @@ -22,6 +22,10 @@ class Dd4hep(CMakePackage): version('1.11.0', commit='280c7d748d56a704699408ac8e57815d029b169a') version('1.10.0', commit='9835d1813c07d9d5850d1e68276c0171d1726801') + # Workarounds for various TBB issues in DD4hep v1.11 + # See https://github.com/AIDASoft/DD4hep/pull/613 . + patch('tbb-workarounds.patch', when='@1.11.0') + variant('xercesc', default=False, description="Enable 'Detector Builders' based on XercesC") variant('geant4', default=False, description="Enable the simulation part based on Geant4") variant('testing', default=False, description="Enable and build tests") diff --git a/var/spack/repos/builtin/packages/dd4hep/tbb-workarounds.patch b/var/spack/repos/builtin/packages/dd4hep/tbb-workarounds.patch new file mode 100644 index 0000000000..6592329774 --- /dev/null +++ b/var/spack/repos/builtin/packages/dd4hep/tbb-workarounds.patch @@ -0,0 +1,41 @@ +diff --git a/DDDigi/CMakeLists.txt b/DDDigi/CMakeLists.txt +index e6fb1096..88eb5c92 100644 +--- a/DDDigi/CMakeLists.txt ++++ b/DDDigi/CMakeLists.txt +@@ -34,12 +34,10 @@ target_include_directories(DDDigi + + FIND_PACKAGE(TBB QUIET) + if(TBB_FOUND) +- dd4hep_print( "|++> TBB_INCLUDE_DIR --> ${TBB_INCLUDE_DIR}") +- dd4hep_print( "|++> TBB_LIBRARY --> ${TBB_LIBRARY}") ++ dd4hep_print( "|++> TBB_IMPORTED_TARGETS --> ${TBB_IMPORTED_TARGETS}") + dd4hep_print( "|++> TBB found. DDDigi will run multi threaded.") + target_compile_definitions(DDDigi PUBLIC DD4HEP_USE_TBB) +- target_link_libraries(DDDigi ${TBB_LIBRARY}) +- target_include_directories(DDDigi ${TBB_INCLUDE_DIRS}) ++ target_link_libraries(DDDigi PUBLIC ${TBB_IMPORTED_TARGETS}) + else() + dd4hep_print( "|++> TBB not found. DDDigi will only work single threaded.") + endif() +diff --git a/DDDigi/src/DigiKernel.cpp b/DDDigi/src/DigiKernel.cpp +index d62c6694..f2c2e86c 100644 +--- a/DDDigi/src/DigiKernel.cpp ++++ b/DDDigi/src/DigiKernel.cpp +@@ -91,7 +91,7 @@ public: + DigiEventAction* action = 0; + Wrapper(DigiContext& c, DigiEventAction* a) + : context(c), action(a) {} +- Wrapper(Wrapper&& copy) = delete; ++ Wrapper(Wrapper&& copy) = default; + Wrapper(const Wrapper& copy) = default; + Wrapper& operator=(Wrapper&& copy) = delete; + Wrapper& operator=(const Wrapper& copy) = delete; +@@ -111,7 +111,7 @@ class DigiKernel::Processor { + DigiKernel& kernel; + public: + Processor(DigiKernel& k) : kernel(k) {} +- Processor(Processor&& l) = delete; ++ Processor(Processor&& l) = default; + Processor(const Processor& l) = default; + void operator()() const { + int todo = 1; |