# How to Build with Extra Warning Flags without ROS Header Warnings?

I'm attempting to enable the -Wextra and -Wall flags in my packages such that potential bugs can be caught from these warnings. Enabling these flags causes a huge cascade of warnings from ROS headers which can't be changed and so I'd like to ignore these warnings. Thus far, I've achieved the following for limiting warnings to their source:

add_library(my_lib <sources>)
target_compile_options(my_lib PRIVATE -Wall -Wextra)
target_include_directories(my_lib
PRIVATE include ${catkin_INCLUDE_DIRS} SYSTEM INTERFACE include${catkin_INCLUDE_DIRS}

I know that the SYSTEM keyword prevents all of the libraries following it to not raise warnings with the -Isystem flag, which achieves what I want for inter-package warnings. But I want ROS headers to not raise warnings at all. I've tried doing three sections such as: PRIVATE include SYSTEM ${catkin_INCLUDE_DIRS} SYSTEM INTERFACE include${catkin_INCLUDE_DIRS}, but this still causes errors to appear from ROS headers.