BUG: Use the exe/lib output path for .pdb file location. This addresses bug#3277 and bug#4287.
This commit is contained in:
parent
4bc0fd0941
commit
23d8525d46
|
@ -466,15 +466,29 @@ cmMakefileTargetGenerator
|
||||||
this->Makefile->GetRequiredDefinition(compileRuleVar.c_str());
|
this->Makefile->GetRequiredDefinition(compileRuleVar.c_str());
|
||||||
cmSystemTools::ExpandListArgument(compileRule, commands);
|
cmSystemTools::ExpandListArgument(compileRule, commands);
|
||||||
|
|
||||||
std::string outpath = this->Makefile->GetStartOutputDirectory();
|
std::string targetOutPathPDB;
|
||||||
outpath += "/";
|
{
|
||||||
outpath += this->Target->GetName();
|
std::string targetFullPathPDB;
|
||||||
outpath += ".pdb";
|
const char* configName = this->LocalGenerator->ConfigurationName.c_str();
|
||||||
outpath = this->Convert(outpath.c_str(), cmLocalGenerator::FULL,
|
if(this->Target->GetType() == cmTarget::EXECUTABLE)
|
||||||
cmLocalGenerator::MAKEFILE);
|
{
|
||||||
|
targetFullPathPDB = this->LocalGenerator->ExecutableOutputPath;
|
||||||
|
targetFullPathPDB += this->Target->GetPDBName(configName);
|
||||||
|
}
|
||||||
|
else if(this->Target->GetType() == cmTarget::STATIC_LIBRARY ||
|
||||||
|
this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||||
|
this->Target->GetType() == cmTarget::MODULE_LIBRARY)
|
||||||
|
{
|
||||||
|
targetFullPathPDB = this->LocalGenerator->LibraryOutputPath;
|
||||||
|
targetFullPathPDB += this->Target->GetPDBName(configName);
|
||||||
|
}
|
||||||
|
targetOutPathPDB =
|
||||||
|
this->Convert(targetFullPathPDB.c_str(),cmLocalGenerator::FULL,
|
||||||
|
cmLocalGenerator::MAKEFILE);
|
||||||
|
}
|
||||||
cmLocalGenerator::RuleVariables vars;
|
cmLocalGenerator::RuleVariables vars;
|
||||||
vars.Language = lang;
|
vars.Language = lang;
|
||||||
vars.TargetPDB = outpath.c_str();
|
vars.TargetPDB = targetOutPathPDB.c_str();
|
||||||
vars.Source = sourceFile.c_str();
|
vars.Source = sourceFile.c_str();
|
||||||
vars.Object = relativeObj.c_str();
|
vars.Object = relativeObj.c_str();
|
||||||
std::string objdir = this->LocalGenerator->GetHomeRelativeOutputPath();
|
std::string objdir = this->LocalGenerator->GetHomeRelativeOutputPath();
|
||||||
|
|
Loading…
Reference in New Issue