Repository navigation
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The focused include-order change addresses the reported header mismatch without an identified issue.
0 open findings
What changed in this PR
This PR adjusts CMake header search order so builds use headers from the selected protobuf installation.
Changes:
- Places generated headers first, followed by the selected protobuf headers and then general dependency headers.
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Thanks, moving protobuf ahead of the generic dependency prefixes looks right. Two small things before merging:
|
68a556d to
187327f
Compare
|
Thank you! @darion-yaphet |
187327f to
500c13a
Compare


What problem does this PR solve?
Issue Number: resolve
Problem Summary:
CMake may select one Protobuf installation while a generic include prefix
(for example
/usr/local/include) is searched first. If that prefix containsheaders from a different Protobuf version, brpc can compile against headers
that do not match the selected Protobuf libraries.
This PR makes the selected Protobuf include directories take precedence for
the module-owned build targets.
What is changed and the side effects?
Changed:
Protobuf_INCLUDE_DIRStobutil_build_configbefore generic dependencyinclude directories.
directory.
directories precede generic include directories.
Side effects:
consistently use the Protobuf installation selected by
find_package.still need to be managed by the build environment.
Breaking backward compatibility:
None.