devtool: ide-sdk sort cmake preset

Sort the keys of the generated CMakeUserPreset.json file to make it
easier to search and compare.

(From OE-Core rev: b12dbde1ea30dd0fc1dd9352de948b8377c347fa)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
Adrian Freihofer
2025-01-26 13:48:03 +01:00
committed by Steve Sakoman
parent 8eb59ff517
commit d104122e52

View File

@@ -493,7 +493,7 @@ class RecipeModified:
vars = (key for key in d.keys() if not key.startswith(
"__") and not d.getVarFlag(key, "func", False))
for var in vars:
for var in sorted(vars):
func = d.getVarFlag(var, "func", False)
if d.getVarFlag(var, 'python', False) and func:
continue
@@ -545,7 +545,7 @@ class RecipeModified:
cache_vars = {}
oecmake_args = d.getVar('OECMAKE_ARGS').split()
extra_oecmake = d.getVar('EXTRA_OECMAKE').split()
for param in oecmake_args + extra_oecmake:
for param in sorted(oecmake_args + extra_oecmake):
d_pref = "-D"
if param.startswith(d_pref):
param = param[len(d_pref):]