summaryrefslogtreecommitdiff
path: root/src/tools/msvc/VSObjectFactory.pm
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2013-02-06 14:52:29 -0500
committerAndrew Dunstan <andrew@dunslane.net>2013-02-06 14:52:29 -0500
commite1c1e2173248f39c1b15fca7b2a31ad7b5199ce7 (patch)
treedb58fc5d34d7812a88b144ce4f573fe74406e402 /src/tools/msvc/VSObjectFactory.pm
parent5a1cd89f8f4a0bc13c85810de47d48bb6386ea89 (diff)
downloadpostgresql-e1c1e2173248f39c1b15fca7b2a31ad7b5199ce7.tar.gz
Enable building with Microsoft Visual Studio 2012.
Backpatch to release 9.2 Brar Piening and Noah Misch, reviewed by Craig Ringer.
Diffstat (limited to 'src/tools/msvc/VSObjectFactory.pm')
-rw-r--r--src/tools/msvc/VSObjectFactory.pm14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/tools/msvc/VSObjectFactory.pm b/src/tools/msvc/VSObjectFactory.pm
index c3aa33ec24..0fbf3faa0e 100644
--- a/src/tools/msvc/VSObjectFactory.pm
+++ b/src/tools/msvc/VSObjectFactory.pm
@@ -41,6 +41,10 @@ sub CreateSolution
{
return new VS2010Solution(@_);
}
+ elsif ($visualStudioVersion eq '11.00')
+ {
+ return new VS2012Solution(@_);
+ }
else
{
croak "The requested Visual Studio version is not supported.";
@@ -68,6 +72,10 @@ sub CreateProject
{
return new VC2010Project(@_);
}
+ elsif ($visualStudioVersion eq '11.00')
+ {
+ return new VC2012Project(@_);
+ }
else
{
croak "The requested Visual Studio version is not supported.";
@@ -82,7 +90,7 @@ sub DetermineVisualStudioVersion
{
# Determine version of nmake command, to set proper version of visual studio
-# we use nmake as it has existed for a long time and still exists in visual studio 2010
+# we use nmake as it has existed for a long time and still exists in current visual studio versions
open(P, "nmake /? 2>&1 |")
|| croak
"Unable to determine Visual Studio version: The nmake command wasn't found.";
@@ -107,11 +115,11 @@ sub DetermineVisualStudioVersion
sub _GetVisualStudioVersion
{
my ($major, $minor) = @_;
- if ($major > 10)
+ if ($major > 11)
{
carp
"The determined version of Visual Studio is newer than the latest supported version. Returning the latest supported version instead.";
- return '10.00';
+ return '11.00';
}
elsif ($major < 6)
{