From 68e9ec0d41e31b728158a22ea4c7190cce390f4f Mon Sep 17 00:00:00 2001 From: bubnikv <bubnikv@gmail.com> Date: Wed, 16 Nov 2016 13:00:36 +0100 Subject: [PATCH] Set the C++ version to C++11 for all compilers but Visual Studio C++. --- xs/Build.PL | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xs/Build.PL b/xs/Build.PL index 9accef39d..0eed91c61 100644 --- a/xs/Build.PL +++ b/xs/Build.PL @@ -24,6 +24,10 @@ if ($mswin) { # If <math.h> is included, we want the #defines to be active (M_PI etc.) push @cflags, qw(-D_WIN32 -DNOMINMAX -D_USE_MATH_DEFINES); } +if (! $cpp_guess->is_msvc) { + # Don't use the version flag on MS Visual Studio, as it starts to recognize them up to 2015 and it uses different syntax. + push @cflags, qw(-std=c++11); +} my @early_includes = (); my @INC = qw(-Isrc/libslic3r -Isrc/glew/include);