apache / brpc

brpc is an Industrial-grade RPC framework using C++ Language, which is often used in high performance system such as Search, Storage, Machine learning, Advertisement, Recommendation etc. "brpc" means "better RPC".
https://brpc.apache.org
Apache License 2.0
16.56k stars 3.98k forks source link

cmake编译unittest失败 #2770

Closed zhooooong closed 1 month ago

zhooooong commented 1 month ago

Describe the bug (描述bug)

[ 76%] Building CXX object test/CMakeFiles/brpc_server_unittest.dir/brpc_server_unittest.cpp.o
/brpc/test/brpc_server_unittest.cpp:59:10: fatal error: v3.pb.h: No such file or directory
   59 | #include "v3.pb.h"
      |          ^~~~~~~~~
compilation terminated.
make[2]: *** [test/CMakeFiles/brpc_server_unittest.dir/build.make:63: test/CMakeFiles/brpc_server_unittest.dir/brpc_server_unittest.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:741: test/CMakeFiles/brpc_server_unittest.dir/all] Error 2

To Reproduce (复现方法)

cmake .. -DBUILD_UNIT_TESTS=ON

Expected behavior (期望行为) cmake编译通过

Versions (各种版本) OS: ubuntu 20.04 Compiler: gcc 9.4.0 brpc: 36353ef protobuf: 3.6.1

Additional context/screenshots (更多上下文/截图)