Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d299eb4

Browse files
committed
MSVC: Pass any user-set MSBFLAGS to MSBuild and VCBUILD.
This is particularly useful to pass /m, to perform a parallel build. Christian Ullrich, reviewed by Michael Paquier.
1 parent 976a9bb commit d299eb4

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

doc/src/sgml/install-windows.sgml

+8
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,14 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
145145
</programlisting>
146146
</para>
147147

148+
<para>
149+
To pass additional command line arguments to the Visual Studio build
150+
command (msbuild or vcbuild):
151+
<programlisting>
152+
$ENV{MSBFLAGS}="/m";
153+
</programlisting>
154+
</para>
155+
148156
<sect2>
149157
<title>Requirements</title>
150158
<para>

src/tools/msvc/build.pl

+4-3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ BEGIN
3838
# check what sort of build we are doing
3939

4040
my $bconf = $ENV{CONFIG} || "Release";
41+
my $msbflags = $ENV{MSBFLAGS} || "";
4142
my $buildwhat = $ARGV[1] || "";
4243
if (uc($ARGV[0]) eq 'DEBUG')
4344
{
@@ -53,16 +54,16 @@ BEGIN
5354
if ($buildwhat and $vcver >= 10.00)
5455
{
5556
system(
56-
"msbuild $buildwhat.vcxproj /verbosity:normal /p:Configuration=$bconf"
57+
"msbuild $buildwhat.vcxproj $msbflags /verbosity:normal /p:Configuration=$bconf"
5758
);
5859
}
5960
elsif ($buildwhat)
6061
{
61-
system("vcbuild $buildwhat.vcproj $bconf");
62+
system("vcbuild $msbflags $buildwhat.vcproj $bconf");
6263
}
6364
else
6465
{
65-
system("msbuild pgsql.sln /verbosity:normal /p:Configuration=$bconf");
66+
system("msbuild pgsql.sln $msbflags /verbosity:normal /p:Configuration=$bconf");
6667
}
6768

6869
# report status

src/tools/msvc/clean.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,6 @@ REM for /r %%f in (*.sql) do if exist %%f.in del %%f
107107
cd %D%
108108

109109
REM Clean up ecpg regression test files
110-
msbuild /NoLogo ecpg_regression.proj /t:clean /v:q
110+
msbuild %MSBFLAGS% /NoLogo ecpg_regression.proj /t:clean /v:q
111111

112112
goto :eof

src/tools/msvc/vcregress.pl

+2-1
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,9 @@ sub check
138138

139139
sub ecpgcheck
140140
{
141+
my $msbflags = $ENV{MSBFLAGS} || "";
141142
chdir $startdir;
142-
system("msbuild ecpg_regression.proj /p:config=$Config");
143+
system("msbuild ecpg_regression.proj $msbflags /p:config=$Config");
143144
my $status = $? >> 8;
144145
exit $status if $status;
145146
InstallTemp();

0 commit comments

Comments
 (0)