how to depend on unknown generated files?

Hi guys,
I have a scenario that will compile all files generated by a custom target. The files are unknown(but all cpp files) until the cutsom command is run. So, I can’t add the generated files to my executable target in CMakeLists. Any suggestion? Many thank.