aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2016-09-08 01:42:09 -0400
committerNoah Misch <noah@leadboat.com>2016-09-08 01:42:09 -0400
commitd299eb41dfc7b73dec80f22554b952f01c9d54a4 (patch)
treeb3b30189bb3c848aadb2aaf501688d719c779b32 /src
parent976a9bbd0251ea112898f85314646801e7e6207d (diff)
downloadpostgresql-d299eb41dfc7b73dec80f22554b952f01c9d54a4.tar.gz
postgresql-d299eb41dfc7b73dec80f22554b952f01c9d54a4.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/tools/msvc/build.pl7
-rwxr-xr-xsrc/tools/msvc/clean.bat2
-rw-r--r--src/tools/msvc/vcregress.pl3
3 files changed, 7 insertions, 5 deletions
diff --git a/src/tools/msvc/build.pl b/src/tools/msvc/build.pl
index 007e3c73b25..52739774c79 100644
--- a/src/tools/msvc/build.pl
+++ b/src/tools/msvc/build.pl
@@ -38,6 +38,7 @@ my $vcver = Mkvcbuild::mkvcbuild($config);
# check what sort of build we are doing
my $bconf = $ENV{CONFIG} || "Release";
+my $msbflags = $ENV{MSBFLAGS} || "";
my $buildwhat = $ARGV[1] || "";
if (uc($ARGV[0]) eq 'DEBUG')
{
@@ -53,16 +54,16 @@ elsif (uc($ARGV[0]) ne "RELEASE")
if ($buildwhat and $vcver >= 10.00)
{
system(
- "msbuild $buildwhat.vcxproj /verbosity:normal /p:Configuration=$bconf"
+ "msbuild $buildwhat.vcxproj $msbflags /verbosity:normal /p:Configuration=$bconf"
);
}
elsif ($buildwhat)
{
- system("vcbuild $buildwhat.vcproj $bconf");
+ system("vcbuild $msbflags $buildwhat.vcproj $bconf");
}
else
{
- system("msbuild pgsql.sln /verbosity:normal /p:Configuration=$bconf");
+ system("msbuild pgsql.sln $msbflags /verbosity:normal /p:Configuration=$bconf");
}
# report status
diff --git a/src/tools/msvc/clean.bat b/src/tools/msvc/clean.bat
index 469b8a24b29..e21e37f6f76 100755
--- a/src/tools/msvc/clean.bat
+++ b/src/tools/msvc/clean.bat
@@ -107,6 +107,6 @@ REM for /r %%f in (*.sql) do if exist %%f.in del %%f
cd %D%
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
diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl
index b4f946474f5..bcf22677acd 100644
--- a/src/tools/msvc/vcregress.pl
+++ b/src/tools/msvc/vcregress.pl
@@ -138,8 +138,9 @@ sub check
sub ecpgcheck
{
+ my $msbflags = $ENV{MSBFLAGS} || "";
chdir $startdir;
- system("msbuild ecpg_regression.proj /p:config=$Config");
+ system("msbuild ecpg_regression.proj $msbflags /p:config=$Config");
my $status = $? >> 8;
exit $status if $status;
InstallTemp();