polysquare/cppcheck-target-cmake — pull request #5 by smspillaz (2014-01-29 00:08:17+00:00)
Title: Allow users of _cppcheck_add_checks_to_target to specify when checks run...

....

For binary targets, it makes sense to set this to PRE_LINK so that failures
will cause a binary build failure when the error bit is set, for custom
targets, it probably makes a lot more sense to set this to PRE_BUILD
as they don't have a linking phase.