28 Commits

Author SHA1 Message Date
Bright Chen 271b98fef7 Refactor NULL with nullptr in example (#3466) 2026-08-19 23:06:40 +08:00
darion-yaphet f094566f54 build(example): extract shared CMake dependency helper for examples (#3391)
Example CMakeLists duplicated the same dependency discovery and link
setup. Move that into brpc_example_find_common_deps in
BrpcExample.cmake, migrate MySQL and other examples to use it, and
implement the helper as a macro so CMAKE_PREFIX_PATH, include paths,
and DYNAMIC_LIB propagate to the caller scope.
Example-specific deps stay local (e.g. readline/ncurses/thriftnb for
MySQL, gperftools for redis/http). LINK_SO behavior is unchanged.
2026-07-21 09:26:06 +08:00
darion-yaphet 82a6819297 build(cmake): Modernize target-scoped CMake configuration (#3377)
* build(cmake): keep modern CMake policy compatibility

Raise the minimum CMake version range to 3.16...3.28 so CMake 4.x no longer treats the project as relying on removed pre-3.5 policy compatibility. The range preserves a conservative 3.16 runtime floor while documenting policy validation through 3.28.

* build(cmake): modernize target-scoped CMake configuration

Move shared compile definitions, include paths, options, and link dependencies onto interface targets so top-level, src, tools, tests, and standalone examples consume consistent build settings without relying on global directory state.

Examples now share a small CMake helper, and the gtest download path is updated to configure with modern CMake while keeping downloaded gtest headers ahead of Homebrew's C++17-only installation.
2026-07-12 00:02:52 +08:00
Bright Chen 0608aa1e13 Fix gflag namespace of example and tools (#2879) 2025-01-19 21:28:55 +08:00
GreateCode c4cd404310 support stats print 2024-08-29 23:22:41 +08:00
GreateCode 7874a4aef0 fix Darwin mallctl 2024-08-15 22:00:02 +08:00
Bright Chen 09141d4d87 Opt contention: support tcmalloc GetStackTrace and reduce hash calculations (#2488) 2024-01-17 10:28:21 +08:00
day253 2a42a26296 remove unnecessary libthriftnb 2023-07-24 00:17:02 +08:00
Ran Miller 6ebe2e98f2 delete deprecated logoff_ms gflag in example folder (#2064) 2022-12-27 10:26:37 +08:00
果冻虾仁 581c7b1aaa remove unnecessary semicolon (#2004)
* example

* src,tool
2022-11-21 10:18:51 +08:00
wangweibing 87e18c6a15 Fix __const__ compile error in gcc version >= 11.2.0 2022-06-07 14:51:21 +08:00
jamesge e93e0c2afe fix CMakeList.txt in examples and rename BUILD to BUILD.bazel to avoid conflict with cmake 2020-12-05 14:51:40 +08:00
jamesge 1ad1cc57ec remove authors 2020-01-03 13:00:41 +08:00
zhujiashun 2b96d08e94 insert_apache_header 2019-10-25 18:01:21 +08:00
zhujiashun 1b90ea18d9 unify dynamic link option in make and cmake 2019-08-26 14:32:29 +08:00
Weibing Wang 078051f9bf Update license header to Apache 2019-06-20 14:22:57 +08:00
gejun 7e4197f7db fix default protocol in example/grpc_c++/client.cpp 2018-09-30 18:47:55 +08:00
gejun c5803e77d0 Fix some copyrights 2018-09-30 17:36:11 +08:00
gejun d02badcf11 Change protocol name from h2c to h2 2018-09-29 22:44:23 +08:00
gejun f16cb5f8e8 Set http_body_compress_threshold to 0 on gzip & not set content-type 2018-09-29 17:19:14 +08:00
gejun 4a0927af5d Fix many issues around impl. of grpc 2018-09-28 19:58:05 +08:00
zhujiashun ee8587ee00 add grpc example Makefile 2018-09-28 15:08:51 +08:00
zhujiashun eeb0705754 * Do not expose grpc_status and grpc_message to user
* Delete trailer map
* Convert H2Error and grpc error to ErrorCode
2018-09-27 18:02:46 +08:00
zhujiashun 3799ed32a5 change project name in example/grpc_c++/CMakeLists.txt 2018-09-27 18:02:46 +08:00
zyearn 5936165506 * server can transfer grpc error code and message
* client can receive grpc error code and message
* add percent encode/decode
2018-09-27 18:02:46 +08:00
zyearn a30eeefdd7 remove grpc_client.cpp 2018-09-27 18:02:46 +08:00
zyearn 4c50ffb48c add grpc gizp support in req and res 2018-09-27 18:02:46 +08:00
zyearn e6334e5ce7 add grpc example 2018-09-27 18:02:46 +08:00