[cmake-commits] king committed cmMakefileTargetGenerator.cxx 1.50 1.51
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Feb 1 16:56:38 EST 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv28537
Modified Files:
cmMakefileTargetGenerator.cxx
Log Message:
BUG: Use the exe/lib output path for .pdb file location. This addresses bug#3277 and bug#4287.
Index: cmMakefileTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- cmMakefileTargetGenerator.cxx 1 Feb 2007 16:33:30 -0000 1.50
+++ cmMakefileTargetGenerator.cxx 1 Feb 2007 21:56:36 -0000 1.51
@@ -466,15 +466,29 @@
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();
More information about the Cmake-commits
mailing list