|
@ -52,6 +52,7 @@ fn main() { |
|
|
.arg(&example)); |
|
|
.arg(&example)); |
|
|
|
|
|
|
|
|
println!("======== C/C++ example `{}` ============", example); |
|
|
println!("======== C/C++ example `{}` ============", example); |
|
|
|
|
|
for extension in ["c", "cc"].iter() { |
|
|
let mut cmd = cc::Build::new() |
|
|
let mut cmd = cc::Build::new() |
|
|
.opt_level(0) |
|
|
.opt_level(0) |
|
|
.cargo_metadata(false) |
|
|
.cargo_metadata(false) |
|
@ -64,7 +65,6 @@ fn main() { |
|
|
.get_compiler() |
|
|
.get_compiler() |
|
|
.to_command(); |
|
|
.to_command(); |
|
|
|
|
|
|
|
|
for extension in ["c", "cc"].iter() { |
|
|
|
|
|
let file = if is_dir { |
|
|
let file = if is_dir { |
|
|
format!("examples/{}/main.{}", example, extension) |
|
|
format!("examples/{}/main.{}", example, extension) |
|
|
} else { |
|
|
} else { |
|
|