From 79c9133fcf8b1f8289b59fb9f2fe3da4a7dd1eb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Simonis?= Date: Sat, 14 Dec 2024 20:09:49 +0100 Subject: [PATCH] Remove dependency on clap --- Cargo.toml | 1 - build.rs | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ab0ec2c..1f5913b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,6 @@ cxx = "1.0" cxx-build = "1.0" pkg-config = "0.3" semver = "1" -clap = { version = "3", features = ["cargo"] } [[example]] name = "solverdummy" diff --git a/build.rs b/build.rs index e8eddd1..f3592fa 100644 --- a/build.rs +++ b/build.rs @@ -1,7 +1,5 @@ -extern crate clap; extern crate pkg_config; extern crate semver; -use clap::crate_version; use semver::Version; fn main() { @@ -11,7 +9,7 @@ fn main() { println!("cargo:rerun-if-changed=src/precice-bridge.hpp"); // Get version from the precice crate - let version = Version::parse(crate_version!()).expect("Unable to parse crate version"); + let version = Version::parse(env!("CARGO_PKG_VERSION")).expect("Unable to parse crate version"); let (major, minor) = (version.major, version.minor); let lower: &str = &format!("{major}.{minor}"); let upper: &str = &format!("{major}.{}", minor + 1);