Apply the change from !7662 (merged) to add_custom_target docs too.
add_custom_target
Issue: #23786 (closed)