songgaoye opened a new pull request, #3612:
URL: https://github.com/apache/brpc/pull/3612

   
   ### What problem does this PR solve?
   
   Issue Number: resolve
   
   Problem Summary:
   
   On macOS with Homebrew, CMake may find a versioned protobuf installation 
while
   a generic dependency include path, such as `/opt/homebrew/include`, appears
   before the protobuf include directory.
   
   If that prefix contains headers from another protobuf installation, generated
   sources are compiled against headers that do not match the selected `protoc`
   and protobuf library. This causes errors such as:
   
   This file was generated by a newer version of protoc ...
   
   ### What is changed and the side effects?
   
   Changed:
   
   - Put `${PROTOBUF_INCLUDE_DIRS}` ahead of generic dependency include paths in
     `brpc_common_config`.
   - Keep generated protobuf headers first, followed by the selected protobuf
     installation and then other project/dependency headers.
   
   Side effects:
   
   * Performance effects:
   
     None. This only changes CMake header search order.
   
   * Breaking backward compatibility:
   
     None.
   
   * * *
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to