Since the file lists contain only valid paths, it is sufficient to anchor
the regular expression at the end only instead of matching the full path.
This prevents regular expression injections.
Using the path prefix as part of a regular expression can lead to a
regular expression injection, the path might contain regular expression
meta characters that get interpreted. Use cmake_path() instead to filter
path prefixes.
This function uses default groups like Visual Studio and additional groups
for files commonly used by CMake builds.
This increases the required CMake version to 3.20.