cmake: Switch include_directories -> target_include_directories

bitcoin/bitcoin: PR #36889

The review is inconclusive; no findings were published.

Coverage details

Background

Ralph's summary of historical context for the behaviour affected by this change. The historical record reviewed here is incomplete.

Documented decisions

WarnAboutGlobalProperties was introduced as a sanity check accompanying the move to interface libraries for common build flags. The stated objective was to encapsulate build properties rather than leave them directory-wide. The same commit explicitly made core_interface a usage requirement for project targets while exempting secp256k1, which obtained flags separately.

The guard's historical purpose was broader than include-path migration: it supported explicit target-level propagation of compilation and linking requirements. Its removal concerns the diagnostic backing for that architecture, not merely whether include_directories has been replaced.

Source 1