Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund2018-08-24 01:33:40 +0000
committerAndres Freund2018-08-24 01:33:57 +0000
commitd9dd406fe281d22d5238d3c26a7182543c711e74 (patch)
treeacf080f7799ae2ce67b68aa28db812266ff238fe /src/tools/msvc/MSBuildProject.pm
parenta569eea6998a26689409ff6eb5fce2c1eab0f5e1 (diff)
Require C99 (and thus MSCV 2013 upwards).
In 86d78ef50e01 I enabled configure to check for C99 support, with the goal of checking which platforms support C99. While there are a few machines without C99 support among our buildfarm animals, de-supporting them for v12 was deemed acceptable. While not tested in aforementioned commit, the biggest increase in minimum compiler version comes from MSVC, which gained C99 support fairly late. The subset in MSVC 2013 is sufficient for our needs, at this point. While that is a significant increase in minimum version, the existing windows binaries are already built with a new enough version. Make configure error out if C99 support could not be detected. For MSVC builds, increase the minimum version to 2013. The increase to MSVC 2013 allows us to get rid of VCBuildProject.pm, as that was only required for MSVC 2005/2008. Author: Andres Freund Discussion: https://postgr.es/m/97d4b165-192d-3605-749c-f614a0c4e783@2ndquadrant.com
Diffstat (limited to 'src/tools/msvc/MSBuildProject.pm')
-rw-r--r--src/tools/msvc/MSBuildProject.pm78
1 files changed, 5 insertions, 73 deletions
diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm
index 47252533a1b..149213378cf 100644
--- a/src/tools/msvc/MSBuildProject.pm
+++ b/src/tools/msvc/MSBuildProject.pm
@@ -1,7 +1,7 @@
package MSBuildProject;
#
-# Package that encapsulates a MSBuild project file (Visual C++ 2010 or greater)
+# Package that encapsulates a MSBuild project file (Visual C++ 2013 or greater)
#
# src/tools/msvc/MSBuildProject.pm
#
@@ -257,6 +257,7 @@ sub WriteConfigurationPropertyGroup
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>$p->{wholeopt}</WholeProgramOptimization>
+ <PlatformToolset>$self->{PlatformToolset}</PlatformToolset>
</PropertyGroup>
EOF
return;
@@ -391,75 +392,6 @@ EOF
return;
}
-package VC2010Project;
-
-#
-# Package that encapsulates a Visual C++ 2010 project file
-#
-
-use strict;
-use warnings;
-use base qw(MSBuildProject);
-
-no warnings qw(redefine); ## no critic
-
-sub new
-{
- my $classname = shift;
- my $self = $classname->SUPER::_new(@_);
- bless($self, $classname);
-
- $self->{vcver} = '10.00';
-
- return $self;
-}
-
-package VC2012Project;
-
-#
-# Package that encapsulates a Visual C++ 2012 project file
-#
-
-use strict;
-use warnings;
-use base qw(MSBuildProject);
-
-no warnings qw(redefine); ## no critic
-
-sub new
-{
- my $classname = shift;
- my $self = $classname->SUPER::_new(@_);
- bless($self, $classname);
-
- $self->{vcver} = '11.00';
- $self->{PlatformToolset} = 'v110';
-
- return $self;
-}
-
-# This override adds the <PlatformToolset> element
-# to the PropertyGroup labeled "Configuration"
-sub WriteConfigurationPropertyGroup
-{
- my ($self, $f, $cfgname, $p) = @_;
- my $cfgtype =
- ($self->{type} eq "exe")
- ? 'Application'
- : ($self->{type} eq "dll" ? 'DynamicLibrary' : 'StaticLibrary');
-
- print $f <<EOF;
- <PropertyGroup Condition="'\$(Configuration)|\$(Platform)'=='$cfgname|$self->{platform}'" Label="Configuration">
- <ConfigurationType>$cfgtype</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <WholeProgramOptimization>$p->{wholeopt}</WholeProgramOptimization>
- <PlatformToolset>$self->{PlatformToolset}</PlatformToolset>
- </PropertyGroup>
-EOF
- return;
-}
-
package VC2013Project;
#
@@ -468,7 +400,7 @@ package VC2013Project;
use strict;
use warnings;
-use base qw(VC2012Project);
+use base qw(MSBuildProject);
no warnings qw(redefine); ## no critic
@@ -493,7 +425,7 @@ package VC2015Project;
use strict;
use warnings;
-use base qw(VC2012Project);
+use base qw(MSBuildProject);
no warnings qw(redefine); ## no critic
@@ -518,7 +450,7 @@ package VC2017Project;
use strict;
use warnings;
-use base qw(VC2012Project);
+use base qw(MSBuildProject);
no warnings qw(redefine); ## no critic