From a06ad90945c5cecb4369f905959c114552196933 Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Wed, 12 Oct 2016 16:12:07 -0700 Subject: [PATCH] Make skeptic an optional build dependency --- Cargo.toml | 19 ++++++++++--------- build.rs | 8 ++++++-- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 04ae465..ac55a19 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,8 +11,9 @@ readme = "Readme.md" repository = "https://github.com/gyscos/Cursive" version = "0.3.2" -[build-dependencies] -skeptic = "0.6" +[build-dependencies.skeptic] +optional = true +version = "0.6" [dependencies] odds = "0.2" @@ -20,23 +21,23 @@ toml = "0.2" unicode-segmentation = "0.1" unicode-width = "0.1" +[dependencies.bear-lib-terminal] +optional = true +version = "1.3.1" + [dependencies.ncurses] -version = "5.83.0" features = ["wide"] optional = true +version = "5.83.0" [dependencies.pancurses] -version = "0.6" features = ["wide"] optional = true +version = "0.6" [dependencies.termion] +optional = true version = "1.1.1" -optional = true - -[dependencies.bear-lib-terminal] -version = "1.3.1" -optional = true [dev-dependencies] rand = "0.3" diff --git a/build.rs b/build.rs index 203afa4..7012898 100644 --- a/build.rs +++ b/build.rs @@ -1,8 +1,12 @@ -extern crate skeptic; - +#[cfg(skeptic)] fn main() { + extern crate skeptic; + skeptic::generate_doc_tests(&["Readme.md", "doc/tutorial_1.md", "doc/tutorial_2.md", "doc/tutorial_3.md" ]); } + +#[cfg(not(skeptic))] +fn main() {}