Skip to content

cmake编译unittest失败 #2770

Description

@zhooooong

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 (更多上下文/截图)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions