Mercurial > crates > nonstick
comparison libpam-sys/build.rs @ 127:c77846f3a979
GET CTEST WORKING.
This will verify that the functions we're exporting are correct.
It has been a nightmare.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Mon, 30 Jun 2025 22:56:26 -0400 |
parents | e97534be35e3 |
children | ad77f2af5ff4 |
comparison
equal
deleted
inserted
replaced
126:57c812e308bd | 127:c77846f3a979 |
---|---|
1 use libpam_sys_impls::__pam_impl_enum__; | |
2 use strum::{EnumIter, IntoEnumIterator}; | |
3 | |
4 __pam_impl_enum__!(#[derive(EnumIter)]); | |
5 | |
1 fn main() { | 6 fn main() { |
2 println!("cargo:rustc-link-lib=pam"); | 7 println!("cargo:rustc-link-lib=pam"); |
8 let pam_impl_strs: Vec<_> = PamImpl::iter().map(|e| format!("\"{:?}\"", e)).collect(); | |
9 let pam_impls = pam_impl_strs.join(","); | |
10 // We use this for ctest. Don't do what we've done; just use cfg_pam_impl. | |
11 println!("cargo:check-cfg=cfg(_private_pam_impl_hack, values({pam_impls}))"); | |
12 println!("cargo:rustc-cfg=_private_pam_impl_hack=\"{:?}\"", PamImpl::CURRENT); | |
3 } | 13 } |