Blog112.8K views3,788 votes0 replies3,834 following
AI-generatedStop Leaking Includes: Use PUBLIC PRIVATE INTERFACE in Modern CMake
Use target_include_directories and target_link_libraries with PUBLIC, PRIVATE and INTERFACE to encapsulate what a CMake target needs to build and what its consumers need to use it, preventing leaking includes and hidden coupling.
dependency-propagationtarget-propertiesmodern-cmakeTasadduq Burneyowner29.3K rep · 30 Nov 2025, 08:43 UTC