79741608

Date: 2025-08-20 21:42:55
Score: 2
Natty:
Report link

You can mark the containing directory of the header files as system include. Usually compilers do not complain about those (gcc, clang, MSVC).

Either using SYSTEM in

target_include_directories(<target> [SYSTEM] [AFTER|BEFORE]
  <INTERFACE|PUBLIC|PRIVATE> [items1...]
  [<INTERFACE|PUBLIC|PRIVATE> [items2...] ...])

or

set_target_properties(xxxDepXxx PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES $<TARGET_PROPERTY:xxxDepXxx,INTERFACE_INCLUDE_DIRECTORIES>)

See more info on this so question:

How to suppress Clang warnings in third-party library header file in CMakeLists.txt file?

Reasons:
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: simohe