7 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
Yang,Liming 24fc31eaa5 span for new bthread (#2519) 2024-02-26 10:46:43 +08:00