Question: cmake do not use file glob?
Answer: The creators of CMake themselves advise not to use globbing. (We do not recommend using GLOB to collect a list of source files from your source tree. If no CMakeLists. txt file changes when a source is added or removed then the generated build system cannot know when to ask CMake to regenerate.)