Add a boilerplate for the xtask concept

This shall provide a task to build the cmake module.
This commit is contained in:
Simon Hausmann 2020-06-03 16:46:51 +02:00
parent 33cfe03dc9
commit 8a2a7ae8cb
5 changed files with 35 additions and 1 deletions

24
xtask/src/main.rs Normal file
View file

@ -0,0 +1,24 @@
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
pub struct CMakeOptions {}
#[derive(Debug, StructOpt)]
pub enum Command {
#[structopt(name = "cmake")]
CMake(CMakeOptions),
}
#[derive(Debug, StructOpt)]
#[structopt(name = "xtask")]
pub struct ApplicationArguments {
#[structopt(subcommand)]
pub command: Command,
}
fn main() -> Result<(), Box<dyn std::error::Error>> {
let opt = ApplicationArguments::from_args();
println!("Hello, world!");
Ok(())
}