It is common wisdom that file(glob) is not the proper way to collect and maintain the list of sources of a project as, when adding a new file, cmake will not detect the modification and will not regenerate.
But I fail to find on the net (and on the forum) what would be the correct solution.