diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-04-16 13:50:31 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-04-16 13:50:31 (GMT) |
commit | 62bd5b7c8cb08faf79cc7c70b566e1d953dcd0f6 (patch) | |
tree | d144ae7fb0b93ccc73f58f2cb97c87cbf9be60f3 /Source/cmLocalVisualStudio7Generator.cxx | |
parent | 685be51a0eff7245a723753e996cdc6be9f37ea2 (diff) | |
download | CMake-62bd5b7c8cb08faf79cc7c70b566e1d953dcd0f6.zip CMake-62bd5b7c8cb08faf79cc7c70b566e1d953dcd0f6.tar.gz CMake-62bd5b7c8cb08faf79cc7c70b566e1d953dcd0f6.tar.bz2 |
BUG: fix for bug 91
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index a4dc51a..b9fe51d 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -283,7 +283,14 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, int runtime = 0; int optimized = 0; int inlineFunctions = 0; + std::string programDatabase; const char* pre = "WIN32,_DEBUG,_WINDOWS"; + std::string debugPostfix = ""; + bool debug = !strcmp(configName,"Debug"); + if (debug && m_Makefile->GetDefinition("CMAKE_DEBUG_POSTFIX")) + { + debugPostfix = m_Makefile->GetDefinition("CMAKE_DEBUG_POSTFIX"); + } // set the flags and defaults for // runtime, optimized, and inlineFunctions , and // default pre processor flags @@ -293,7 +300,12 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, flags += flagsDebug; optimized = 0; runtime = 3; - pre = "WIN32,_DEBUG,_WINDOWS"; + pre = "WIN32,_DEBUG,_WINDOWS"; + std::string libpath = m_LibraryOutputPath + + "$(OutDir)/" + libName + debugPostfix + ".pdb"; + programDatabase = "\t\t\t\tProgramDatabaseFileName=\""; + programDatabase += libpath; + programDatabase += "\""; } else if (strcmp(configName, "Release") == 0) { @@ -318,6 +330,11 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, runtime = 2; pre = "WIN32,NDEBUG,_WINDOWS"; flags += flagsDebugRel; + std::string libpath = m_LibraryOutputPath + + "$(OutDir)/" + libName + debugPostfix + ".pdb"; + programDatabase = "\t\t\t\tProgramDatabaseFileName=\""; + programDatabase += libpath; + programDatabase += "\""; } fout << "\t\t\tIntermediateDirectory=\".\\" << configName << "\"\n" @@ -455,7 +472,11 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, { fout << "\t\t\t\tWarningLevel=\"" << m_Makefile->GetDefinition("CMAKE_CXX_WARNING_LEVEL") << "\"\n"; } - fout << "\t\t\t\tDebugInformationFormat=\"" << debugFormat << "\""; + if(programDatabase.size()) + { + fout << programDatabase << "\n"; + } + 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"; |