From 7d79849ff73a452e7e75c7d246d7abe970d9cecd Mon Sep 17 00:00:00 2001 From: Florian Uhlig <f.uhlig@gsi.de> Date: Fri, 18 Nov 2022 17:34:35 +0100 Subject: [PATCH] Prepare for FairRoot v18.8 Switch of specific compiler warnings when compiling rootcling generated dictionary code otherwise the output is spammed with a huge number of warnings. The code is generated by rootcling and we can't do anything to fix the problems. --- cmake/modules/CbmMacros.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/modules/CbmMacros.cmake b/cmake/modules/CbmMacros.cmake index 1dfe282319..fa3930fa70 100644 --- a/cmake/modules/CbmMacros.cmake +++ b/cmake/modules/CbmMacros.cmake @@ -215,6 +215,11 @@ macro(generate_cbm_library) if(LINKDEF) root_generate_dictionary(G__${LIBRARY_NAME} ${ROOT_HEADERS} MODULE ${LIBRARY_NAME} LINKDEF ${LINKDEF}) + if (CMAKE_CXX_COMPILER_ID MATCHES Clang) + set_target_properties(G__${LIBRARY_NAME} PROPERTIES COMPILE_FLAGS "-Wno-overloaded-virtual -Wno-shadow -Wno-deprecated-declarations -Wno-unused-parameter") + else() + set_target_properties(G__${LIBRARY_NAME} PROPERTIES COMPILE_FLAGS "-Wno-ctor-dtor-privacy -Wno-overloaded-virtual -Wno-null-pointer-subtraction -Wno-shadow -Wno-deprecated-declarations -Wno-unused-parameter") + endif() endif(LINKDEF) ############# Install target and corresponding header files ############ -- GitLab