diff options
-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 4b05d400eb..9b7a8a7ea5 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"; |