foundationdb/cmake
Michael Stack 60d24dabcd
mako: gate build behind BUILD_MAKO cmake option (#13322)
* mako: gate build behind BUILD_MAKO cmake option

Two related changes:

1. mako had strip_debug_symbols(mako) (added in #13159) but no
   prepare_mako_install ALL target, so strip_only_mako never ran on a
   plain `ninja` build and packages/bin/mako was missing. As a result,
   `BUILD_MAKO=1 ./packaging/docker/build-images.sh` failed at "COPYING
   mako" — broken since #13159 landed.

2. The mako binary itself has been built unconditionally since 2019.
   It has no test consumers; the only out-of-tree consumer is the PGO
   generate_profile target. Match the spirit of #13159's opt-in docker
   pitch by gating the entire mako build behind a new BUILD_MAKO cmake
   option (default OFF). With -DBUILD_MAKO=ON, both bin/mako and
   packages/bin/mako are produced together.

build-images.sh no longer reads the BUILD_MAKO env var at all — it
auto-detects from packages/bin/mako presence. So the cmake option is
the single source of truth: configure with -DBUILD_MAKO=ON, mako gets
built and packaged into a docker image; configure without, no mako
anywhere. Existing `BUILD_MAKO=1 ./build-images.sh` invocations still
work iff the cmake side was also configured with the option.

The PGO generate_profile target now guards its mako dependency with
`if(TARGET mako)` so it still works without the option.

* mako: address PR review on BUILD_MAKO gate

Two small fixups from Copilot review:

1. cmake/FDBComponents.cmake — the comment claimed
   `BUILD_MAKO=1 ./packaging/docker/build-images.sh` was the opt-in
   path, but build-images.sh no longer reads the env var; it
   auto-detects packages/bin/mako. Updated the comment to match:
   opt in via -DBUILD_MAKO=ON, and build-images.sh picks up
   packages/bin/mako when present.

2. bindings/c/CMakeLists.txt — gate `prepare_mako_install ALL DEPENDS
   strip_only_mako` on `NOT GENERATE_DEBUG_PACKAGES` to match the
   convention used by fdbcli, fdbserver, fdbbackup, and fdbmonitor.
   Without this, mako gets stripped and packages/bin/mako is generated
   in debug-package builds, where every other binary takes the
   unstripped fdb_install(TARGETS ...) path instead.
2026-06-04 16:39:20 -07:00
..
toolchain fixup! Use mono/mcs properly to build C# code like actorcompiler 2025-11-18 13:02:35 -08:00
AddFdbServerLinkTest.cmake Fix fdbserver unit test suite definition 2026-05-20 13:41:03 -07:00
AddFdbTest.cmake Address clang-tidy warnings 2026-05-24 18:14:26 -07:00
AssertFileDoesntExist.cmake Remove ugly debug message 2019-03-11 17:35:06 -07:00
CPackConfig.cmake Fix Javadoc build error, RPM packaging, and Dockerfile (#12084) 2025-04-16 13:44:43 -07:00
CheckForPthreads.c Introduce initial Swift support in fdbserver (#10156) 2023-06-02 16:09:28 -05:00
CompileActorCompiler.cmake Make `FDB_USE_CSHARP_TOOLS` authoritative and consistently honored across the build (#12615) 2026-01-06 20:55:33 -08:00
CompileBoost.cmake build: boost compile work-around for boost < 1.81 no longer needed 2026-05-04 10:09:20 -04:00
CompileCoverageTool.cmake Make `FDB_USE_CSHARP_TOOLS` authoritative and consistently honored across the build (#12615) 2026-01-06 20:55:33 -08:00
CompileRocksDB.cmake Merge remote-tracking branch 'apple/main' into dev/tclinkenbeard/modularize-fdbserver2 2026-03-19 17:31:58 +00:00
CompileVexillographer.cmake XDB-494 fixed windows build #12630 (#12793) 2026-03-19 09:15:30 -07:00
CompileZstd.cmake add benchmark for zstd 2022-10-11 08:23:55 -07:00
CompilerChecks.cmake Add code back 2024-07-10 18:52:14 -07:00
Config.cmake.in Make find_package work 2019-06-09 15:21:36 -07:00
ConfigureCompiler.cmake XDB-494 fixed windows build #12630 (#12793) 2026-03-19 09:15:30 -07:00
DotnetImports.props.in Add Finddotnet and Findmono 2025-11-18 13:02:35 -08:00
EnableCsharp.cmake Update cmake/EnableCsharp.cmake 2025-11-18 13:02:35 -08:00
FDBBenchmark.cmake Decompose flowbench 2026-03-28 23:38:33 +00:00
FDBComponents.cmake mako: gate build behind BUILD_MAKO cmake option (#13322) 2026-06-04 16:39:20 -07:00
FDBInstall.cmake Fix Javadoc build error, RPM packaging, and Dockerfile (#12084) 2025-04-16 13:44:43 -07:00
FDBRocksDBVersion.h.in [main] Multiple rocksdb build improvements (#12699) 2026-02-12 18:04:45 -08:00
FindCoroutines.cmake Added C++ Coroutine support to Flow 2023-11-14 10:10:11 +01:00
FindGperftools.cmake Fix cmake USE_GPERFTOOLS compiling error 2022-04-08 13:56:06 -07:00
FindJinja2.cmake Reformat CMake files 2025-11-13 06:41:38 +08:00
FindLZ4.cmake Add FindLZ4.cmake 2025-11-18 13:02:35 -08:00
FindRocksDB.cmake Update cmake/FindRocksDB.cmake 2025-11-18 13:02:35 -08:00
FindSphinx.cmake Do not use virtual environment if system has built-in Sphinx 2023-03-22 20:41:28 -07:00
FindSwiftLibs.cmake Add code back 2024-07-10 18:52:14 -07:00
FindThreads.cmake Add code back 2024-07-10 18:52:14 -07:00
FindWIX.cmake Generate Windows-Installer with cmake 2019-02-07 15:37:04 -08:00
Findbenchmark.cmake Use Findbenchmark instead of hardcoding the google-benchmark path in … (#12612) 2026-01-02 13:55:51 -08:00
Finddotnet.cmake Make `FDB_USE_CSHARP_TOOLS` authoritative and consistently honored across the build (#12615) 2026-01-06 20:55:33 -08:00
Findjemalloc.cmake Fix a few issues with gcc 13 (#11833) 2024-12-12 16:11:38 -08:00
Findmono.cmake fixup! Use mono/mcs properly to build C# code like actorcompiler 2025-11-18 13:02:35 -08:00
Findsccache.cmake Add Findsccache.cmake, enable SCCache in the CMake system 2025-11-18 13:02:35 -08:00
Findtoml11.cmake Add Findtoml11 for CMake 2025-11-18 13:02:35 -08:00
Finduring.cmake update RocskDB and Boost 2022-02-09 10:48:18 -06:00
Findvalgrind.cmake fixup! Fix the valgrind issue 2025-11-18 13:02:35 -08:00
FlowCommands.cmake Add more clang-tidy checks 2026-05-24 15:15:47 -07:00
GenerateModulemap.cmake Add code back 2024-07-10 18:52:14 -07:00
GetFmt.cmake build: update to toml11-3.8.1 and switch to FetchContent 2026-04-29 19:22:59 -04:00
GetMsgpack.cmake GetMsgpack: add 4+ versions of upstream 2023-09-26 18:16:57 +03:00
InstallLayout.cmake Fixed the installation path for fdbmonitor and backup_agent (#2579) (#12236) 2025-08-26 13:45:14 -07:00
Jemalloc.cmake fixup! 2024-08-16 09:46:06 -07:00
RocksDBVersion.cmake Remove role library dependencies on fdbserver 2026-03-12 23:20:54 +00:00
Sandbox.conf.cmake Unify flags (#25) 2021-12-14 08:44:39 -08:00
SwiftCrossCompileForceModuleRebuild.cmake Add code back 2024-07-10 18:52:14 -07:00
SwiftToCXXInterop.cmake Add code back 2024-07-10 18:52:14 -07:00
awssdk.cmake Upgrade awssdk to 1.11.473 (#11853) 2025-01-02 10:22:32 -08:00
benchmark-download.cmake Decompose flowbench 2026-03-28 23:38:33 +00:00
foundationdb-client.pc.in use FDB_VERSION in lieu of PROJECT_VERSION (package scripts) 2021-11-29 15:11:20 -08:00
user-config.jam.cmake Enable ZSTD compression support (#8014) 2022-09-22 14:31:49 -07:00
utils.cmake Enforce two new modernize-* clang-tidy rules 2026-03-13 20:12:14 +00:00