Skip to content

Commit dfc4617

Browse files
pks-tgitster
authored andcommitted
meson: improve summary of auto-detected features
The summary of auto-detected features prints a boolean for every option to tell the user whether or not the feature has been auto-enabled or not. This summary can be improved though, as in some cases this boolean is derived from a dependency. So if we pass in the dependency directly, then Meson knows to both print a boolean and, if the dependency was found, it also prints a version number. Adapt the code accordingly and enable `bool_yn` so that actual booleans are formatted similarly to dependencies. Before this change: Auto-detected features benchmarks : true curl : true expat : true gettext : true gitweb : true iconv : true pcre2 : true perl : true python : true And after this change, we now see the version numbers as expected: Auto-detected features benchmarks : YES curl : YES 8.14.1 expat : YES 2.7.1 gettext : YES gitweb : YES iconv : YES pcre2 : YES 10.44 perl : YES python : YES Note that this change also enables colorization of the boolean options, green for "YES" and red for "NO". Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f61f538 commit dfc4617

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

meson.build

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2184,15 +2184,15 @@ meson.add_dist_script(
21842184

21852185
summary({
21862186
'benchmarks': get_option('tests') and perl.found() and time.found(),
2187-
'curl': curl.found(),
2188-
'expat': expat.found(),
2189-
'gettext': intl.found(),
2187+
'curl': curl,
2188+
'expat': expat,
2189+
'gettext': intl,
21902190
'gitweb': gitweb_option.allowed(),
2191-
'iconv': iconv.found(),
2192-
'pcre2': pcre2.found(),
2191+
'iconv': iconv,
2192+
'pcre2': pcre2,
21932193
'perl': perl_features_enabled,
21942194
'python': target_python.found(),
2195-
}, section: 'Auto-detected features')
2195+
}, section: 'Auto-detected features', bool_yn: true)
21962196

21972197
summary({
21982198
'csprng': csprng_backend,

0 commit comments

Comments
 (0)