summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2011-12-20 11:43:14 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2011-12-20 11:43:14 +0000
commit66a603f159951e2600813df7f2be31744d5c6047 (patch)
tree33ac88ff888707ddedc20abeeff2af1d4a471a1d
parent04cfa33705b32165604c6b56724e6bcc3436a86d (diff)
downloadMPC-66a603f159951e2600813df7f2be31744d5c6047.tar.gz
Tue Dec 20 11:42:28 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl>
* modules/VC11ProjectCreator.pm: * modules/VC11WorkspaceCreator.pm: * templates/vc11dll.mpt: * templates/vc11exe.mpt: * templates/vc11lib.mpt: * templates/vc11libexe.mpt: * templates/vc11platforms.mpt: Extended support for vc11 * modules/VC7ProjectCreator.pm: Fixed typo
-rw-r--r--ChangeLog14
-rw-r--r--modules/VC11ProjectCreator.pm36
-rw-r--r--modules/VC11WorkspaceCreator.pm22
-rw-r--r--modules/VC7ProjectCreator.pm2
-rw-r--r--templates/vc11dll.mpt75
-rw-r--r--templates/vc11exe.mpt81
-rw-r--r--templates/vc11lib.mpt77
-rw-r--r--templates/vc11libexe.mpt85
-rw-r--r--templates/vc11platforms.mpt24
9 files changed, 415 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 14a71f70..da20efd0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+Tue Dec 20 11:42:28 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * modules/VC11ProjectCreator.pm:
+ * modules/VC11WorkspaceCreator.pm:
+ * templates/vc11dll.mpt:
+ * templates/vc11exe.mpt:
+ * templates/vc11lib.mpt:
+ * templates/vc11libexe.mpt:
+ * templates/vc11platforms.mpt:
+ Extended support for vc11
+
+ * modules/VC7ProjectCreator.pm:
+ Fixed typo
+
Mon Dec 19 14:55:30 UTC 2011 James H. Hill <hillj at cs dot iupui dot edu>
* config/udm.mpb:
diff --git a/modules/VC11ProjectCreator.pm b/modules/VC11ProjectCreator.pm
index 7c53bfdf..a74b9902 100644
--- a/modules/VC11ProjectCreator.pm
+++ b/modules/VC11ProjectCreator.pm
@@ -18,4 +18,40 @@ use VC10ProjectCreator;
use vars qw(@ISA);
@ISA = qw(VC10ProjectCreator);
+## NOTE: We call the constant as a function to support Perl 5.6.
+my %info = (Creator::cplusplus() => {'ext' => '.vcxproj',
+ 'dllexe' => 'vc11exe',
+ 'libexe' => 'vc11libexe',
+ 'dll' => 'vc11dll',
+ 'lib' => 'vc11lib',
+ 'template' => [ 'vc10', 'vc10filters' ],
+ },
+ );
+
+my %config = ('vcversion' => '10.00',
+ 'prversion' => '10.0.30319.1',
+ 'toolsversion' => '4.0',
+ 'targetframeworkversion' => '4.0',
+ 'xmlheader' => 1
+ );
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub get_info_hash {
+ my($self, $key) = @_;
+
+ ## If we have the setting in our information map, the use it.
+ return $info{$key} if (defined $info{$key});
+
+ ## Otherwise, see if our parent type can take care of it.
+ return $self->SUPER::get_info_hash($key);
+}
+
+sub get_configurable {
+ my($self, $name) = @_;
+ return $config{$name};
+}
+
1;
diff --git a/modules/VC11WorkspaceCreator.pm b/modules/VC11WorkspaceCreator.pm
index e00229ac..eea589e0 100644
--- a/modules/VC11WorkspaceCreator.pm
+++ b/modules/VC11WorkspaceCreator.pm
@@ -19,4 +19,26 @@ use VC10WorkspaceCreator;
use vars qw(@ISA);
@ISA = qw(VC10WorkspaceCreator);
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub pre_workspace {
+ my($self, $fh) = @_;
+ my $crlf = $self->crlf();
+
+ print $fh '', $crlf,
+ 'Microsoft Visual Studio Solution File, Format Version 11.00', $crlf;
+ $self->print_workspace_comment($fh,
+ '# Visual Studio 2011', $crlf,
+ '# $Id$', $crlf,
+ '#', $crlf,
+ '# This file was generated by MPC. Any changes made directly to', $crlf,
+ '# this file will be lost the next time it is generated.', $crlf,
+ '#', $crlf,
+ '# MPC Command:', $crlf,
+ '# ', $self->create_command_line_string($0, @ARGV), $crlf);
+}
+
+
1;
diff --git a/modules/VC7ProjectCreator.pm b/modules/VC7ProjectCreator.pm
index bb5028f3..85975179 100644
--- a/modules/VC7ProjectCreator.pm
+++ b/modules/VC7ProjectCreator.pm
@@ -109,7 +109,7 @@ sub fill_value {
}
## Consult another method for this template name. This method is
- ## overrridden by the other project creators that inherit from this
+ ## overridden by the other project creators that inherit from this
## one.
return $self->get_configurable($name);
}
diff --git a/templates/vc11dll.mpt b/templates/vc11dll.mpt
new file mode 100644
index 00000000..e9bd170a
--- /dev/null
+++ b/templates/vc11dll.mpt
@@ -0,0 +1,75 @@
+// -*- MPC -*-
+// $Id$
+
+conditional_include "common"
+conditional_include "windowscommon"
+
+configurations = Debug Release
+common_defines = WIN32 _WINDOWS _CRT_NONSTDC_NO_WARNINGS
+ConfigurationType = 2
+MinimalRebuild = false
+GenerateDebugInformation = true
+
+conditional_include "vc11platforms"
+
+Release {
+ optimize = MaxSpeed
+ defines = NDEBUG
+ output_dir = Release
+ intermediate_dir = Release
+ EnableIntrinsicFunctions = true
+ WholeProgramOptimization = true
+}
+
+Debug {
+ debug_prj = 1
+ defines = _DEBUG
+ output_dir = .
+ intermediate_dir = Debug
+ lib_modifier = d
+}
+
+Memcheck Release {
+ optimize = MaxSpeed
+ defines = NDEBUG
+ output_dir = Release
+ intermediate_dir = Release
+ BasicRuntimeChecks = 0
+ FixedBaseAddress = 1
+ EnableIntrinsicFunctions = true
+ WholeProgramOptimization = true
+}
+
+Memcheck Debug {
+ debug_prj = 1
+ defines = _DEBUG
+ output_dir = .
+ intermediate_dir = Debug
+ lib_modifier = d
+ BasicRuntimeChecks = 0
+ LinkIncremental = 1
+ FixedBaseAddress = 1
+}
+
+MFC Release {
+ optimize = MaxSpeed
+ defines = NDEBUG
+ output_dir = MFC_Release
+ intermediate_dir = MFC_Release
+ lib_modifier = mfc
+ UseOfMFC = Dynamic
+ EnableIntrinsicFunctions = true
+ WholeProgramOptimization = true
+}
+
+MFC Debug {
+ debug_prj = 1
+ defines = _DEBUG
+ output_dir = MFC_Debug
+ intermediate_dir = MFC_Debug
+ lib_modifier = mfcd
+ UseOfMFC = Dynamic
+}
+
+conditional_include "vcpartialmacros"
+conditional_include "user_vc10dll"
diff --git a/templates/vc11exe.mpt b/templates/vc11exe.mpt
new file mode 100644
index 00000000..dc3e5657
--- /dev/null
+++ b/templates/vc11exe.mpt
@@ -0,0 +1,81 @@
+// -*- MPC -*-
+// $Id$
+
+conditional_include "common"
+conditional_include "windowscommon"
+
+configurations = Debug Release
+common_defines = WIN32 _CONSOLE _CRT_NONSTDC_NO_WARNINGS
+ConfigurationType = 1
+SubSystem = Console
+MinimalRebuild = false
+GenerateDebugInformation = true
+
+conditional_include "vc11platforms"
+
+Release {
+ LinkIncremental = 1
+ optimize = MaxSpeed
+ defines = NDEBUG
+ output_dir = Release
+ intermediate_dir = Release
+ EnableIntrinsicFunctions = true
+ WholeProgramOptimization = true
+}
+
+Debug {
+ debug_prj = 1
+ defines = _DEBUG
+ intermediate_dir = Debug
+ lib_modifier = d
+}
+
+Memcheck Release {
+ optimize = MaxSpeed
+ defines = NDEBUG
+ output_dir = Release
+ intermediate_dir = Release
+ BasicRuntimeChecks = 0
+ LinkIncremental = 1
+ FixedBaseAddress = 1
+ EnableIntrinsicFunctions = true
+ WholeProgramOptimization = true
+}
+
+Memcheck Debug {
+ debug_prj = 1
+ defines = _DEBUG
+ intermediate_dir = Debug
+ lib_modifier = d
+ BasicRuntimeChecks = 0
+ LinkIncremental = 1
+ FixedBaseAddress = 1
+}
+
+MFC Release {
+ LinkIncremental = 1
+ optimize = MaxSpeed
+ common_defines = WIN32 _WINDOWS
+ defines = NDEBUG _AFXDLL
+ output_dir = MFC_Release
+ intermediate_dir = MFC_Release
+ lib_modifier = mfc
+ UseOfMFC = Dynamic
+ unicode_mfc_entry = wWinMainCRTStartup
+ EnableIntrinsicFunctions = true
+ WholeProgramOptimization = true
+}
+
+MFC Debug {
+ debug_prj = 1
+ common_defines = WIN32 _WINDOWS
+ defines = _DEBUG _AFXDLL
+ output_dir = MFC_Debug
+ intermediate_dir = MFC_Debug
+ lib_modifier = mfcd
+ UseOfMFC = Dynamic
+ unicode_mfc_entry = wWinMainCRTStartup
+}
+
+conditional_include "vcpartialmacros"
+conditional_include "user_vc10exe"
diff --git a/templates/vc11lib.mpt b/templates/vc11lib.mpt
new file mode 100644
index 00000000..74d12a7b
--- /dev/null
+++ b/templates/vc11lib.mpt
@@ -0,0 +1,77 @@
+// -*- MPC -*-
+// $Id$
+
+conditional_include "common"
+conditional_include "windowscommon"
+
+configurations = Debug Release
+common_defines = WIN32 _WINDOWS _CRT_NONSTDC_NO_WARNINGS
+ConfigurationType = 4
+MinimalRebuild = false
+GenerateDebugInformation = true
+
+conditional_include "vc11platforms"
+
+Release {
+ optimize = MaxSpeed
+ defines = NDEBUG
+ output_dir = Static_Release
+ intermediate_dir = Static_Release
+ lib_modifier = s
+ EnableIntrinsicFunctions = true
+ WholeProgramOptimization = true
+}
+
+Debug {
+ debug_prj = 1
+ defines = _DEBUG
+ output_dir = Static_Debug
+ intermediate_dir = Static_Debug
+ lib_modifier = sd
+}
+
+Memcheck Release {
+ optimize = MaxSpeed
+ defines = NDEBUG
+ output_dir = Static_Release
+ intermediate_dir = Static_Release
+ lib_modifier = s
+ BasicRuntimeChecks = 0
+ FixedBaseAddress = 1
+ EnableIntrinsicFunctions = true
+ WholeProgramOptimization = true
+}
+
+Memcheck Debug {
+ debug_prj = 1
+ defines = _DEBUG
+ output_dir = Static_Debug
+ intermediate_dir = Static_Debug
+ lib_modifier = sd
+ BasicRuntimeChecks = 0
+ LinkIncremental = 1
+ FixedBaseAddress = 1
+}
+
+MFC Release {
+ optimize = MaxSpeed
+ defines = NDEBUG
+ output_dir = Static_MFC_Release
+ intermediate_dir = Static_MFC_Release
+ lib_modifier = mfcs
+ UseOfMFC = Dynamic
+ EnableIntrinsicFunctions = true
+ WholeProgramOptimization = true
+}
+
+MFC Debug {
+ debug_prj = 1
+ defines = _DEBUG
+ output_dir = Static_MFC_Debug
+ intermediate_dir = Static_MFC_Debug
+ lib_modifier = mfcsd
+ UseOfMFC = Dynamic
+}
+
+conditional_include "vcpartialmacros"
+conditional_include "user_vc10lib"
diff --git a/templates/vc11libexe.mpt b/templates/vc11libexe.mpt
new file mode 100644
index 00000000..fc259a63
--- /dev/null
+++ b/templates/vc11libexe.mpt
@@ -0,0 +1,85 @@
+// -*- MPC -*-
+// $Id$
+
+conditional_include "common"
+conditional_include "windowscommon"
+
+configurations = Debug Release
+common_defines = WIN32 _CONSOLE _CRT_NONSTDC_NO_WARNINGS
+ConfigurationType = 1
+SubSystem = Console
+MinimalRebuild = false
+GenerateDebugInformation = true
+
+conditional_include "vc11platforms"
+
+Release {
+ LinkIncremental = 1
+ optimize = MaxSpeed
+ defines = NDEBUG
+ output_dir = Static_Release
+ intermediate_dir = Static_Release
+ lib_modifier = s
+ EnableIntrinsicFunctions = true
+ WholeProgramOptimization = true
+}
+
+Debug {
+ debug_prj = 1
+ defines = _DEBUG
+ output_dir = Static_Debug
+ intermediate_dir = Static_Debug
+ lib_modifier = sd
+}
+
+Memcheck Release {
+ optimize = MaxSpeed
+ defines = NDEBUG
+ output_dir = Static_Release
+ intermediate_dir = Static_Release
+ lib_modifier = s
+ BasicRuntimeChecks = 0
+ LinkIncremental = 1
+ FixedBaseAddress = 1
+ EnableIntrinsicFunctions = true
+ WholeProgramOptimization = true
+}
+
+Memcheck Debug {
+ debug_prj = 1
+ defines = _DEBUG
+ output_dir = Static_Debug
+ intermediate_dir = Static_Debug
+ lib_modifier = sd
+ BasicRuntimeChecks = 0
+ LinkIncremental = 1
+ FixedBaseAddress = 1
+}
+
+MFC Release {
+ LinkIncremental = 1
+ optimize = MaxSpeed
+ common_defines = WIN32 _WINDOWS
+ defines = NDEBUG _AFXDLL
+ output_dir = Static_MFC_Release
+ intermediate_dir = Static_MFC_Release
+ lib_modifier = mfcs
+ UseOfMFC = Dynamic
+ unicode_mfc_entry = wWinMainCRTStartup
+ EnableIntrinsicFunctions = true
+ WholeProgramOptimization = true
+}
+
+MFC Debug {
+ debug_prj = 1
+ common_defines = WIN32 _WINDOWS
+ defines = _DEBUG _AFXDLL
+ output_dir = Static_MFC_Debug
+ intermediate_dir = Static_MFC_Debug
+ lib_modifier = mfcsd
+ UseOfMFC = Dynamic
+ unicode_mfc_entry = wWinMainCRTStartup
+}
+
+conditional_include "vcpartialmacros"
+conditional_include "user_vc10libexe"
diff --git a/templates/vc11platforms.mpt b/templates/vc11platforms.mpt
new file mode 100644
index 00000000..b5cc1ae2
--- /dev/null
+++ b/templates/vc11platforms.mpt
@@ -0,0 +1,24 @@
+// -*- MPC -*-
+// $Id$
+//
+// Any of these platforms can set using value_template platforms=
+// when generating solutions/projects.
+//
+//platforms = Win32 x64
+
+platforms = Win32 x64
+default_platform = Win32
+PlatformToolset = v110
+
+Win32 {
+ output_subdir = I386
+}
+
+x64 {
+ output_subdir = AMD64
+ cpu_defines = _AMD64_
+ platform_defines = _WIN64
+ TargetMachine = "0" // We let VC++ figure it out for us.
+ link_options = /machine:AMD64
+}
+