mirror of
https://github.com/postgres/postgres.git
synced 2025-04-21 12:05:57 +03:00
Don't duplicate references and libraries in MSVC scripts
In order not to duplicate references and libraries in the Visual Studio project files produced by the MSVC build scripts, have them check if a particular reference or library already exists before adding the same one again. Reviewed-by: Álvaro Herrera, Andrew Dunstan, Dagfinn Ilmari Mannsåker Discussion: https://postgr.es/m/CAApHDvpo6g5csCTjc_0C7DMvgFPomVb0Rh-AcW5afd=Ya=LRuw@mail.gmail.com
This commit is contained in:
parent
33d74c5d00
commit
15f16ec651
@ -124,7 +124,10 @@ sub AddReference
|
|||||||
|
|
||||||
while (my $ref = shift)
|
while (my $ref = shift)
|
||||||
{
|
{
|
||||||
push @{ $self->{references} }, $ref;
|
if (! grep { $_ eq $ref} @{ $self->{references} })
|
||||||
|
{
|
||||||
|
push @{ $self->{references} }, $ref;
|
||||||
|
}
|
||||||
$self->AddLibrary(
|
$self->AddLibrary(
|
||||||
"__CFGNAME__/" . $ref->{name} . "/" . $ref->{name} . ".lib");
|
"__CFGNAME__/" . $ref->{name} . "/" . $ref->{name} . ".lib");
|
||||||
}
|
}
|
||||||
@ -141,7 +144,11 @@ sub AddLibrary
|
|||||||
$lib = '"' . $lib . """;
|
$lib = '"' . $lib . """;
|
||||||
}
|
}
|
||||||
|
|
||||||
push @{ $self->{libraries} }, $lib;
|
if (! grep { $_ eq $lib} @{ $self->{libraries} })
|
||||||
|
{
|
||||||
|
push @{ $self->{libraries} }, $lib;
|
||||||
|
}
|
||||||
|
|
||||||
if ($dbgsuffix)
|
if ($dbgsuffix)
|
||||||
{
|
{
|
||||||
push @{ $self->{suffixlib} }, $lib;
|
push @{ $self->{suffixlib} }, $lib;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user