Defining default set of cc/cpp warning flags for SPM targets

A bit of a background: We are using Xcode Workspace as basis of our development. Inside it we have a few dozen schemes, some use Xcode projects, but mostly the code is in a few dozen, local and remote, Swift packages.

The Swift packages contain at least Swift, C++ and Objective-C(++). We noticed the hard way that the warning flags in use when compiling an SPM package containing ObjC++ code are much laxer than the Xcode defaults. I obviously wanted to fix this by adding the obvious flags, but did not find a good solution.

In three ways of passing more flags are discussed. Two of them rely on additional parameters (i.e. -Xlinker or --destination) to swift build, which to my knowledge do not apply when using Xcode. The third way is to specify the extra flags in targets, using e.g. cxxSettings: [ .unsafeFlags("...") ] .

The third way would likely work, but adding a dozen or so flags once every target or once every Package.swift does not seem like a maintainable solution.

Is there a way, or plans, to let the users specify the wanted warning flags once in a way that they could easily, or automatically, be used by targets? Optimally this list could be written once and "imported" to several packages.

Also, please point out if I am doing something totally wrong. :)