Skip to content

Commit

Permalink
ci: fix nightly warnings
Browse files Browse the repository at this point in the history
The CFG should go away once cfg_aliases start emit them, but for now
emit them ourselves.
  • Loading branch information
kchibisov committed May 6, 2024
1 parent eb81019 commit 052399d
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
15 changes: 15 additions & 0 deletions glutin-winit/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,19 @@ fn main() {
wgl_backend: { all(feature = "wgl", windows, not(wasm_platform)) },
cgl_backend: { all(macos_platform, not(wasm_platform)) },
}

println!("cargo:rustc-check-cfg=cfg(android_platform)");
println!("cargo:rustc-check-cfg=cfg(wasm_platform)");
println!("cargo:rustc-check-cfg=cfg(macos_platform)");
println!("cargo:rustc-check-cfg=cfg(ios_platform)");
println!("cargo:rustc-check-cfg=cfg(apple)");
println!("cargo:rustc-check-cfg=cfg(free_unix)");

println!("cargo:rustc-check-cfg=cfg(x11_platform)");
println!("cargo:rustc-check-cfg=cfg(wayland_platform)");

println!("cargo:rustc-check-cfg=cfg(egl_backend)");
println!("cargo:rustc-check-cfg=cfg(glx_backend)");
println!("cargo:rustc-check-cfg=cfg(wgl_backend)");
println!("cargo:rustc-check-cfg=cfg(cgl_backend)");
}
15 changes: 15 additions & 0 deletions glutin/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,19 @@ fn main() {
wgl_backend: { all(feature = "wgl", windows, not(wasm_platform)) },
cgl_backend: { all(macos_platform, not(wasm_platform)) },
}

println!("cargo:rustc-check-cfg=cfg(android_platform)");
println!("cargo:rustc-check-cfg=cfg(wasm_platform)");
println!("cargo:rustc-check-cfg=cfg(macos_platform)");
println!("cargo:rustc-check-cfg=cfg(ios_platform)");
println!("cargo:rustc-check-cfg=cfg(apple)");
println!("cargo:rustc-check-cfg=cfg(free_unix)");

println!("cargo:rustc-check-cfg=cfg(x11_platform)");
println!("cargo:rustc-check-cfg=cfg(wayland_platform)");

println!("cargo:rustc-check-cfg=cfg(egl_backend)");
println!("cargo:rustc-check-cfg=cfg(glx_backend)");
println!("cargo:rustc-check-cfg=cfg(wgl_backend)");
println!("cargo:rustc-check-cfg=cfg(cgl_backend)");
}
15 changes: 15 additions & 0 deletions glutin_examples/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,21 @@ fn main() {
cgl_backend: { all(macos_platform, not(wasm_platform)) },
}

println!("cargo:rustc-check-cfg=cfg(android_platform)");
println!("cargo:rustc-check-cfg=cfg(wasm_platform)");
println!("cargo:rustc-check-cfg=cfg(macos_platform)");
println!("cargo:rustc-check-cfg=cfg(ios_platform)");
println!("cargo:rustc-check-cfg=cfg(apple)");
println!("cargo:rustc-check-cfg=cfg(free_unix)");

println!("cargo:rustc-check-cfg=cfg(x11_platform)");
println!("cargo:rustc-check-cfg=cfg(wayland_platform)");

println!("cargo:rustc-check-cfg=cfg(egl_backend)");
println!("cargo:rustc-check-cfg=cfg(glx_backend)");
println!("cargo:rustc-check-cfg=cfg(wgl_backend)");
println!("cargo:rustc-check-cfg=cfg(cgl_backend)");

let dest = PathBuf::from(&env::var("OUT_DIR").unwrap());

println!("cargo:rerun-if-changed=build.rs");
Expand Down

0 comments on commit 052399d

Please sign in to comment.