Files
bitcoin/.github/ci-windows.py
merge-script b43a936355 Merge bitcoin/bitcoin#33974: cmake: Check dependencies after build option interaction
a154c05d49 cmake: Check dependencies after build option interaction (Hennadii Stepanov)

Pull request description:

  At present, `CMakeLists.txt` interleaves configuration-option handling with dependency discovery. As a result, unnecessary checks may be performed. For example:
  ```
  $ cmake -B build --preset dev-mode -DBUILD_FOR_FUZZING=ON
  <snip>
  -- Found PkgConfig: /usr/bin/pkg-config (found version "2.3.0")
  -- Found ZeroMQ: /usr/lib64 (found suitable version "4.3.5", minimum required is "4.0.0")
  -- Performing Test HAVE_USDT_H
  -- Performing Test HAVE_USDT_H - Success
  -- Found USDT: /usr/include
  -- Found QRencode: /usr/lib64/libqrencode.so (found version "4.1.1")
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
  -- Found Threads: TRUE
  -- Performing Test HAVE_STDATOMIC
  -- Performing Test HAVE_STDATOMIC - Success
  -- Found WrapAtomic: TRUE
  -- Found OpenGL: /usr/lib64/libOpenGL.so
  -- Found WrapOpenGL: TRUE
  -- Found WrapVulkanHeaders: /usr/include
  -- Found Qt: /usr/lib64/cmake/Qt6 (found suitable version "6.10.1", minimum required is "6.2")
  CMake Warning at CMakeLists.txt:206 (message):
    BUILD_FOR_FUZZING=ON will disable all other targets and force
    BUILD_FUZZ_BINARY=ON.

  <snip>
  ```

  This PR restructures the code to ensure that all dependencies are checked only after the final build option interaction.

ACKs for top commit:
  fanquake:
    ACK a154c05d49
  sedited:
    Re-ACK a154c05d49

Tree-SHA512: f863316770a1e27e6c08736932f73f297add326943e9c32c721f7e771f38b0fdc651abfed61add5ee4924cfbf2afff91fde005d41d1fd239d401184b6caf5453
2026-05-26 10:25:29 +01:00

6.9 KiB
Executable File