From eb1fab92024779aa91d4c83844677347b0b071e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Thu, 10 Mar 2016 12:33:29 +0100 Subject: [PATCH] Adding clippy support to ethminer. --- miner/Cargo.toml | 4 ++++ miner/build.rs | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 miner/build.rs diff --git a/miner/Cargo.toml b/miner/Cargo.toml index fb3f24210..713182563 100644 --- a/miner/Cargo.toml +++ b/miner/Cargo.toml @@ -5,6 +5,10 @@ license = "GPL-3.0" name = "ethminer" version = "0.9.99" authors = ["Ethcore "] +build = "build.rs" + +[build-dependencies] +rustc_version = "0.1" [dependencies] ethcore-util = { path = "../util" } diff --git a/miner/build.rs b/miner/build.rs new file mode 100644 index 000000000..41b9a1b3e --- /dev/null +++ b/miner/build.rs @@ -0,0 +1,25 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +extern crate rustc_version; + +use rustc_version::{version_meta, Channel}; + +fn main() { + if let Channel::Nightly = version_meta().channel { + println!("cargo:rustc-cfg=nightly"); + } +}