From bb396360141323c64aee354ed0d3171d58f7722b Mon Sep 17 00:00:00 2001
From: Andre Sailer <andre.philippe.sailer@cern.ch>
Date: Wed, 17 Jul 2019 16:19:06 +0200
Subject: [PATCH] Python2.7 is not fully cxx17 compliant

---
 DDG4/CMakeLists.txt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/DDG4/CMakeLists.txt b/DDG4/CMakeLists.txt
index 7ea2d0351..c04dd021a 100644
--- a/DDG4/CMakeLists.txt
+++ b/DDG4/CMakeLists.txt
@@ -80,6 +80,10 @@ if(PYTHONLIBS_FOUND)
     add_library(DDPython SHARED G__DDPython.cxx tpython/DDPython.cpp)
     target_link_libraries(DDPython DDG4 ROOT::Core ${PYTHON_LIBRARIES} ROOT::PyROOT)
     target_include_directories(DDPython PUBLIC ${PYTHON_INCLUDE_DIRS})
+    IF(${CMAKE_CXX_STANDARD} GREATER 16)
+      # python header not cxx17 compatible, gives error in clang
+      target_compile_options(DDPython PUBLIC -Wno-register)
+    ENDIF()
     new_dd4hep_add_plugin(DDG4Python 
       SOURCES src/python/*.cpp G__DDG4Python.cxx
       LINK_LIBRARIES DDG4 DDPython
-- 
GitLab