Browse Source

Don't reuse the command between c/c++

pull/1899/head
Alexandru Ene 4 years ago
parent
commit
38f4ed084d
  1. 2
      crates/misc/run-examples/src/main.rs

2
crates/misc/run-examples/src/main.rs

@ -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 {

Loading…
Cancel
Save