aboutsummaryrefslogtreecommitdiff
path: root/src/tools/msvc/Project.pm
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2007-01-26 17:45:42 +0000
committerNeil Conway <neilc@samurai.com>2007-01-26 17:45:42 +0000
commit8ff2bccee31a7be12f653bc533b3e76c052534f8 (patch)
treef56dcf47c08037f04974372492ce5a660d303472 /src/tools/msvc/Project.pm
parent8924c568202122075ae666e8815bc2960496754c (diff)
downloadpostgresql-8ff2bccee31a7be12f653bc533b3e76c052534f8.tar.gz
postgresql-8ff2bccee31a7be12f653bc533b3e76c052534f8.zip
Squelch some VC++ compiler warnings. Mark float literals with the "f"
suffix, to distinguish them from doubles. Make some function declarations and definitions use the "const" qualifier for arguments consistently. Ignore warning 4102 ("unreferenced label"), because such warnings are always emitted by bison-generated code. Patch from Magnus Hagander.
Diffstat (limited to 'src/tools/msvc/Project.pm')
-rw-r--r--src/tools/msvc/Project.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/tools/msvc/Project.pm b/src/tools/msvc/Project.pm
index 362611114a0..437940c2747 100644
--- a/src/tools/msvc/Project.pm
+++ b/src/tools/msvc/Project.pm
@@ -23,7 +23,8 @@ sub new {
includes => '',
defines => ';',
solution => $solution,
- disablewarnings => '4018;4244;4273',
+ disablewarnings => '4018;4244;4273;4102',
+ disablelinkerwarnings => ''
};
bless $self;
@@ -242,6 +243,13 @@ sub AddResourceFile {
$self->AddFile("$dir\\win32ver.rc");
}
+sub DisableLinkerWarnings {
+ my ($self, $warnings) = @_;
+
+ $self->{disablelinkerwarnings} .= ';' unless ($self->{disablelinkerwarnings} eq '');
+ $self->{disablelinkerwarnings} .= $warnings;
+}
+
sub Save {
my ($self) = @_;
@@ -390,6 +398,9 @@ EOF
GenerateMapFile="FALSE" MapFileName=".\\$cfgname\\$self->{name}\\$self->{name}.map"
SubSystem="1" TargetMachine="1"
EOF
+ if ($self->{disablelinkerwarnings}) {
+ print $f "\t\tAdditionalOptions=\"/ignore:$self->{disablelinkerwarnings}\"\n";
+ }
if ($self->{implib}) {
my $l = $self->{implib};
$l =~ s/__CFGNAME__/$cfgname/g;