diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-01-23 18:01:52 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-01-23 18:01:52 (GMT) |
commit | 8685faba699a8d92f42e71409afe27a91b4a1d43 (patch) | |
tree | 4a83198521a67f35f1c08ae05d7e66136798ef2f | |
parent | bcc0b4018d7d2033712a935599634a89dca1cf12 (diff) | |
download | CMake-8685faba699a8d92f42e71409afe27a91b4a1d43.zip CMake-8685faba699a8d92f42e71409afe27a91b4a1d43.tar.gz CMake-8685faba699a8d92f42e71409afe27a91b4a1d43.tar.bz2 |
BUG: fix for debug flags into project files
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 4b05d40..9b7a8a7 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -381,6 +381,34 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, cmSystemTools::ReplaceString(flags, "/ML", ""); runtime = 4; } + int debugFormat = 0; + + // check the flags for the debug information format flag options + if(flags.find("Z7") != flags.npos) + { + cmSystemTools::ReplaceString(flags, "-Z7", ""); + cmSystemTools::ReplaceString(flags, "/Z7", ""); + debugFormat = 1; + } + else if (flags.find("Zd") != flags.npos) + { + cmSystemTools::ReplaceString(flags, "-Zd", ""); + cmSystemTools::ReplaceString(flags, "/Zd", ""); + debugFormat = 2; + } + else if (flags.find("Zi") != flags.npos) + { + cmSystemTools::ReplaceString(flags, "-Zi", ""); + cmSystemTools::ReplaceString(flags, "/Zi", ""); + debugFormat = 3; + } + else if (flags.find("ZI") != flags.npos) + { + cmSystemTools::ReplaceString(flags, "-ZI", ""); + cmSystemTools::ReplaceString(flags, "/ZI", ""); + debugFormat = 4; + } + fout << this->EscapeForXML(flags.c_str()).c_str(); fout << " -DCMAKE_INTDIR=\\"" << configName << "\\"" @@ -428,7 +456,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, { fout << "\t\t\t\tWarningLevel=\"" << m_Makefile->GetDefinition("CMAKE_CXX_WARNING_LEVEL") << "\"\n"; } - fout << "\t\t\t\tDebugInformationFormat=\"3\""; + fout << "\t\t\t\tDebugInformationFormat=\"" << debugFormat << "\""; fout << "/>\n"; // end of <Tool Name=VCCLCompilerTool fout << "\t\t\t<Tool\n\t\t\t\tName=\"VCCustomBuildTool\"/>\n"; |