[cmake-developers] [PATCH] cmFileCommand: sort list of files from glob command

Chuck Atkins chuck.atkins at kitware.com
Mon May 16 09:24:48 EDT 2016


>
> I'd like to express my concerns about the proposed change. CMake strongly
> discourages using `file(GLOB)` to find source files, since file additions
> then do not automatically trigger a buildsystem regeneration.
>

I second this.  The intent of the patch is to address an issue that is only
present when using a practice explicitly not recommended in CMake
documentation:

https://cmake.org/cmake/help/v3.5/command/file.html
Note: 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160516/05590a5c/attachment-0001.html>


More information about the cmake-developers mailing list