diff --git a/DDCore/include/DD4hep/Dictionary.h b/DDCore/include/DD4hep/Dictionary.h index 3d23b48c8d9f052680c63cdf63d67c5af7eac053..0cdfe1d7e18a6c2b291233f8946b9de8ed7083d9 100644 --- a/DDCore/include/DD4hep/Dictionary.h +++ b/DDCore/include/DD4hep/Dictionary.h @@ -13,18 +13,9 @@ // Created by Pere Mato on 22/1/12. // //========================================================================== -// - #ifndef DD4HEP_GEOMETRY_DICTIONARY_H #define DD4HEP_GEOMETRY_DICTIONARY_H -// Disable some diagnostics for ROOT dictionaries -#ifdef __GNUC__ -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#pragma GCC diagnostic ignored "-Wdeprecated" -#pragma GCC diagnostic ignored "-Wunused" -#endif - // Framework include files #include "DDParsers/Evaluator.h" #include "DD4hep/DD4hepRootPersistency.h" diff --git a/DDCore/include/DD4hep/Memory.h b/DDCore/include/DD4hep/Memory.h index e05bb982d171227f7f93cf36af7ac659e8f93632..87eeb803807722bac64b5bad700b5b124a2ea7fa 100644 --- a/DDCore/include/DD4hep/Memory.h +++ b/DDCore/include/DD4hep/Memory.h @@ -20,8 +20,12 @@ #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" // Code that causes warning goes here +#elif defined(__llvm__) || defined(__APPLE__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" // Code that causes warning goes here #endif + // C/C++ include files #include <memory> @@ -81,6 +85,8 @@ namespace dd4hep { #ifdef __GNUC__ #pragma GCC diagnostic pop +#elif defined(__llvm__) || defined(__APPLE__) +#pragma clang diagnostic pop #endif #endif // DD4HEP_MEMORY_H diff --git a/DDCore/include/ROOT/LinkDef.h b/DDCore/include/ROOT/LinkDef.h index ebbf8f5b182c20b8dadf094f5147eda54a86f629..70b1e7ce66a51012ab669964a5327bcad0387e70 100644 --- a/DDCore/include/ROOT/LinkDef.h +++ b/DDCore/include/ROOT/LinkDef.h @@ -13,10 +13,10 @@ // // Created by Pere Mato on 22/1/12. // -// Keep this file EMPTY. All CINT statements can be put in header files preceeding this one..... +// Keep this file EMPTY. All CINT statements can be put in header files +// preceeding this one..... // - -#ifdef __GNUC__ +//========================================================================== //-------------------------------------------------------------------------- // These are the common warnings, which are generated by rootcling @@ -25,11 +25,16 @@ // // M.Frank //-------------------------------------------------------------------------- - +#if defined(__GNUC__) #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #pragma GCC diagnostic ignored "-Wdeprecated" #pragma GCC diagnostic ignored "-Wunused" #pragma GCC diagnostic ignored "-Woverlength-strings" -#endif +#elif defined(__llvm__) || defined(__APPLE__) +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +#pragma clang diagnostic ignored "-Wdeprecated" +#pragma clang diagnostic ignored "-Wunused" +#pragma clang diagnostic ignored "-Woverlength-strings" +#endif diff --git a/DDEve/CMakeLists.txt b/DDEve/CMakeLists.txt index 2fe3b6c7db6935471d6054ca27dfc1fc72518a68..a9bbaa1a5d2a0ba6d1b6364856bf0913da60fdc4 100644 --- a/DDEve/CMakeLists.txt +++ b/DDEve/CMakeLists.txt @@ -26,13 +26,13 @@ dd4hep_add_plugin ( DDEve SOURCES src/*.cpp if(DD4HEP_USE_GEANT4) dd4hep_add_dictionary ( G__DDG4IO SOURCES DDEve/DDG4IO.C - OPTIONAL DDG4 LINKDEF ${DDCore_INCLUDE_DIRS}/include/ROOT/LinkDef.h + OPTIONAL DDG4 ) dd4hep_add_regular_library ( DDG4IO SOURCES DDEve/IO.cpp GENERATED G__DDG4IO.cxx - OPTIONAL DDG4 + OPTIONAL DDG4 ) endif() diff --git a/DDEve/DDEve/DDG4IO.C b/DDEve/DDEve/DDG4IO.C index 89d9aa51502f5ce92956e32c99407211d7266ef2..c445620b9646949f6bc9cab160524ab3d380a0df 100644 --- a/DDEve/DDEve/DDG4IO.C +++ b/DDEve/DDEve/DDG4IO.C @@ -14,6 +14,20 @@ //========================================================================== #define __DDG4_STANDALONE_DICTIONARIES__ +#if defined(__GNUC__) +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#pragma GCC diagnostic ignored "-Wdeprecated" +#pragma GCC diagnostic ignored "-Wunused" +#pragma GCC diagnostic ignored "-Woverlength-strings" + +#elif defined(__llvm__) || defined(__APPLE__) + +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +#pragma clang diagnostic ignored "-Wdeprecated" +#pragma clang diagnostic ignored "-Wunused" +#pragma clang diagnostic ignored "-Woverlength-strings" +#endif + // C/C++ include files #include "DDG4/DDG4Dict.h" #include "DDEve/DDEveEventData.h" diff --git a/DDG4/include/DDG4/DDG4Dict.h b/DDG4/include/DDG4/DDG4Dict.h index 3682825fd87d0c01363e3293c7b1bcaed8c835e2..78fe3e90fa8e71891d44e092ecdf9808bbdada8b 100644 --- a/DDG4/include/DDG4/DDG4Dict.h +++ b/DDG4/include/DDG4/DDG4Dict.h @@ -18,9 +18,25 @@ #ifndef DD4HEP_DDG4_DDG4DICT_H #define DD4HEP_DDG4_DDG4DICT_H +#if defined(__GNUC__) +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#pragma GCC diagnostic ignored "-Wdeprecated" +#pragma GCC diagnostic ignored "-Wunused" +#pragma GCC diagnostic ignored "-Woverlength-strings" + +#elif defined(__llvm__) || defined(__APPLE__) + +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +#pragma clang diagnostic ignored "-Wdeprecated" +#pragma clang diagnostic ignored "-Wunused" +#pragma clang diagnostic ignored "-Woverlength-strings" +#endif + // FRamework include files +#include "DD4hep/Memory.h" #include "DDG4/Geant4Data.h" #include "DDG4/Geant4Particle.h" + namespace dd4hep { namespace DDSegmentation { } namespace detail { }