Adding files manually to cmakelists every time is super annoying, I have read that it's suggested to avoid it, but I don't see how it can break anything and what are alternatives that don't require doing things manually. I can't imagine going back to listing every single file (a lot of my cpp/h files also generated with script that called from CMake)
It is bad for many reasons. If you are working in a group and your cmakelists.txt file uses globbing. Suppose you add a new file A.cpp and commit it. Suppose some other developer who has built his project recently, does a pull - since his CMakeLists.txt file has not changed, the build system will conclude that nothing needs to be built again. And the build would fail. This can be corrected by using CONFIGURE_DEPENDS. But this brings with it its own set of issues. Now incremental builds are slowed down. For the ninja generator, which is considered to be the fastest build system in existence on *nix systems, CONFIGURE_DEPENDS brings down performance so much. This is because everytime you kick off a build a check is performed to see if any new file has been added to the filesystem. This is a very slow process and decreases the value of TDD for incremental builds that pisses off people who work on a source system that has more than a MLOC.
And btw CONFUGURE_DEPENDS is not guaranteed to work with every generator.
Another solution that is considered for such issues is to check constantly for changes on the filesystem using things like inotify and stuff. But this is so fragile that even a small change in things like cgroups limits can cause his monitoring to break which in turn would break your build and tracking suck things would be a big pain in the a**.
And even if you have a lot of generated source files, assuming they are all generated by the same process, you can always use a custom target and then create an implicit dependency to your final Target. The generator would be triggered through a custom command. This would totally negate the requirement for globbing given all the disadvantages above.