Merge topic 'cxxmodules-try_compile' into release-3.28

fd81024e80 cxxmodules: Honor CMAKE_CXX_SCAN_FOR_MODULES in try_compile

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !8865