https://github.com/dalance/cc-version
gcc version detection for build.rs
https://github.com/dalance/cc-version
Last synced: 24 days ago
JSON representation
gcc version detection for build.rs
- Host: GitHub
- URL: https://github.com/dalance/cc-version
- Owner: dalance
- Created: 2020-08-03T05:07:29.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-07T00:57:05.000Z (over 1 year ago)
- Last Synced: 2026-02-06T15:52:53.642Z (5 months ago)
- Language: Rust
- Size: 11.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# cc-version
cc version detection for build.rs
[](https://github.com/dalance/cc-version/actions)
[](https://crates.io/crates/cc-version)
[](https://docs.rs/cc-version)
## Usage
```Cargo.toml
[build-dependencies]
cc-version = "0.1.0"
```
## Example
```rust
use cc_version::cc_version;
fn main() {
let builder = cc::Build::new();
let tool = builder.get_compiler();
let version = cc_version(&tool).unwrap();
println!("cargo:warning=cc version {} is detected.", version);
}
```
## License
Licensed under either of
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in the work by you, as defined in the Apache-2.0
license, shall be dual licensed as above, without any additional terms or
conditions.