Fix issue #9042 - use relative path for pdb file name when CMAKE_USE_RELATIVE_PATHS is on.

This commit is contained in:
David Cole 2009-12-23 14:17:51 -05:00
parent c1beb3b141
commit 68ed752b7d

View File

@ -744,7 +744,9 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
// We need to specify a program database file name even for
// non-debug configurations because VS still creates .idb files.
fout << "\t\t\t\tProgramDataBaseFileName=\""
<< target.GetDirectory(configName) << "/"
<< this->ConvertToOptionallyRelativeOutputPath(
target.GetDirectory(configName).c_str())
<< "/"
<< target.GetPDBName(configName) << "\"\n";
}
fout << "/>\n"; // end of <Tool Name=VCCLCompilerTool
@ -1049,8 +1051,10 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
fout << "\t\t\t\tAdditionalLibraryDirectories=\"";
this->OutputLibraryDirectories(fout, cli.GetDirectories());
fout << "\"\n";
std::string path = this->ConvertToOptionallyRelativeOutputPath(
target.GetDirectory(configName).c_str());
fout << "\t\t\t\tProgramDataBaseFile=\""
<< target.GetDirectory(configName) << "/" << targetNamePDB
<< path << "/" << targetNamePDB
<< "\"\n";
if(isDebug)
{