summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-02-01 21:56:36 (GMT)
committerBrad King <brad.king@kitware.com>2007-02-01 21:56:36 (GMT)
commit23d8525d460f0b4a4e2a2cc55f82bad87438c05c (patch)
tree5c0ad8426fe8107902377f1b81c1f3641411aecb /Source
parent4bc0fd0941a97a86b2925562b717597f5ed0a2f4 (diff)
downloadCMake-23d8525d460f0b4a4e2a2cc55f82bad87438c05c.zip
CMake-23d8525d460f0b4a4e2a2cc55f82bad87438c05c.tar.gz
CMake-23d8525d460f0b4a4e2a2cc55f82bad87438c05c.tar.bz2
BUG: Use the exe/lib output path for .pdb file location. This addresses bug#3277 and bug#4287.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx28
1 files changed, 21 insertions, 7 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 3f4ae14..3245d2f 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -466,15 +466,29 @@ cmMakefileTargetGenerator
this->Makefile->GetRequiredDefinition(compileRuleVar.c_str());
cmSystemTools::ExpandListArgument(compileRule, commands);
- std::string outpath = this->Makefile->GetStartOutputDirectory();
- outpath += "/";
- outpath += this->Target->GetName();
- outpath += ".pdb";
- outpath = this->Convert(outpath.c_str(), cmLocalGenerator::FULL,
- cmLocalGenerator::MAKEFILE);
+ std::string targetOutPathPDB;
+ {
+ std::string targetFullPathPDB;
+ const char* configName = this->LocalGenerator->ConfigurationName.c_str();
+ if(this->Target->GetType() == cmTarget::EXECUTABLE)
+ {
+ 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;
vars.Language = lang;
- vars.TargetPDB = outpath.c_str();
+ vars.TargetPDB = targetOutPathPDB.c_str();
vars.Source = sourceFile.c_str();
vars.Object = relativeObj.c_str();
std::string objdir = this->LocalGenerator->GetHomeRelativeOutputPath();