summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2008-04-17 15:16:53 (GMT)
committerDavid Cole <david.cole@kitware.com>2008-04-17 15:16:53 (GMT)
commit8950fca4ce770f98df93aa95a0bb563589175c80 (patch)
tree2bc9b5936611a90bfad9dc174e62eee74b3bf1b8 /Source/cmLocalVisualStudio7Generator.cxx
parente2421c93d8e143e51f6e925b6776d65d0740939a (diff)
downloadCMake-8950fca4ce770f98df93aa95a0bb563589175c80.zip
CMake-8950fca4ce770f98df93aa95a0bb563589175c80.tar.gz
CMake-8950fca4ce770f98df93aa95a0bb563589175c80.tar.bz2
BUG: Fix for issue #6440. Use 0 instead of FALSE for ExceptionHandling with Visual Studio 2005 and later.
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx23
1 files changed, 18 insertions, 5 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index e16af18..8c5b87f 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -407,6 +407,7 @@ public:
Linker
};
cmLocalVisualStudio7GeneratorOptions(cmLocalVisualStudio7Generator* lg,
+ int version,
Tool tool,
cmVS7FlagTable const* extraTable = 0);
@@ -439,6 +440,7 @@ public:
private:
cmLocalVisualStudio7Generator* LocalGenerator;
+ int Version;
// create a map of xml tags to the values they should have in the output
// for example, "BufferSecurityCheck" = "TRUE"
@@ -551,7 +553,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
std::string defineFlags = this->Makefile->GetDefineFlags();
// Construct a set of build options for this target.
- Options targetOptions(this, Options::Compiler, this->ExtraFlagTable);
+ Options targetOptions(this, this->Version, Options::Compiler, this->ExtraFlagTable);
targetOptions.FixExceptionHandlingDefault();
targetOptions.Parse(flags.c_str());
targetOptions.Parse(defineFlags.c_str());
@@ -745,7 +747,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
extraLinkOptions += " ";
extraLinkOptions += targetLinkFlags;
}
- Options linkOptions(this, Options::Linker);
+ Options linkOptions(this, this->Version, Options::Linker);
linkOptions.Parse(extraLinkOptions.c_str());
switch(target.GetType())
{
@@ -1289,7 +1291,7 @@ void cmLocalVisualStudio7Generator
!fc.CompileDefs.empty() ||
!fc.CompileDefsConfig.empty())
{
- Options fileOptions(this, Options::Compiler,
+ Options fileOptions(this, this->Version, Options::Compiler,
this->ExtraFlagTable);
fileOptions.Parse(fc.CompileFlags.c_str());
fileOptions.AddDefines(fc.CompileDefs.c_str());
@@ -1762,9 +1764,10 @@ std::string cmLocalVisualStudio7Generator
//----------------------------------------------------------------------------
cmLocalVisualStudio7GeneratorOptions
::cmLocalVisualStudio7GeneratorOptions(cmLocalVisualStudio7Generator* lg,
+ int version,
Tool tool,
cmVS7FlagTable const* extraTable):
- LocalGenerator(lg), CurrentTool(tool),
+ LocalGenerator(lg), Version(version), CurrentTool(tool),
DoingDefine(false), FlagTable(0), ExtraFlagTable(extraTable)
{
// Choose the flag table for the requested tool.
@@ -1786,7 +1789,17 @@ void cmLocalVisualStudio7GeneratorOptions::FixExceptionHandlingDefault()
// initialization to off, but the user has the option of removing
// the flag to disable exception handling. When the user does
// remove the flag we need to override the IDE default of on.
- this->FlagMap["ExceptionHandling"] = "FALSE";
+ switch (this->Version)
+ {
+ case 7:
+ case 71:
+ this->FlagMap["ExceptionHandling"] = "FALSE";
+ break;
+
+ default:
+ this->FlagMap["ExceptionHandling"] = "0";
+ break;
+ }
}
//----------------------------------------------------------------------------