Mercurial > crates > nonstick
view libpam-sys/build.rs @ 132:0b6a17f8c894 default tip
Get constant test working again with OpenPAM.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Wed, 02 Jul 2025 02:34:29 -0400 |
parents | a632a8874131 |
children |
line wrap: on
line source
use libpam_sys_impls::__pam_impl_enum__; use strum::{EnumIter, IntoEnumIterator}; __pam_impl_enum__!(#[derive(EnumIter)]); fn main() { println!("cargo:rustc-link-lib=pam"); let pam_impl_strs: Vec<_> = PamImpl::iter().map(|e| format!("\"{:?}\"", e)).collect(); let pam_impls = pam_impl_strs.join(","); // We use this for ctest. Don't do what we've done; just use cfg_pam_impl. println!("cargo:rustc-check-cfg=cfg(_hack_impl, values({pam_impls}))"); println!("cargo:rustc-cfg=_hack_impl=\"{:?}\"", PamImpl::CURRENT); }