build.rs: also declare cfgs when we run into a warning

e.g. gettext is found but can't be used
This commit is contained in:
Mahmoud Al-Qudsi 2024-05-21 13:34:24 -05:00
parent 0b5e41b268
commit d07d0170ad

View file

@ -91,7 +91,10 @@ fn detect_cfgs(target: &mut Target) {
}),
] {
match handler(target) {
Err(e) => rsconf::warn!("{}: {}", name, e),
Err(e) => {
rsconf::warn!("{}: {}", name, e);
rsconf::declare_cfg(name, false);
},
Ok(enabled) => rsconf::declare_cfg(name, enabled),
}
}