CMake Nightly Date Stamp
Ninja: Consider only custom commands deps as side-effects (#14972)

Previously all explicit dependencies inside build folder were considered as
possible build command side-effects and phony rules were produced for them in
case they don't exist yet starting build. This however incorrect since regular
compile inputs need to exist otherwise cmake will fail. Moreover the exception
for sources having GENERATED property that can be missing is already handled by
WriteAssumedSourceDependencies.

This fixes unwanted phony rules for all regular source files when doing
in-source build, causing Ninja not complain when such files gets missing, i.e.
during development. Also this reduces number of rules in ninja.build.

Now only custom command dependencies are considered as possible side-effects.
Ninja: Don't limit custom cmd side-effects to build folder (#14972)

Actually custom command can write wherever it wants to, such as temporary
folder or source folder, possibly violating rules that only build folder should
be affected. Therefore we should consider custom command dependency at any path
as possible side effect adding phony rule.
Ninja: Skip generating empty phony rules

Ninja generator ensures that all custom commands being target dependencies are
run before other sources compilation. However in case there are no such
dependencies it does currently generate empty phony rules which clutter build
graph.

This change make Ninja generator produce this rules only when necessary.