Home

Awesome

Include-What-You-Use CMake Targets

CMake macro to add per-source level checks on individual targets for include-what-you-use violations

Status

Travis CI (Ubuntu)AppVeyor (Windows)CoverageBiicodeLicence
TravisAppVeyorCoverallsBiicodeLicense

Description

iwyu-target-cmake can be used to scan individual source files for include-what-you-use violations. The check is added to target and automatically run over all of it its source files.

Usage

include-what-you-use-target-cmake works by scanning source files for #include statements and then checks the passed include directories for files matching the name of files specified in the #include statements.

Checking a target

iwyu_target_sources

Examine the sources attached to TARGET for include-what-you-use violations. The compiler flags as indicated in the arguments are passed to include-what-you-use to determine whether or not included files are not necessary.