target_sources: Restore toleration of duplicate CXX_MODULES sources

In commit 9c0491a3e4 (cmDyndepCollation: write out scanned source
information too, 2024-03-25) via !9708, the `sf_map` gained a new job of
also being used to track non-file set sources which could import
modules. This was implemented by removing processed `FILE_SET TYPE
CXX_MODULES` sources from the map and working with the sources
remaining. When a `FILE_SET TYPE CXX_MODULES` source appeared multiple
times, this would then erroneously complain that it "was not scheduled
for compilation". Use a set of source paths to track sources that have
already been processed. If duplicates are found, trigger an author
warning and skip the duplicate file.

Fixes: #26549
2 files changed