summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2006-01-30 18:08:45 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2006-01-30 18:08:45 +0000
commitd505aec9ae80fb7c675cf749f7a74826f68c66ed (patch)
tree525eaa6ac4776f7e4bae6bc0e2bbec2dbd2dd7b4
parent0699bbbd41a76ed72364ce9ed6286a38d128abc6 (diff)
downloadMPC-d505aec9ae80fb7c675cf749f7a74826f68c66ed.tar.gz
ChangeLogTag: Mon Jan 30 12:07:35 2006 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ChangeLog66
-rw-r--r--PROBLEM-REPORT-FORM2
-rw-r--r--README4
-rw-r--r--USAGE8
-rw-r--r--modules/BDSProjectCreator.pm3
-rw-r--r--modules/BDSWorkspaceCreator.pm10
-rw-r--r--modules/BMakeProjectCreator.pm2
-rw-r--r--modules/CBXProjectCreator.pm3
-rw-r--r--modules/CBXWorkspaceCreator.pm10
-rw-r--r--modules/GHSWorkspaceCreator.pm2
-rw-r--r--modules/HTMLProjectCreator.pm3
-rw-r--r--modules/ProjectCreator.pm138
-rw-r--r--modules/SLEProjectCreator.pm3
-rw-r--r--modules/SLEWorkspaceCreator.pm3
-rw-r--r--modules/VC7ProjectCreator.pm26
-rw-r--r--modules/XMLProjectBase.pm43
-rw-r--r--templates/bmake.mpd16
-rw-r--r--templates/vc7.mpd9
-rw-r--r--templates/vc7dll.mpt25
-rw-r--r--templates/vc7exe.mpt25
-rw-r--r--templates/vc7lib.mpt22
-rw-r--r--templates/vc7libexe.mpt26
-rw-r--r--templates/vc8.mpd6
-rw-r--r--templates/vc8dll.mpt21
-rw-r--r--templates/vc8exe.mpt22
-rw-r--r--templates/vc8lib.mpt20
-rw-r--r--templates/vc8libexe.mpt22
27 files changed, 424 insertions, 116 deletions
diff --git a/ChangeLog b/ChangeLog
index 578eb264..3b8f9b95 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,69 @@
+Mon Jan 30 12:07:35 2006 Chad Elliott <elliott_c@ociweb.com>
+
+ * PROBLEM-REPORT-FORM:
+
+ Added a section to provide the Perl version.
+
+ * README:
+
+ Updated the valid command line options for workspaces with the
+ -language option.
+
+ * USAGE:
+
+ Documented the -value_template option and provided an example
+ where spaces needed to be retained.
+
+ * modules/XMLProjectBase.pm:
+ * modules/BDSProjectCreator.pm:
+ * modules/CBXProjectCreator.pm:
+ * modules/HTMLProjectCreator.pm:
+ * modules/SLEProjectCreator.pm:
+ * modules/VC7ProjectCreator.pm:
+
+ Created a new project base for XML based project creators. The
+ trend in projects seem to be going toward XML so we can minimize
+ the amount of repeated code by using the XMLProjectBase.
+
+ * modules/BDSWorkspaceCreator.pm:
+ * modules/CBXWorkspaceCreator.pm:
+ * modules/GHSWorkspaceCreator.pm:
+ * modules/SLEWorkspaceCreator.pm:
+
+ Tell the sort_dependencies() method that we do not want sorting
+ by directory groups.
+
+ * modules/BMakeProjectCreator.pm:
+
+ Removed an unnecessary check of convert_slashes().
+
+ * modules/ProjectCreator.pm:
+
+ Provided support for use of <% %> variables within all of MPC
+ project keywords. The list of valid variables only includes the
+ pseudo variables listed under 'postbuild' in the README.
+
+ * templates/bmake.mpd:
+
+ Utilize the 'transdir' template function to fully support files
+ with .. in the path name.
+
+ * templates/vc7.mpd:
+ * templates/vc7dll.mpt:
+ * templates/vc7exe.mpt:
+ * templates/vc7lib.mpt:
+ * templates/vc7libexe.mpt:
+ * templates/vc8.mpd:
+ * templates/vc8dll.mpt:
+ * templates/vc8exe.mpt:
+ * templates/vc8lib.mpt:
+ * templates/vc8libexe.mpt:
+
+ Added two new configurations (not generated by default) called
+ 'Memcheck Debug' and 'Memcheck Release'. These configurations
+ provide settings that are amenable to external memory checking
+ tools.
+
Wed Jan 25 11:40:37 2006 Chad Elliott <elliott_c@ociweb.com>
* modules/WorkspaceCreator.pm:
diff --git a/PROBLEM-REPORT-FORM b/PROBLEM-REPORT-FORM
index 31841cf9..588ce2ee 100644
--- a/PROBLEM-REPORT-FORM
+++ b/PROBLEM-REPORT-FORM
@@ -13,6 +13,8 @@ When requesting MPC support please provide the following items:
MPC version (using mwc.pl -version):
+ Perl version (using perl --version):
+
ACE or TAO version (if using either):
The contents of default.features (if any):
diff --git a/README b/README
index 52e01a8e..437eedf4 100644
--- a/README
+++ b/README
@@ -731,8 +731,8 @@ currently only two assignments allowed.
The first is 'cmdline'. The values given to the cmdline assignment will be
processed as command line options, but only to the projects that are
contained within the workspace (or the scope of the assignment). The only
-valid command line options for cmdline are -base, -global, -include, -ti,
--template, -static, -relative, -notoplevel, -value_template
+valid command line options for cmdline are -base, -global, -include,
+-language, -ti, -template, -static, -relative, -notoplevel, -value_template
and -value_project.
The second assignment is 'implicit'. This assignment takes two different
diff --git a/USAGE b/USAGE
index d63e757f..0184a238 100644
--- a/USAGE
+++ b/USAGE
@@ -183,6 +183,14 @@ specified by this option overwrite values from features files.
Example:
mwc.pl -features "qos=1,ssl=0" ace.mwc
+The -value_template option can be used to set various template variables.
+If a template variable value will contain spaces, it is best to enclose the
+whole setting in double quotes and use single quotes within the value to
+retain spaces (if it is necessary). Below is an example where the value
+will have spaces and some spaces need to be retained.
+
+mwc.pl -value_template "configurations=Debug Release 'Memcheck Debug' 'Memcheck Release'"
+
Running only the Project Generator
----------------------------------
diff --git a/modules/BDSProjectCreator.pm b/modules/BDSProjectCreator.pm
index c3ec300e..4fb640cf 100644
--- a/modules/BDSProjectCreator.pm
+++ b/modules/BDSProjectCreator.pm
@@ -14,9 +14,10 @@ use strict;
use ProjectCreator;
use WinProjectBase;
+use XMLProjectBase;
use vars qw(@ISA);
-@ISA = qw(WinProjectBase ProjectCreator);
+@ISA = qw(XMLProjectBase WinProjectBase ProjectCreator);
# ************************************************************
# Subroutine Section
diff --git a/modules/BDSWorkspaceCreator.pm b/modules/BDSWorkspaceCreator.pm
index 77417319..1885c1ce 100644
--- a/modules/BDSWorkspaceCreator.pm
+++ b/modules/BDSWorkspaceCreator.pm
@@ -49,11 +49,9 @@ sub pre_workspace {
sub write_comps {
- my($self) = shift;
- my($fh) = shift;
- my($projects) = $self->get_projects();
- my(@list) = $self->sort_dependencies($projects);
- my($crlf) = $self->crlf();
+ my($self) = shift;
+ my($fh) = shift;
+ my($crlf) = $self->crlf();
print $fh '<BorlandProject>', $crlf;
print $fh ' <PersonalityInfo>', $crlf;
@@ -68,7 +66,7 @@ sub write_comps {
print $fh ' ', $crlf;
print $fh ' <Projects>', $crlf;
- foreach my $project (@list) {
+ foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) {
print $fh ' <Projects Name="$project">$project</Projects>', $crlf,
}
diff --git a/modules/BMakeProjectCreator.pm b/modules/BMakeProjectCreator.pm
index 30a976bd..3863cd22 100644
--- a/modules/BMakeProjectCreator.pm
+++ b/modules/BMakeProjectCreator.pm
@@ -38,7 +38,7 @@ sub fill_value {
if ($dirname eq '') {
$dirname = '.';
}
- elsif ($self->convert_slashes()) {
+ else {
$dirname = $self->slash_to_backslash($dirname);
}
$dirnames{$dirname} = 1;
diff --git a/modules/CBXProjectCreator.pm b/modules/CBXProjectCreator.pm
index 958fd568..4b6478df 100644
--- a/modules/CBXProjectCreator.pm
+++ b/modules/CBXProjectCreator.pm
@@ -14,9 +14,10 @@ use strict;
use ProjectCreator;
use WinProjectBase;
+use XMLProjectBase;
use vars qw(@ISA);
-@ISA = qw(WinProjectBase ProjectCreator);
+@ISA = qw(XMLProjectBase WinProjectBase ProjectCreator);
# ************************************************************
# Subroutine Section
diff --git a/modules/CBXWorkspaceCreator.pm b/modules/CBXWorkspaceCreator.pm
index 6e2de95b..33d243af 100644
--- a/modules/CBXWorkspaceCreator.pm
+++ b/modules/CBXWorkspaceCreator.pm
@@ -49,15 +49,13 @@ sub pre_workspace {
sub write_comps {
- my($self) = shift;
- my($fh) = shift;
- my($projects) = $self->get_projects();
- my(@list) = $self->sort_dependencies($projects);
- my($crlf) = $self->crlf();
+ my($self) = shift;
+ my($fh) = shift;
+ my($crlf) = $self->crlf();
print $fh '<!--Project Group-->', $crlf,
'<projectgroup>', $crlf;
- foreach my $project (@list) {
+ foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) {
print $fh " <project path=\"$project\"/>$crlf";
}
print $fh "</projectgroup>$crlf";
diff --git a/modules/GHSWorkspaceCreator.pm b/modules/GHSWorkspaceCreator.pm
index 4abc8803..5f53109a 100644
--- a/modules/GHSWorkspaceCreator.pm
+++ b/modules/GHSWorkspaceCreator.pm
@@ -103,7 +103,7 @@ sub write_comps {
my($crlf) = $self->crlf();
## Print out each projet
- foreach my $project ($self->sort_dependencies($self->get_projects())) {
+ foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) {
print $fh "$project$crlf",
$self->mix_settings($project);
}
diff --git a/modules/HTMLProjectCreator.pm b/modules/HTMLProjectCreator.pm
index 5955ef71..5be54806 100644
--- a/modules/HTMLProjectCreator.pm
+++ b/modules/HTMLProjectCreator.pm
@@ -14,9 +14,10 @@ use strict;
use File::Basename;
use ProjectCreator;
+use XMLProjectBase;
use vars qw(@ISA);
-@ISA = qw(ProjectCreator);
+@ISA = qw(XMLProjectBase ProjectCreator);
# ************************************************************
# Data Section
diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm
index b08348ed..dbb9cdfd 100644
--- a/modules/ProjectCreator.pm
+++ b/modules/ProjectCreator.pm
@@ -37,6 +37,7 @@ my($TemplateInputExtension) = 'mpt';
## Bit Meaning
## 0 Preserve the order for additions (1) or invert it (0)
## 1 Add this value to template input value (if there is one)
+## 2 Preserve <% %> settings for evaluation within the template
my(%validNames) = ('exename' => 1,
'sharedname' => 1,
'staticname' => 1,
@@ -50,7 +51,7 @@ my(%validNames) = ('exename' => 1,
'pure_libs' => 2,
'pch_header' => 1,
'pch_source' => 1,
- 'postbuild' => 1,
+ 'postbuild' => 5,
'dllout' => 1,
'libout' => 1,
'dynamicflags' => 3,
@@ -281,7 +282,6 @@ sub new {
$gfeature,
$typefeaturef,
$feature);
- $self->{'convert_slashes'} = $self->convert_slashes();
$self->{'sort_files'} = $self->sort_files();
$self->{'source_callback'} = undef;
$self->{'dollar_special'} = $self->dollar_special();
@@ -301,7 +301,7 @@ sub new {
sub is_keyword {
my($self) = shift;
my($name) = shift;
- return $validNames{$name};
+ return $self->{'valid_names'}->{$name};
}
@@ -338,12 +338,18 @@ sub process_assignment {
## Support the '*' mechanism as in the project name, to allow
## the user to correctly depend on another project within the same
## directory.
- if ($name eq 'after' && $value =~ /\*/) {
- $value = $self->fill_type_name($value,
- $self->get_default_project_name());
- }
- if (defined $value && !$self->{'dollar_special'} && $value =~ /\$\$/) {
- $value =~ s/\$\$/\$/g;
+ if (defined $value) {
+ if ($name eq 'after' && $value =~ /\*/) {
+ $value = $self->fill_type_name($value,
+ $self->get_default_project_name());
+ }
+ if (!$self->{'dollar_special'} && $value =~ /\$\$/) {
+ $value =~ s/\$\$/\$/g;
+ }
+ if (defined $self->{'valid_names'}->{$name} &&
+ ($self->{'valid_names'}->{$name} & 0x04) == 0 && $value =~ /<%/) {
+ $value = $self->replace_parameters($value, $self->{'command_subs'});
+ }
}
$self->SUPER::process_assignment($name, $value, $assign);
@@ -1215,8 +1221,8 @@ sub parse_components {
## the group setting altogether.
my($groups) = $self->get_assignment($grtag);
if (defined $groups) {
- my(@grarray) = @{$self->create_array($groups)};
- if ($#grarray == 0 && $grarray[0] eq $defgroup) {
+ my($grarray) = $self->create_array($groups);
+ if (scalar(@$grarray) == 1 && $$grarray[0] eq $defgroup) {
$self->process_assignment($grtag, undef);
}
}
@@ -3344,6 +3350,65 @@ sub get_command_subs {
}
+sub replace_parameters {
+ my($self) = shift;
+ my($str) = shift;
+ my($valid) = shift;
+ my($nowarn) = shift;
+ my($input) = shift;
+ my($output) = shift;
+
+ while ($str =~ /<%(\w+)(\(\w+\))?%>/) {
+ my($name) = $1;
+ my($modifier) = $2;
+ if (defined $modifier) {
+ my($tmp) = $name;
+ $name = $modifier;
+ $name =~ s/[\(\)]//g;
+ $modifier = $tmp;
+ }
+
+ if (exists $$valid{$name}) {
+ if (defined $$valid{$name}) {
+ my($replace) = $$valid{$name};
+ if (defined $modifier) {
+ if ($modifier eq 'noextension') {
+ $replace =~ s/\.[^\.]+$//;
+ }
+ else {
+ $self->warning("Uknown parameter modifier $modifier.");
+ }
+ }
+ $str =~ s/<%\w+(\(\w+\))?%>/$replace/;
+ }
+ else {
+ $str =~ s/<%\w+(\(\w+\))?%>//;
+ }
+ }
+ else {
+ $str =~ s/<%\w+(\(\w+\))?%>//;
+
+ ## We only want to warn the user that we did not recognize the
+ ## pseudo template parameter if there was an input and an output
+ ## file passed to this function. If this variable was used
+ ## without the parenthesis (as in an if statement), then we don't
+ ## want to warn the user.
+ if (defined $input && defined $output) {
+ if (!defined $$nowarn{$name}) {
+ $self->warning("<%$name%> was not recognized.");
+ }
+
+ ## If we didn't recognize the pseudo template parameter then
+ ## we don't want to return anything back.
+ return undef;
+ }
+ }
+ }
+
+ return $str;
+}
+
+
sub convert_command_parameters {
my($self) = shift;
my($str) = shift;
@@ -3397,54 +3462,7 @@ sub convert_command_parameters {
}
}
- while ($str =~ /<%(\w+)(\(\w+\))?%>/) {
- my($name) = $1;
- my($modifier) = $2;
- if (defined $modifier) {
- my($tmp) = $name;
- $name = $modifier;
- $name =~ s/[\(\)]//g;
- $modifier = $tmp;
- }
-
- if (exists $valid{$name}) {
- if (defined $valid{$name}) {
- my($replace) = $valid{$name};
- if (defined $modifier) {
- if ($modifier eq 'noextension') {
- $replace =~ s/\.[^\.]+$//;
- }
- else {
- $self->warning("Uknown parameter modifier $modifier.");
- }
- }
- $str =~ s/<%\w+(\(\w+\))?%>/$replace/;
- }
- else {
- $str =~ s/<%\w+(\(\w+\))?%>//;
- }
- }
- else {
- $str =~ s/<%\w+(\(\w+\))?%>//;
-
- ## We only want to warn the user that we did not recognize the
- ## pseudo template parameter if there was an input and an output
- ## file passed to this function. If this variable was used
- ## without the parenthesis (as in an if statement), then we don't
- ## want to warn the user.
- if (defined $input && defined $output) {
- if (!defined $nowarn{$name}) {
- $self->warning("<%$name%> was not recognized.");
- }
-
- ## If we didn't recognize the pseudo template parameter then
- ## we don't want to return anything back.
- return undef;
- }
- }
- }
-
- return $str;
+ return $self->replace_parameters($str, \%valid, \%nowarn, $input, $output);
}
@@ -4534,7 +4552,7 @@ sub validated_directory {
sub get_quote_symbol {
#my($self) = shift;
- return '"';
+ return '\\"';
}
sub get_gt_symbol {
diff --git a/modules/SLEProjectCreator.pm b/modules/SLEProjectCreator.pm
index f2d0a49f..64e4bc60 100644
--- a/modules/SLEProjectCreator.pm
+++ b/modules/SLEProjectCreator.pm
@@ -13,9 +13,10 @@ package SLEProjectCreator;
use strict;
use ProjectCreator;
+use XMLProjectBase;
use vars qw(@ISA);
-@ISA = qw(ProjectCreator);
+@ISA = qw(XMLProjectBase ProjectCreator);
# ************************************************************
# Subroutine Section
diff --git a/modules/SLEWorkspaceCreator.pm b/modules/SLEWorkspaceCreator.pm
index 06a405b2..c6f734e8 100644
--- a/modules/SLEWorkspaceCreator.pm
+++ b/modules/SLEWorkspaceCreator.pm
@@ -50,10 +50,9 @@ sub write_comps {
my($self) = shift;
my($fh) = shift;
my($crlf) = $self->crlf();
- my(@list) = $self->sort_dependencies($self->get_projects());
print $fh "\t<Projects>$crlf";
- foreach my $project (@list) {
+ foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) {
print $fh "\t\t<Project File=\"$project\"/>$crlf";
}
print $fh "\t</Projects>$crlf";
diff --git a/modules/VC7ProjectCreator.pm b/modules/VC7ProjectCreator.pm
index 791fc111..938561ce 100644
--- a/modules/VC7ProjectCreator.pm
+++ b/modules/VC7ProjectCreator.pm
@@ -15,9 +15,10 @@ use strict;
use GUID;
use ProjectCreator;
use VCProjectBase;
+use XMLProjectBase;
use vars qw(@ISA);
-@ISA = qw(VCProjectBase ProjectCreator);
+@ISA = qw(XMLProjectBase VCProjectBase ProjectCreator);
# ************************************************************
# Data Section
@@ -60,29 +61,6 @@ sub get_info_hash {
return $info{$key};
}
-sub get_quote_symbol {
- #my($self) = shift;
- return '&quot;';
-}
-
-
-sub get_gt_symbol {
- #my($self) = shift;
- return '&gt;';
-}
-
-
-sub get_lt_symbol {
- #my($self) = shift;
- return '&lt;';
-}
-
-
-sub get_and_symbol {
- #my($self) = shift;
- return '&amp;&amp;';
-}
-
sub get_configurable {
my($self) = shift;
diff --git a/modules/XMLProjectBase.pm b/modules/XMLProjectBase.pm
new file mode 100644
index 00000000..cbd42dbf
--- /dev/null
+++ b/modules/XMLProjectBase.pm
@@ -0,0 +1,43 @@
+package XMLProjectBase;
+
+# ************************************************************
+# Description : An XML base module for Project Creators
+# Author : Chad Elliott
+# Create Date : 1/30/2006
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub get_quote_symbol {
+ #my($self) = shift;
+ return '&quot;';
+}
+
+
+sub get_gt_symbol {
+ #my($self) = shift;
+ return '&gt;';
+}
+
+
+sub get_lt_symbol {
+ #my($self) = shift;
+ return '&lt;';
+}
+
+
+sub get_and_symbol {
+ #my($self) = shift;
+ return '&amp;&amp;';
+}
+
+
+1;
diff --git a/templates/bmake.mpd b/templates/bmake.mpd
index 4267e323..39c7b83f 100644
--- a/templates/bmake.mpd
+++ b/templates/bmake.mpd
@@ -74,7 +74,7 @@ RESDIR = <%rcdir%>
OBJFILES = \
<%foreach(source_files)%>
- "$(INTERMEDIATE)\<%if(dirname(source_file))%><%noextension(source_file)%><%else%><%basenoextension(source_file)%><%endif%>$(OBJ_EXT)"<%fornotlast(" \\")%>
+ "$(INTERMEDIATE)\<%transdir(source_file)%><%basenoextension(source_file)%>$(OBJ_EXT)"<%fornotlast(" \\")%>
<%endfor%>
<%endif%>
<%if(libpaths)%>
@@ -109,7 +109,7 @@ LIBFILES = \
RESOURCE = \
<%foreach(resource_files)%>
- $(INTERMEDIATE)\<%noextension(resource_file)%>.res<%fornotlast(" \\")%>
+ $(INTERMEDIATE)\<%transdir(resource_file)%><%basenoextension(resource_file)%>.res<%fornotlast(" \\")%>
<%endfor%>
<%if(includes)%>
@@ -277,9 +277,9 @@ generated: $(GENERATED_DIRTY)
$(CC) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS) -c -n$(@D) $<
<%foreach(source_files)%>
-<%if(dirname(source_file))%>
-"$(INTERMEDIATE)\<%noextension(source_file)%>$(OBJ_EXT)":
- @if not exist "$(INTERMEDIATE)\<%dirname(source_file)%>" mkdir "$(INTERMEDIATE)\<%dirname(source_file)%>"
+<%if(transdir(source_file))%>
+"$(INTERMEDIATE)\<%transdir(source_file)%><%basenoextension(source_file)%>$(OBJ_EXT)":
+ @if not exist "$(INTERMEDIATE)\<%transdir(source_file)%>" mkdir "$(INTERMEDIATE)\<%transdir(source_file)%>"
$(CC) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS) -c -n$(@D) <%source_file%>
<%endif%>
@@ -293,9 +293,9 @@ generated: $(GENERATED_DIRTY)
$(RC) $(RC_FLAGS) -fo$@ $<
<%foreach(resource_files)%>
-<%if(dirname(resource_file))%>
-"$(INTERMEDIATE)\<%noextension(resource_file)%>.res":
- @if not exist "$(INTERMEDIATE)\<%dirname(resource_file)%>" mkdir "$(INTERMEDIATE)\<%dirname(resource_file)%>"
+<%if(transdir(resource_file))%>
+"$(INTERMEDIATE)\<%transdir(resource_file)%><%basenoextension(resource_file)%>.res":
+ @if not exist "$(INTERMEDIATE)\<%transdir(resource_file)%>" mkdir "$(INTERMEDIATE)\<%transdir(resource_file)%>"
$(RC) -fo$@ <%resource_file%>
<%endif%>
diff --git a/templates/vc7.mpd b/templates/vc7.mpd
index 4413a9be..c76034f4 100644
--- a/templates/vc7.mpd
+++ b/templates/vc7.mpd
@@ -43,7 +43,11 @@
PreprocessorDefinitions="<%if(unicode)%>UNICODE;_UNICODE;<%endif%><%if(type_is_dynamic)%><%foreach(dynamicflags)%><%dynamicflag%>;<%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%><%staticflag%>;<%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%><%pch_define%>;<%endfor%><%endif%><%foreach(defines common_defines macros)%><%define%><%fornotlast(";")%><%endfor%>"
MinimalRebuild="<%MinimalRebuild("FALSE")%>"
ExceptionHandling="TRUE"
-<%if(!optimize)%>
+<%if(optimize)%>
+<%if(BasicRuntimeChecks)%>
+ BasicRuntimeChecks="<%BasicRuntimeChecks%>"
+<%endif%>
+<%else%>
BasicRuntimeChecks="<%BasicRuntimeChecks("3")%>"
<%endif%>
<%if(StringPooling)%>
@@ -141,6 +145,9 @@
ImportLibrary="<%libout%>\<%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%>"
<%endif%>
<%endif%>
+<%if(FixedBaseAddress)%>
+ FixedBaseAddress="<%FixedBaseAddress%>"
+<%endif%>
TargetMachine="<%machine("1")%>"/>
<%endif%>
<Tool
diff --git a/templates/vc7dll.mpt b/templates/vc7dll.mpt
index 3ba3be15..efbb646b 100644
--- a/templates/vc7dll.mpt
+++ b/templates/vc7dll.mpt
@@ -27,6 +27,31 @@ Debug {
pdbc = 1
}
+Memcheck Release {
+ optimize = 3
+ defines = NDEBUG
+ output_dir = Release
+ intermediate_dir = Release
+ BasicRuntimeChecks = 0
+ LinkIncremental = 1
+ FixedBaseAddress = 1
+ pdbl = 1
+}
+
+Memcheck Debug {
+ optimize =
+ debug_prj = 1
+ defines = _DEBUG
+ output_dir = .
+ intermediate_dir = Debug
+ lib_modifier = d
+ pdbc = 1
+ BasicRuntimeChecks = 0
+ LinkIncremental = 1
+ FixedBaseAddress = 1
+ pdbl = 1
+}
+
MFC Release {
LinkIncremental = 1
optimize = 3
diff --git a/templates/vc7exe.mpt b/templates/vc7exe.mpt
index e857b16d..cbc76009 100644
--- a/templates/vc7exe.mpt
+++ b/templates/vc7exe.mpt
@@ -29,6 +29,31 @@ Debug {
pdbc = 1
}
+Memcheck Release {
+ optimize = 3
+ defines = NDEBUG
+ output_dir = Release
+ intermediate_dir = Release
+ BasicRuntimeChecks = 0
+ LinkIncremental = 1
+ FixedBaseAddress = 1
+ pdbl = 1
+}
+
+Memcheck Debug {
+ optimize =
+ debug_prj = 1
+ defines = _DEBUG
+ output_dir = .
+ intermediate_dir = Debug
+ lib_modifier = d
+ pdbc = 1
+ BasicRuntimeChecks = 0
+ LinkIncremental = 1
+ FixedBaseAddress = 1
+ pdbl = 1
+}
+
MFC Release {
LinkIncremental = 1
optimize = 3
diff --git a/templates/vc7lib.mpt b/templates/vc7lib.mpt
index 366289d9..551b3a63 100644
--- a/templates/vc7lib.mpt
+++ b/templates/vc7lib.mpt
@@ -27,6 +27,28 @@ Debug {
pdbc = 1
}
+Memcheck Release {
+ optimize = 3
+ defines = NDEBUG
+ output_dir = Static_Release
+ intermediate_dir = Static_Release
+ lib_modifier = s
+ BasicRuntimeChecks = 0
+ FixedBaseAddress = 1
+}
+
+Memcheck Debug {
+ optimize =
+ debug_prj = 1
+ defines = _DEBUG
+ output_dir = Static_Debug
+ intermediate_dir = Static_Debug
+ lib_modifier = sd
+ pdbc = 1
+ BasicRuntimeChecks = 0
+ FixedBaseAddress = 1
+}
+
MFC Release {
optimize = 3
defines = NDEBUG
diff --git a/templates/vc7libexe.mpt b/templates/vc7libexe.mpt
index 732a1fc8..66d6d437 100644
--- a/templates/vc7libexe.mpt
+++ b/templates/vc7libexe.mpt
@@ -30,6 +30,32 @@ Debug {
pdbc = 1
}
+Memcheck Release {
+ optimize = 3
+ defines = NDEBUG
+ output_dir = Static_Release
+ intermediate_dir = Static_Release
+ lib_modifier = s
+ BasicRuntimeChecks = 0
+ LinkIncremental = 1
+ FixedBaseAddress = 1
+ pdbl = 1
+}
+
+Memcheck Debug {
+ optimize =
+ debug_prj = 1
+ defines = _DEBUG
+ output_dir = Static_Debug
+ intermediate_dir = Static_Debug
+ lib_modifier = sd
+ pdbc = 1
+ BasicRuntimeChecks = 0
+ LinkIncremental = 1
+ FixedBaseAddress = 1
+ pdbl = 1
+}
+
MFC Release {
LinkIncremental = 1
optimize = 3
diff --git a/templates/vc8.mpd b/templates/vc8.mpd
index 8c96ff3c..eb862e47 100644
--- a/templates/vc8.mpd
+++ b/templates/vc8.mpd
@@ -109,7 +109,11 @@
<%if(ExceptionHandling)%>
ExceptionHandling="<%ExceptionHandling("2")%>"
<%endif%>
-<%if(!optimize)%>
+<%if(optimize)%>
+<%if(BasicRuntimeChecks)%>
+ BasicRuntimeChecks="<%BasicRuntimeChecks%>"
+<%endif%>
+<%else%>
BasicRuntimeChecks="<%BasicRuntimeChecks("3")%>"
<%endif%>
<%if(SmallerTypeCheck)%>
diff --git a/templates/vc8dll.mpt b/templates/vc8dll.mpt
index c619039c..39874a43 100644
--- a/templates/vc8dll.mpt
+++ b/templates/vc8dll.mpt
@@ -29,6 +29,27 @@ Debug {
lib_modifier = d
}
+Memcheck Release {
+ optimize = 2
+ defines = NDEBUG
+ output_dir = Release
+ intermediate_dir = Release
+ BasicRuntimeChecks = 0
+ LinkIncremental = 1
+ FixedBaseAddress = 1
+}
+
+Memcheck Debug {
+ debug_prj = 1
+ defines = _DEBUG
+ output_dir = .
+ intermediate_dir = Debug
+ lib_modifier = d
+ BasicRuntimeChecks = 0
+ LinkIncremental = 1
+ FixedBaseAddress = 1
+}
+
MFC Release {
LinkIncremental = 1
optimize = 2
diff --git a/templates/vc8exe.mpt b/templates/vc8exe.mpt
index c2814d9f..b2f4a122 100644
--- a/templates/vc8exe.mpt
+++ b/templates/vc8exe.mpt
@@ -29,6 +29,28 @@ Debug {
lib_modifier = d
}
+Memcheck Release {
+ LinkIncremental = 1
+ optimize = 2
+ defines = NDEBUG
+ output_dir = Release
+ intermediate_dir = Release
+ BasicRuntimeChecks = 0
+ LinkIncremental = 1
+ FixedBaseAddress = 1
+}
+
+Memcheck Debug {
+ debug_prj = 1
+ defines = _DEBUG
+ output_dir = .
+ intermediate_dir = Debug
+ lib_modifier = d
+ BasicRuntimeChecks = 0
+ LinkIncremental = 1
+ FixedBaseAddress = 1
+}
+
MFC Release {
LinkIncremental = 1
optimize = 2
diff --git a/templates/vc8lib.mpt b/templates/vc8lib.mpt
index d762b519..e29f3030 100644
--- a/templates/vc8lib.mpt
+++ b/templates/vc8lib.mpt
@@ -29,6 +29,26 @@ Debug {
lib_modifier = sd
}
+Memcheck Release {
+ optimize = 2
+ defines = NDEBUG
+ output_dir = Static_Release
+ intermediate_dir = Static_Release
+ lib_modifier = s
+ BasicRuntimeChecks = 0
+ FixedBaseAddress = 1
+}
+
+Memcheck Debug {
+ debug_prj = 1
+ defines = _DEBUG
+ output_dir = Static_Debug
+ intermediate_dir = Static_Debug
+ lib_modifier = sd
+ BasicRuntimeChecks = 0
+ FixedBaseAddress = 1
+}
+
MFC Release {
optimize = 2
defines = NDEBUG
diff --git a/templates/vc8libexe.mpt b/templates/vc8libexe.mpt
index 5789e48d..c9aa2ccf 100644
--- a/templates/vc8libexe.mpt
+++ b/templates/vc8libexe.mpt
@@ -30,6 +30,28 @@ Debug {
lib_modifier = sd
}
+Memcheck Release {
+ optimize = 2
+ defines = NDEBUG
+ output_dir = Static_Release
+ intermediate_dir = Static_Release
+ lib_modifier = s
+ BasicRuntimeChecks = 0
+ LinkIncremental = 1
+ FixedBaseAddress = 1
+}
+
+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 = 2