summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/file/GLOB.cmake
Commit message (Collapse)AuthorAgeFilesLines
* file: Sort GLOB results to make it deterministic (#14491)Reiner Herrmann2016-05-171-3/+0
| | | | | | | | | | | | | | | | | Even though the `file(GLOB)` documentation specifically warns against using it to collect a list of source files, projects often do it anyway. Since it uses `readdir()`, the list of files will be unsorted. This list is often passed directly to add_executable / add_library. Linking binaries with an unsorted list will make it unreproducible, which means that the produced binary will differ depending on the unpredictable `readdir()` order. To solve those reproducibility issues in a lot of programs (which don't explicitly `list(SORT)` the list manually), sort the resulting list of the `file(GLOB)` command. A more detailed rationale about reproducible builds is available [here](https://reproducible-builds.org/).
* file: Teach GLOB to list directories optionallyDomen Vrankar2015-03-201-0/+28
GLOB lists directories by default and GLOB_RECURSE does not. LIST_DIRECTORIES enables user to control the behavior explicitly for consistently for both GLOB and GLOB_RECURSE.