summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmGeneratorExpressionNode.cxx2
-rw-r--r--Source/cmGeneratorTarget.cxx14
-rw-r--r--Source/cmGeneratorTarget.h6
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx4
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx3
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx3
-rw-r--r--Source/cmMakefileTargetGenerator.cxx3
-rw-r--r--Source/cmNinjaTargetGenerator.cxx2
-rw-r--r--Source/cmTarget.cxx11
-rw-r--r--Source/cmTarget.h6
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx2
11 files changed, 30 insertions, 26 deletions
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index 961705f..fdacc82 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -1631,7 +1631,7 @@ struct TargetFilesystemArtifactResultCreator<ArtifactPdbTag>
return std::string();
}
- std::string result = target->Target->GetPDBDirectory(context->Config);
+ std::string result = target->GetPDBDirectory(context->Config);
result += "/";
result += target->GetPDBName(context->Config);
return result;
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index b8a87a2..a2423cc 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -1130,7 +1130,7 @@ cmGeneratorTarget::GetCompilePDBPath(const std::string& config) const
std::string name = this->GetCompilePDBName(config);
if(dir.empty() && !name.empty())
{
- dir = this->Target->GetPDBDirectory(config);
+ dir = this->GetPDBDirectory(config);
}
if(!dir.empty())
{
@@ -4995,3 +4995,15 @@ void cmGeneratorTarget::ComputeLinkImplementationLibraries(
}
}
}
+
+//----------------------------------------------------------------------------
+std::string
+cmGeneratorTarget::GetPDBDirectory(const std::string& config) const
+{
+ if(cmTarget::OutputInfo const* info = this->Target->GetOutputInfo(config))
+ {
+ // Return the directory in which the target will be built.
+ return info->PdbDir;
+ }
+ return "";
+}
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 43b7922..b39ba9f 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -359,6 +359,12 @@ public:
/** Return true if builtin chrpath will work for this target */
bool IsChrpathUsed(const std::string& config) const;
+ /** Get the directory in which this targets .pdb files will be placed.
+ If the configuration name is given then the generator will add its
+ subdirectory for that configuration. Otherwise just the canonical
+ pdb output directory is given. */
+ std::string GetPDBDirectory(const std::string& config) const;
+
///! Return the preferred linker language for this target
std::string GetLinkerLanguage(const std::string& config = "") const;
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index e7fe61e..e3c28ee 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1220,7 +1220,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
fout << "\t\t\t\tAdditionalLibraryDirectories=\"";
this->OutputLibraryDirectories(fout, cli.GetDirectories());
fout << "\"\n";
- temp = target.GetPDBDirectory(configName);
+ temp = gt->GetPDBDirectory(configName);
temp += "/";
temp += targetNamePDB;
fout << "\t\t\t\tProgramDatabaseFile=\"" <<
@@ -1320,7 +1320,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
this->OutputLibraryDirectories(fout, cli.GetDirectories());
fout << "\"\n";
std::string path = this->ConvertToXMLOutputPathSingle(
- target.GetPDBDirectory(configName).c_str());
+ gt->GetPDBDirectory(configName).c_str());
fout << "\t\t\t\tProgramDatabaseFile=\""
<< path << "/" << targetNamePDB
<< "\"\n";
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index eebee83..f6b907e 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -133,7 +133,8 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
this->GeneratorTarget->GetCompilePDBDirectory(this->ConfigName);
cmSystemTools::MakeDirectory(compilePdbOutputPath.c_str());
- std::string pdbOutputPath = this->Target->GetPDBDirectory(this->ConfigName);
+ std::string pdbOutputPath =
+ this->GeneratorTarget->GetPDBDirectory(this->ConfigName);
cmSystemTools::MakeDirectory(pdbOutputPath.c_str());
pdbOutputPath += "/";
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index d12142a..3b3f63e 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -314,7 +314,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
this->GeneratorTarget->GetCompilePDBDirectory(this->ConfigName);
cmSystemTools::MakeDirectory(compilePdbOutputPath.c_str());
- std::string pdbOutputPath = this->Target->GetPDBDirectory(this->ConfigName);
+ std::string pdbOutputPath =
+ this->GeneratorTarget->GetPDBDirectory(this->ConfigName);
cmSystemTools::MakeDirectory(pdbOutputPath.c_str());
pdbOutputPath += "/";
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index cd499f6..6eafeae 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -546,7 +546,8 @@ cmMakefileTargetGenerator
{
targetFullPathReal =
this->GeneratorTarget->GetFullPath(this->ConfigName, false, true);
- targetFullPathPDB = this->Target->GetPDBDirectory(this->ConfigName);
+ targetFullPathPDB =
+ this->GeneratorTarget->GetPDBDirectory(this->ConfigName);
targetFullPathPDB += "/";
targetFullPathPDB += this->GeneratorTarget->GetPDBName(this->ConfigName);
}
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 33e08a3..c2daa63 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -289,7 +289,7 @@ bool cmNinjaTargetGenerator::SetMsvcTargetPdbVariable(cmNinjaVars& vars) const
this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
this->Target->GetType() == cmTarget::MODULE_LIBRARY)
{
- pdbPath = this->Target->GetPDBDirectory(this->GetConfigName());
+ pdbPath = this->GeneratorTarget->GetPDBDirectory(this->GetConfigName());
pdbPath += "/";
pdbPath += this->GeneratorTarget->GetPDBName(this->GetConfigName());
}
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 0f8b3b0..0fc0423 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1771,17 +1771,6 @@ cmTarget::OutputInfo const* cmTarget::GetOutputInfo(
}
//----------------------------------------------------------------------------
-std::string cmTarget::GetPDBDirectory(const std::string& config) const
-{
- if(OutputInfo const* info = this->GetOutputInfo(config))
- {
- // Return the directory in which the target will be built.
- return info->PdbDir;
- }
- return "";
-}
-
-//----------------------------------------------------------------------------
const char* cmTarget::ImportedGetLocation(const std::string& config) const
{
static std::string location;
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 507ea7d..2f9a94b 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -231,12 +231,6 @@ public:
the link dependencies of this target. */
std::string CheckCMP0004(std::string const& item) const;
- /** Get the directory in which this targets .pdb files will be placed.
- If the configuration name is given then the generator will add its
- subdirectory for that configuration. Otherwise just the canonical
- pdb output directory is given. */
- std::string GetPDBDirectory(const std::string& config) const;
-
const char* ImportedGetLocation(const std::string& config) const;
/** Get the target major and minor version numbers interpreted from
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 4c9b82b..a4b0bc3 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2581,7 +2581,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
{
linkOptions.AddFlag("GenerateDebugInformation", "false");
}
- std::string pdb = this->Target->GetPDBDirectory(config.c_str());
+ std::string pdb = this->GeneratorTarget->GetPDBDirectory(config.c_str());
pdb += "/";
pdb += targetNamePDB;
std::string imLib =