diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 8 | ||||
-rw-r--r-- | Source/cmLocalGenerator.h | 1 | ||||
-rw-r--r-- | Source/cmMakefileExecutableTargetGenerator.cxx | 18 | ||||
-rw-r--r-- | Source/cmMakefileLibraryTargetGenerator.cxx | 5 | ||||
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 8 |
5 files changed, 34 insertions, 6 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 765e720..6ada0d9 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -734,6 +734,14 @@ cmLocalGenerator::ExpandRuleVariable(std::string const& variable, return replaceValues.ObjectsQuoted; } } + if(replaceValues.TargetPDB ) + { + if(variable == "TARGET_PDB") + { + return replaceValues.TargetPDB; + } + } + if(replaceValues.Target) { if(variable == "TARGET_QUOTED") diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 4db28f5..ccc9bef 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -192,6 +192,7 @@ public: this->TargetInstallNameDir = 0; this->LinkFlags= 0; } + const char* TargetPDB; const char* Language; const char* Objects; const char* Target; diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 37c664c..d35acfd 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -168,17 +168,22 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) } std::string targetFullPath = outpath + targetName; std::string targetFullPathReal = outpath + targetNameReal; - + std::string targetFullPathPDB = outpath + this->Target->GetName(); + targetFullPathPDB += ".pdb"; + std::string targetOutPathPDB = + this->Convert(targetFullPathPDB.c_str(), + cmLocalGenerator::FULL, + cmLocalGenerator::MAKEFILE); // Convert to the output path to use in constructing commands. std::string targetOutPath = this->Convert(targetFullPath.c_str(), - cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::MAKEFILE); + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::MAKEFILE); std::string targetOutPathReal = this->Convert(targetFullPathReal.c_str(), - cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::MAKEFILE); - + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::MAKEFILE); + // Get the language to use for linking this executable. const char* linkLanguage = this->Target->GetLinkerLanguage(this->GlobalGenerator); @@ -328,6 +333,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) vars.Language = linkLanguage; vars.Objects = buildObjs.c_str(); vars.Target = targetOutPathReal.c_str(); + vars.TargetPDB = targetOutPathPDB.c_str(); std::string linkString = linklibs.str(); vars.LinkLibraries = linkString.c_str(); vars.Flags = flags.c_str(); diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 9140d31..fac4513 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -233,12 +233,16 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules outpath += "/"; } std::string targetFullPath = outpath + targetName; + std::string targetFullPathPDB = outpath + this->Target->GetName() + std::string(".pdb"); std::string targetFullPathSO = outpath + targetNameSO; std::string targetFullPathReal = outpath + targetNameReal; std::string targetFullPathImport = outpath + targetNameImport; // Construct the output path version of the names for use in command // arguments. + std::string targetOutPathPDB = + this->Convert(targetFullPathPDB.c_str(),cmLocalGenerator::FULL, + cmLocalGenerator::MAKEFILE); std::string targetOutPath = this->Convert(targetFullPath.c_str(),cmLocalGenerator::START_OUTPUT, cmLocalGenerator::MAKEFILE); @@ -402,6 +406,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules cleanObjs += variableName; cleanObjs += ")"; cmLocalGenerator::RuleVariables vars; + vars.TargetPDB = targetOutPathPDB.c_str(); vars.Language = linkLanguage; vars.Objects = buildObjs.c_str(); std::string objdir = "CMakeFiles/"; diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index aca3d29..f114b73 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -385,8 +385,16 @@ cmMakefileTargetGenerator std::string compileRule = 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); cmLocalGenerator::RuleVariables vars; vars.Language = lang; + vars.TargetPDB = outpath.c_str(); vars.Source = sourceFile.c_str(); vars.Object = relativeObj.c_str(); std::string objdir = this->LocalGenerator->GetHomeRelativeOutputPath(); |