On 14. 7. 2026 15:48, [email protected] wrote:
Author: ivan
Date: Tue Jul 14 13:48:03 2026
New Revision: 1936132
Log:
cmake: Sort CMake target conditions to generate stable targets.cmake.
Found by: brane
* build/generator/gen_cmake.py
(Generator.write): Sort result of `list(set())` to have stable order of
target conditions.
Modified:
subversion/trunk/build/generator/gen_cmake.py
Modified: subversion/trunk/build/generator/gen_cmake.py
==============================================================================
--- subversion/trunk/build/generator/gen_cmake.py Tue Jul 14 10:59:01
2026 (r1936131)
+++ subversion/trunk/build/generator/gen_cmake.py Tue Jul 14 13:48:03
2026 (r1936132)
@@ -214,7 +214,7 @@ class Generator(gen_base.GeneratorBase):
else:
install_target = False
- enable_condition = list(set(enable_condition))
+ enable_condition = sorted(list(set(enable_condition)))
if len(enable_condition) > 0:
enable_condition_str = " AND ".join(enable_condition)
else:
Heh, this fragment is of un-Pythonic. Ignoring that those conditions
should have been a set from the beginning ... it's a one-liner:
enable_condition_str = " AND ".join(sorted(set(enable_condition))) or "TRUE"
:)
-- Brane