Ninja: Add order-only dependencies to link commands (#14728)

A library or executable target that consists only of a reference to an
object library may have no sources to compile or custom commands to run.
The command in the target is the link (or archive) command.  Add missing
order-only dependencies to link commands so that target ordering
dependencies are satisfied for it without depending on an intermediate
compilation rule.

Extend the ObjectLibrary test to cover this case.

Co-Author: Brad King <brad.king@kitware.com>
Merge topic 'ninja-link-order-only-dependencies' into next

ac8879ce Ninja: Add order-only dependencies to link commands (#14728)
Tests: Use add_test(NAME) signature in add_test_macro

This will allow generator expressions to be used in test arguments.
Merge topic 'tests-add_test-NAME' into next

902c9063 Tests: Use add_test(NAME) signature in add_test_macro