]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cmake: use find_program(REQUIRED) to fail early on missing programs 63975/head
authorKefu Chai <tchaikov@gmail.com>
Tue, 17 Jun 2025 09:22:16 +0000 (17:22 +0800)
committerKefu Chai <tchaikov@gmail.com>
Tue, 17 Jun 2025 09:30:10 +0000 (17:30 +0800)
commit448633e325b743038677274d0a623f3471cea4c1
treecc1380e9604a0c594e5f6a1a8f2413103dfb3f4b
parentedf8b22bfb676ea5e5e10280f9c40393505ea1c9
cmake: use find_program(REQUIRED) to fail early on missing programs

Since upgrading minimum CMake version to 3.22.1 (commit 469d82a1), we can
now use find_program(REQUIRED) which was introduced in CMake 3.18.

This change replaces manual FATAL_ERROR checks with the REQUIRED option
and adds it to programs that are actually needed during the build. This
ensures the build fails early during configuration rather than later
during compilation when missing programs are invoked.

Changes:
- Replace find_program() + message(FATAL_ERROR) patterns with REQUIRED
- Add REQUIRED to programs that are used during build but previously
  had no error checking

Reference: https://cmake.org/cmake/help/latest/command/find_program.html

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
CMakeLists.txt
cmake/modules/FindMake.cmake
src/CMakeLists.txt
src/rgw/CMakeLists.txt