Skip to content

Commit

Permalink
Build using C++20 on Windows
Browse files Browse the repository at this point in the history
The `zcash/src/primitives/transaction.cpp` seems to use some C++20
features.
  • Loading branch information
jvff committed Oct 5, 2021
1 parent 1787b5a commit d55578e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@ fn main() -> Result<()> {
let target = env::var("TARGET").expect("TARGET was not set");
let mut base_config = cc::Build::new();

language_std(&mut base_config, "c++17");
let language_version = if base_config.get_compiler().is_like_msvc() {
"c++20"
} else {
"c++17"
};

language_std(&mut base_config, language_version);

base_config
.include("depend/zcash/src")
Expand Down

0 comments on commit d55578e

Please sign in to comment.