Skip to content

Commit

Permalink
libosdp-sys: Don't enforce -Werror on windows builds
Browse files Browse the repository at this point in the history
Signed-off-by: Siddharth Chandrasekaran <[email protected]>
  • Loading branch information
sidcha committed Feb 20, 2024
1 parent edaa61c commit c5a71a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions libosdp-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ categories = ["development-tools", "embedded"]
[build-dependencies]
anyhow = "1.0.75"
bindgen = "0.69.1"
build-target = "0.4.0"
cc = "1.0.83"

[features]
Expand Down
8 changes: 6 additions & 2 deletions libosdp-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use std::{
path::{Path, PathBuf},
process::Command,
};

use anyhow::Context;
use build_target::Os;
type Result<T> = anyhow::Result<T, anyhow::Error>;

fn path_join(root: &str, path: &str) -> String {
Expand Down Expand Up @@ -101,9 +101,13 @@ fn main() -> Result<()> {
.include("vendor/include")
.include("vendor/utils/include")
.warnings(true)
.warnings_into_errors(true)
.include(&out_dir);

if Os::target().unwrap() != Os::Windows {
println!("Got here!");
build = build.warnings_into_errors(true)
}

let source_files = vec![
"vendor/utils/src/list.c",
"vendor/utils/src/queue.c",
Expand Down

0 comments on commit c5a71a7

Please sign in to comment.