Copilot commented on code in PR #3506:
URL: https://github.com/apache/brpc/pull/3506#discussion_r3889558984
##########
CMakeLists.txt:
##########
@@ -64,9 +64,12 @@ endif()
set(BRPC_COMMON_COMPILE_OPTIONS)
set(BRPC_COMMON_DEFINITIONS)
+# Generated protobuf headers live in the build directory. Put it before src/
+# so leftover in-source *.pb.h (gitignored, produced by Make) cannot shadow
+# updated .proto files such as errno.proto.
set(BRPC_COMMON_INCLUDE_DIRS
- ${PROJECT_SOURCE_DIR}/src
${CMAKE_CURRENT_BINARY_DIR}
+ ${PROJECT_SOURCE_DIR}/src
)
Review Comment:
Minor: `${CMAKE_CURRENT_BINARY_DIR}` is now added twice to
`brpc_common_config` (once via `BRPC_COMMON_INCLUDE_DIRS` and again via the
`BEFORE` call). This is redundant and slightly bloats compiler command lines;
keeping it only in the `BEFORE` call preserves the intended include precedence
without duplication.
--
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]