diff --git a/src/options.rs b/src/options.rs index c56a521..72916ef 100644 --- a/src/options.rs +++ b/src/options.rs @@ -72,8 +72,8 @@ pub struct BuildOptions { pub debug_assertions: bool, /// Build target with verbose output from `cargo build` - #[structopt(short = "v", long = "verbose")] - pub verbose: bool, + #[structopt(short = "v", long = "verbose", parse(from_occurrences))] + pub verbose: i32, #[structopt(long = "no-default-features")] /// Build artifacts with default Cargo features disabled @@ -144,7 +144,7 @@ impl stdfmt::Display for BuildOptions { write!(f, " -a")?; } - if self.verbose { + for _ in 0..self.verbose { write!(f, " -v")?; } @@ -213,7 +213,7 @@ mod test { dev: false, release: false, debug_assertions: false, - verbose: false, + verbose: 0, no_default_features: false, all_features: false, features: None, @@ -240,7 +240,7 @@ mod test { ..default_opts.clone() }, BuildOptions { - verbose: true, + verbose: 1, ..default_opts.clone() }, BuildOptions { diff --git a/src/project.rs b/src/project.rs index f0c1594..35e2070 100644 --- a/src/project.rs +++ b/src/project.rs @@ -140,7 +140,7 @@ impl FuzzProject { if !build.dev { cmd.arg("--release"); } - if build.verbose { + for _ in 0..build.verbose { cmd.arg("--verbose"); } if build.no_default_features {