Tests/CXXModules: add example for private modules between targets

Adapted from the example in issue #24652 by Ivan Garramona.
8 files changed