]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cmake: enable out-of-source build of breakpad 63655/head
authorKefu Chai <tchaikov@gmail.com>
Wed, 4 Jun 2025 03:05:38 +0000 (11:05 +0800)
committerKefu Chai <tchaikov@gmail.com>
Sun, 8 Jun 2025 06:13:53 +0000 (14:13 +0800)
commit0d89cd8d0a73247060386e2678bec5ef910820a8
tree28c266dd3069c11a2d48afbc95b1bf21203c9a31
parent4da6c31ebc66cb43a6ae39d5052b0526f9454bc1
cmake: enable out-of-source build of breakpad

Previously, Breakpad was built in its source tree instead of the
user-specified build directory, inconsistent with other external
projects and potentially causing source tree pollution.

Include path fix:

- Add ${INSTALL_DIR}/include/breakpad to include directories to fix
  FTBFS on Jammy builders

Build system improvements:
- Replace dedicated LSS submodule symlink target with PATCH_COMMAND to
  simplify the build process
- Use user-specified make command instead of hardcoded "make"
- Skip building unused process library and tools
- Link against breakpad with PRIVATE visibility unless required

Compiler flag cleanups:
- Remove -Wno-array-bounds from CFLAGS (Breakpad uses C++/CXXFLAGS)
- Remove compile-time flags incorrectly placed in LDFLAGS
- Remove '-fPIC' from CFLAGS, as it is already included by breakpad
  when building on linux hosts.
- Replace the individual -Wno-* flags with -Wno-error to cancel
  -Werror option specified by breakpad. This is more future-proof.

CMake target modernization:
- Rename libbreakpad_client to Breakpad::client following modern conventions
- Add Breakpad::breakpad header-only target to minimize dependencies
- Install library to enable proper include path prefixes
  (breakpad/client/... vs client/...)

Header dependency optimization:
- Remove Breakpad includes from popular headers, use forward declarations
- Include Breakpad headers before internal headers for better readability

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/CMakeLists.txt
src/common/CMakeLists.txt
src/common/ceph_context.cc
src/common/ceph_context.h
src/crimson/CMakeLists.txt
src/crimson/os/alienstore/CMakeLists.txt
src/global/CMakeLists.txt
src/global/global_init.cc
src/rgw/CMakeLists.txt
src/test/CMakeLists.txt