77 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 0313102276 build(cxx): align all builds on a C++14 baseline (#3419)
* build(cxx): align all builds on a C++14 baseline

CMake, Make, tests, tools, and examples now require C++14 so every supported build path shares the same minimum language level. The compiler checks and user-facing documentation reflect that baseline.

* fix(test): keep cores scoped to the failing test

Clear prior cores before each test binary. A passing death test can leave a core that would otherwise be used to diagnose an unrelated later failure.

* revert src/butil/type_traits.h
2026-08-06 17:34:49 +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
wayslog 11a71050d2 feat(redis): add native Redis Cluster channel, tests and docs 2026-03-01 15:54:11 +08:00
Tanghui Lin cffbd243e5 keep session info in RedisConnContext (#2902)
* keep session info in RedisConnContext

* fix comment

* add uint test for redis ctx

* fix uinttest
2025-03-06 19:25: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
Dongsheng He 0a940cdc4b fix redis server example handler memory leak (#2370) 2023-09-07 13:17:54 +08:00
day253 2a42a26296 remove unnecessary libthriftnb 2023-07-24 00:17:02 +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
liuminghang 21b1ece8eb remove 'flush_batched' 2020-06-01 12:15:39 +08:00
liuminghang 9e000a2ca9 test redis \0 2020-05-30 19:15:51 +08:00
liuminghang 36ebd737dd fix redis args 2020-05-28 22:00:56 +08:00
jamesge 74310245bf make by config_brpc.sh shows commands by default, add -s to hide 2020-02-10 17:03:22 +08:00
jamesge 91a4376509 Rename RedisCommandHandler::Result to make related code cleaner 2020-01-16 15:11:12 +08:00
jamesge a3b2266009 Remove RedisReply.Clear which is conflict with Reset; Add RedisReply.FormatString/Status/Error 2020-01-07 19:48:36 +08:00
jamesge 38e5f8bc57 fix redis related issues 2020-01-07 17:14:26 +08:00
zhujiashun 10325baa98 redis_server_protocol: refine code by cr 2019-12-23 17:56:35 +08:00
zhujiashun 72f953d35e redis_server_protocol: refine example 2019-12-20 17:45:37 +08:00
zhujiashun 16894d1e1a redis_server_protocol: update redis-server 2019-12-19 12:01:12 +08:00
zhujiashun ea7605d3ac redis_server_protocol: update redis-server 2019-12-16 18:17:46 +08:00
zhujiashun e3117cfcaa redis_server_protocol: remove ExecQueue 2019-12-13 16:26:05 +08:00
zhujiashun 520858cfc5 redis_server_protocol: refine code 2019-12-12 17:24:36 +08:00
zhujiashun aa2d91282f redis_server_protocol: remove New() and using butil::StringSplit in example 2019-12-09 19:39:59 +08:00
zhujiashun 684f4ed1e0 redis_server_protocol: refine code, add comment and more ut 2019-12-09 15:42:57 +08:00
zhujiashun ba7f3d5f23 redis_server_protocol: update redis_server 2019-12-09 15:42:57 +08:00
zhujiashun 2d0c8c3bd0 redis_server_protocol: refine code 2019-12-09 15:42:57 +08:00
zhujiashun a79093b478 redis_server_protocol: revise to sync interface 2019-12-09 15:42:57 +08:00
zhujiashun a281b1bd32 redis_server_protocol: add redis server example 2019-12-09 15:42:57 +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
Qihe Bian d42f35109a Fix cmake build issue when use this project as a submodule. (#428)
* Fix cmake build issue when use this project as a submodule.
* Add ignore.
2018-08-19 10:07:11 +08:00
zyearn 06eb03560a - Remove weak symbol _RegisterThriftProtocol in CMakeLists.txt
- find libthrift* in example when using brpc with thrift protocol
  enabled
2018-07-06 08:43:32 +08:00
zhujiashun d2e549af44 add weak symbols _RegisterThriftProtocol compile option to all examples 2018-05-16 17:06:07 +08:00
zyearn 8c374a505d fix static linking in ex 2018-04-30 09:34:24 +08:00
zyearn 802f8ca0a8 Make Makefile work as well in MacOs 2018-04-30 09:23:07 +08:00
zhujiashun 3a7e8ec67a Update example/*/CMakeLists.txt as well 2018-04-28 12:30:24 +08:00
zhujiashun 5654319b2a Fix explicit type conversion from bthread_t to pthread_t in mac 2018-04-13 16:08:53 +08:00
zyearn 91530efc77 Merge branch 'master' of github.com:brpc/brpc into cmake_support 2018-04-12 23:22:37 +08:00
zhujiashun 77180e841b Make all examples can be compiled in MacOSX 2018-04-09 19:43:28 +08:00
Zhangyi Chen 32719a43f6 Renam libbrpc_static.a to libbrpc.a 2018-01-24 22:57:33 -08:00
zhujiashun d9ea91cbfb remove unnecessary code in example 2018-01-15 10:13:20 +08:00
Ge Jun 50b8e99955 Merge pull request #191 from brpc/cmake_support
make lib include bin into $PWD/output & make all example be able to be compiled by default
2018-01-10 11:11:33 +08:00
zhujiashun b0d31fb6ac make lib include bin into /home/zhujiashun/brpc/output & make all example be able to be compiled by default 2018-01-09 19:40:01 +08:00
gejun 4642392abc Replace -std=gnu++11 with -std=c++11 2018-01-07 20:07:54 +08:00