CMP0118: Fix NEW behavior when looking up target sources
Under the CMP0118 NEW behavior, sources generated in one directory should be visible when added to targets in other directories. This was accidentally left out of !5308 (merged).
Also document CMP0118 requirement for boolean values.
Fixes: #18399 (closed)
Backport: release