From 27bde9b3255466afa921890fe624984ea01950be Mon Sep 17 00:00:00 2001
From: Markus Frank <Markus.Frank@cern.ch>
Date: Tue, 20 Jun 2017 11:58:50 +0200
Subject: [PATCH] Fix compiler warnings (shadow and include-hygiene)

---
 DDCore/CMakeLists.txt | 3 ++-
 DDEve/CMakeLists.txt  | 4 ++--
 DDG4/CMakeLists.txt   | 7 ++++---
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/DDCore/CMakeLists.txt b/DDCore/CMakeLists.txt
index 83273c359..109b0f28c 100644
--- a/DDCore/CMakeLists.txt
+++ b/DDCore/CMakeLists.txt
@@ -18,7 +18,8 @@ dd4hep_package(    DDCore
 
 #---Generate ROOT dictionary------------------------------------------------------
 dd4hep_add_dictionary( G__DD4hep
-  SOURCES include/DD4hep/*.h 
+  SOURCES include/ROOT/Warnings.h
+  include/DD4hep/*.h 
   include/DD4hep/detail/*.h 
   include/XML/*.h 
   ${DDSegmentation_INCLUDE_DIRS}/DDSegmentation/BitField64.h
diff --git a/DDEve/CMakeLists.txt b/DDEve/CMakeLists.txt
index a9bbaa1a5..5f8799046 100644
--- a/DDEve/CMakeLists.txt
+++ b/DDEve/CMakeLists.txt
@@ -15,7 +15,7 @@ dd4hep_package(    DDEve
 #
 #---Add Plugin Library-----------------------------------------------------
 dd4hep_add_dictionary ( G__DDEve
-  SOURCES include/DDEve/*.h
+  SOURCES ${DDCore_INCLUDE_DIRS}/include/ROOT/Warnings.h include/DDEve/*.h
   LINKDEF ${DDCore_INCLUDE_DIRS}/include/ROOT/LinkDef.h
   )
 #
@@ -25,7 +25,7 @@ dd4hep_add_plugin ( DDEve SOURCES src/*.cpp
 
 if(DD4HEP_USE_GEANT4)
   dd4hep_add_dictionary ( G__DDG4IO
-    SOURCES DDEve/DDG4IO.C
+    SOURCES ${DDCore_INCLUDE_DIRS}/include/ROOT/Warnings.h DDEve/DDG4IO.C
     LINKDEF ${DDCore_INCLUDE_DIRS}/include/ROOT/LinkDef.h
     OPTIONAL DDG4
     )
diff --git a/DDG4/CMakeLists.txt b/DDG4/CMakeLists.txt
index e94633d29..99440da5e 100644
--- a/DDG4/CMakeLists.txt
+++ b/DDG4/CMakeLists.txt
@@ -20,7 +20,7 @@ dd4hep_add_package_library(DDG4 SOURCES src/*.cpp )
 dd4hep_add_plugin(DDG4Legacy    SOURCES legacy/*.cpp)
 #-----------------------------------------------------------------------------------
 dd4hep_add_dictionary( G__DDG4
-  SOURCES python/DDG4Dict.C
+  SOURCES ${DDCore_INCLUDE_DIRS}/include/ROOT/Warnings.h python/DDG4Dict.C
   LINKDEF ${DDCore_INCLUDE_DIRS}/include/ROOT/LinkDef.h
   )
 #---------------------------  Plugin library for the simulation framework  ---------
@@ -30,12 +30,13 @@ dd4hep_add_plugin(DDG4Plugins
   )
 #---------------------------  Plugin library for the simulation framework  ---------
 dd4hep_add_dictionary(G__DDG4Python
-  SOURCES src/python/DDG4Python.C
+  SOURCES ${DDCore_INCLUDE_DIRS}/include/ROOT/Warnings.h src/python/DDG4Python.C
   LINKDEF ${DDCore_INCLUDE_DIRS}/include/ROOT/LinkDef.h
   OPTIONAL    [PYTHON REQUIRED]
   )
 #---------------------------  Plugin library for the simulation framework  ---------
-dd4hep_add_dictionary(G__DDPython SOURCES tpython/DDPython.C
+dd4hep_add_dictionary(G__DDPython
+  SOURCES ${DDCore_INCLUDE_DIRS}/include/ROOT/Warnings.h tpython/DDPython.C
   LINKDEF ${DDCore_INCLUDE_DIRS}/include/ROOT/LinkDef.h
   OPTIONAL    [PYTHON REQUIRED]
   )
-- 
GitLab