Page MenuHomePhabricator

[CMAKE] Hint to user to the option flags when an optional dependency is not found
ClosedPublic

Authored by Fabien on Jun 8 2021, 09:32.

Details

Summary

Since cmake 3.16 there is an option to append a message in case of
failure to the standard error message. The output will look like:

Could NOT find Jemalloc (missing: Jemalloc_INCLUDE_DIR) (Required is at
  least version "3.6.0")

      Reason given by package: this is an optional dependency that can
be disabled by passing -DUSE_JEMALLOC=OFF to the cmake command line
Test Plan

Uninstall an optional dependency and check the error message hints to
the option flag as expected.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
cmake_hint_flag_if_not_found
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 15936
Build 31772: Build Diffbuild-without-wallet · build-diff · build-clang · build-clang-tidy · build-debug
Build 31771: arc lint + arc unit