Add a note that order of files is not defined
>From 9cd9fbb12ef73b72526190573cba0392ead5fd9f Mon Sep 17 00:00:00 2001
From: Ruslan Baratov
Date: Wed, 21 Oct 2015 02:53:37 +0600
Subject: [PATCH] Documentation: file(GLOB*) order is not guaranteed
Since this command use 'readdir' under the hood the order of list is
undefined:
* http://stackoverflow.com/questions/8977441/does-readdir-guarantee-an-order
---
Help/command/file.rst | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Help/command/file.rst b/Help/command/file.rst
index bbddd40..a441054 100644
--- a/Help/command/file.rst
+++ b/Help/command/file.rst
@@ -103,7 +103,8 @@ Generate a list of files that match the and
store it into the . Globbing expressions are similar to
regular expressions, but much simpler. If ``RELATIVE`` flag is
specified, the results will be returned as relative paths to the given
-path.
+path. Command doesn't guarantee any ordering. If order is important you have
+to sort list manually (e.g. using :command:`list(SORT)` command).
By default ``GLOB`` lists directories - directories are omited in result if
``LIST_DIRECTORIES`` is set to false.
--
2.4.5
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers