Hiding files generated by UNITY_BUILD in Visual Studio

Hi all!

I just started configuring my project to build using UNITY_BUILD and it is great! However, in Visual Studio, the generated source files appear in the “SourceFiles” filter like any other unfiltered source file. I would like to hide them from the solution explorer entirely.

I have not been able to come up with a way of doing this, unfortunately. I have been able to group them in their own named filter using source_group with a regular expression like so:

source_group(UnityBuildFiles REGULAR_EXPRESSION ".+_cxx.cxx")

This is certainly an improvement over them just appearing in the default filter. But it would be better if there was a way to just hide them entirely. Has anyone tried to do something similar to hide away UNITY_BUILD files or generated files in general?

Cheers,
Keith