From bb526eae1b84f71b0a149b2c2ef768c69945306b Mon Sep 17 00:00:00 2001 From: Radovan Bast Date: Mon, 7 Sep 2015 15:59:02 +0200 Subject: [PATCH] sort directories in CMAKE_MODULE_PATH; fixes #111 --- update.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/update.py b/update.py index 6b19767..84b4982 100644 --- a/update.py +++ b/update.py @@ -204,7 +204,11 @@ def gen_cmakelists(project_name, minimum_cmake_version, relative_path, modules): if len(modules) > 0: s.append('\n# directories which hold included cmake modules') - for directory in set([module.path for module in modules]): + + module_paths = set([module.path for module in modules]) + module_paths = list(module_paths) + module_paths.sort() # we do this to always get the same order and to minimize diffs + for directory in module_paths: rel_cmake_module_path = os.path.join(relative_path, directory) # on windows cmake corrects this so we have to make it wrong again rel_cmake_module_path = rel_cmake_module_path.replace('\\', '/')