Commit d299eb41 authored by Noah Misch's avatar Noah Misch

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.
parent 976a9bbd
...@@ -145,6 +145,14 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin'; ...@@ -145,6 +145,14 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
</programlisting> </programlisting>
</para> </para>
<para>
To pass additional command line arguments to the Visual Studio build
command (msbuild or vcbuild):
<programlisting>
$ENV{MSBFLAGS}="/m";
</programlisting>
</para>
<sect2> <sect2>
<title>Requirements</title> <title>Requirements</title>
<para> <para>
......
...@@ -38,6 +38,7 @@ my $vcver = Mkvcbuild::mkvcbuild($config); ...@@ -38,6 +38,7 @@ my $vcver = Mkvcbuild::mkvcbuild($config);
# check what sort of build we are doing # check what sort of build we are doing
my $bconf = $ENV{CONFIG} || "Release"; my $bconf = $ENV{CONFIG} || "Release";
my $msbflags = $ENV{MSBFLAGS} || "";
my $buildwhat = $ARGV[1] || ""; my $buildwhat = $ARGV[1] || "";
if (uc($ARGV[0]) eq 'DEBUG') if (uc($ARGV[0]) eq 'DEBUG')
{ {
...@@ -53,16 +54,16 @@ elsif (uc($ARGV[0]) ne "RELEASE") ...@@ -53,16 +54,16 @@ elsif (uc($ARGV[0]) ne "RELEASE")
if ($buildwhat and $vcver >= 10.00) if ($buildwhat and $vcver >= 10.00)
{ {
system( system(
"msbuild $buildwhat.vcxproj /verbosity:normal /p:Configuration=$bconf" "msbuild $buildwhat.vcxproj $msbflags /verbosity:normal /p:Configuration=$bconf"
); );
} }
elsif ($buildwhat) elsif ($buildwhat)
{ {
system("vcbuild $buildwhat.vcproj $bconf"); system("vcbuild $msbflags $buildwhat.vcproj $bconf");
} }
else else
{ {
system("msbuild pgsql.sln /verbosity:normal /p:Configuration=$bconf"); system("msbuild pgsql.sln $msbflags /verbosity:normal /p:Configuration=$bconf");
} }
# report status # report status
......
...@@ -107,6 +107,6 @@ REM for /r %%f in (*.sql) do if exist %%f.in del %%f ...@@ -107,6 +107,6 @@ REM for /r %%f in (*.sql) do if exist %%f.in del %%f
cd %D% cd %D%
REM Clean up ecpg regression test files REM Clean up ecpg regression test files
msbuild /NoLogo ecpg_regression.proj /t:clean /v:q msbuild %MSBFLAGS% /NoLogo ecpg_regression.proj /t:clean /v:q
goto :eof goto :eof
...@@ -138,8 +138,9 @@ sub check ...@@ -138,8 +138,9 @@ sub check
sub ecpgcheck sub ecpgcheck
{ {
my $msbflags = $ENV{MSBFLAGS} || "";
chdir $startdir; chdir $startdir;
system("msbuild ecpg_regression.proj /p:config=$Config"); system("msbuild ecpg_regression.proj $msbflags /p:config=$Config");
my $status = $? >> 8; my $status = $? >> 8;
exit $status if $status; exit $status if $status;
InstallTemp(); InstallTemp();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment