diff --git a/DDCore/include/ROOT/Warnings.h b/DDCore/include/ROOT/Warnings.h
index 6b09d0d721288ae0c51b559c499292589f0abde2..9804760645ffc8aeeb0e45d674ec3b9eb94d1196 100644
--- a/DDCore/include/ROOT/Warnings.h
+++ b/DDCore/include/ROOT/Warnings.h
@@ -15,20 +15,19 @@
 //  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"
-
-#elif defined(__llvm__) || defined(__clang__) || defined(__APPLE__)
-
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-#pragma clang diagnostic ignored "-Wdeprecated"
-#pragma clang diagnostic ignored "-Wunused"
-#pragma clang diagnostic ignored "-Woverlength-strings"
+#if defined(__clang__)
+  #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+  #pragma clang diagnostic ignored "-Wdeprecated"
+  #pragma clang diagnostic ignored "-Wunused"
+  #pragma clang diagnostic ignored "-Woverlength-strings"
+#elif defined(__GNUC__) || defined(__GNUG__)
+  #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+  #pragma GCC diagnostic ignored "-Wdeprecated"
+  #pragma GCC diagnostic ignored "-Wunused"
+  #pragma GCC diagnostic ignored "-Woverlength-strings"
 #endif
 
+
 #if defined(__CINT__) || defined(__MAKECINT__) || defined(__CLANG__) || defined(__ROOTCLING__)
 #define  DD4HEP_DICTIONARY_MODE 1
 #endif
diff --git a/cmake/DD4hepBuild.cmake b/cmake/DD4hepBuild.cmake
index 250ef16d13f85a3d3b1a0bf6d4740b149478ac59..668add5481a4b678a42c96db3f71a54c24ea0d31 100644
--- a/cmake/DD4hepBuild.cmake
+++ b/cmake/DD4hepBuild.cmake
@@ -1025,7 +1025,7 @@ function( dd4hep_add_library binary building )
         #
         # root-cint produces warnings of type 'unused-function' disable them on generated files
         foreach ( f in  ${ARG_GENERATED} )
-          set_source_files_properties( ${f} PROPERTIES COMPILE_FLAGS -Wno-unused-function GENERATED TRUE )
+          set_source_files_properties( ${f} PROPERTIES COMPILE_FLAGS "-Wno-unused-function -Wno-overlength-strings" GENERATED TRUE )
         endforeach()
         list ( APPEND sources ${ARG_GENERATED} )
       endif()
@@ -1217,7 +1217,7 @@ function ( dd4hep_add_executable binary )
         endif()
         #  Prepare flags for cint generated sources:
         foreach ( f in  ${ARG_GENERATED} )
-          set_source_files_properties( ${f} PROPERTIES COMPILE_FLAGS -Wno-unused-function GENERATED TRUE )
+          set_source_files_properties( ${f} PROPERTIES COMPILE_FLAGS "-Wno-unused-function -Wno-overlength-strings" GENERATED TRUE )
         endforeach()
         #
         set ( sources ${ARG_GENERATED} ${ARG_SOURCES} ${optional_sources} )