Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit15f16ec

Browse files
committed
Don't duplicate references and libraries in MSVC scripts
In order not to duplicate references and libraries in the Visual Studioproject files produced by the MSVC build scripts, have them check if aparticular reference or library already exists before adding the same oneagain.Reviewed-by: Álvaro Herrera, Andrew Dunstan, Dagfinn Ilmari MannsåkerDiscussion:https://postgr.es/m/CAApHDvpo6g5csCTjc_0C7DMvgFPomVb0Rh-AcW5afd=Ya=LRuw@mail.gmail.com
1 parent33d74c5 commit15f16ec

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

‎src/tools/msvc/Project.pm

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ sub AddReference
124124

125125
while (my$ref =shift)
126126
{
127-
push @{$self->{references} },$ref;
127+
if (!grep {$_eq$ref} @{$self->{references} })
128+
{
129+
push @{$self->{references} },$ref;
130+
}
128131
$self->AddLibrary(
129132
"__CFGNAME__/" .$ref->{name} ."/" .$ref->{name} .".lib");
130133
}
@@ -141,7 +144,11 @@ sub AddLibrary
141144
$lib ='"' .$lib .""";
142145
}
143146

144-
push @{$self->{libraries} },$lib;
147+
if (!grep {$_eq$lib} @{$self->{libraries} })
148+
{
149+
push @{$self->{libraries} },$lib;
150+
}
151+
145152
if ($dbgsuffix)
146153
{
147154
push @{$self->{suffixlib} },$lib;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp