Tighten warning for 'Requires.private' in simple pkg-config parser #26008
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tightens up the logic for when we should warn about 'Requires.private' (and also 'Requires'). We only need to warn when the compiler/linker flags are not already handled by 'Cflags'/
Libs
.Details:
Requires
/Requires.private
list what other pkg-config libraries are needed, so thatpkg-config
can pull in the need dependencies/flags. This ends up being a recursive operation (i.e. 'A' has 'Requires: B', so we must process 'B.pc'). But if we already have the information needed, this is unnecessary. So if we have 'Requires: B', but 'B' is already listed in 'Libs', then for our purposes we have satisfied the 'Requires.'Our simple pkg-config parser is used only for bundled third-party libs, and we do not need to ability to recursively search other .pc files to satisfy the requirements. So this PR uses the above logic to avoid warning about
Requires
/Requires.private
not being handledThis should resolve #26002
[Reviewed by @mppf and @jhh67]