From d8f979df34dae38247f94bd1d7f802bf95318fad Mon Sep 17 00:00:00 2001 From: Dmitry Patsura Date: Sun, 12 May 2024 23:41:46 +0200 Subject: [PATCH] chore: fix build --- build.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/build.rs b/build.rs index 6387b38..f0d2fac 100644 --- a/build.rs +++ b/build.rs @@ -14,8 +14,12 @@ fn main() { datasketches.join("hh.cpp"), ]) .include(datasketches.join("common").join("include")) - .flag_if_supported("-std=c++11") .cpp_link_stdlib(None) - .static_flag(true) - .compile("libdatasketches.a"); + .static_flag(true); + + // MSVC doesn't plan to implement C++11 switch, because they use c++14 by default + #[cfg(not(target_env = "msvc"))] + bridge.flag_if_supported("-std=c++11"); + + bridge.compile("libdatasketches.a"); }