summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGeneratorTarget.cxx12
-rw-r--r--Source/cmGeneratorTarget.h6
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx2
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx2
-rw-r--r--Source/cmTarget.cxx16
-rw-r--r--Source/cmTarget.h12
6 files changed, 24 insertions, 26 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index aac941e..c6f248c 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -743,7 +743,7 @@ cmGeneratorTarget::GetCompilePDBName(const std::string& config) const
std::string
cmGeneratorTarget::GetCompilePDBPath(const std::string& config) const
{
- std::string dir = this->Target->GetCompilePDBDirectory(config);
+ std::string dir = this->GetCompilePDBDirectory(config);
std::string name = this->GetCompilePDBName(config);
if(dir.empty() && !name.empty())
{
@@ -1824,6 +1824,16 @@ void cmGeneratorTarget::TraceDependencies()
tracer.Trace();
}
+std::string
+cmGeneratorTarget::GetCompilePDBDirectory(const std::string& config) const
+{
+ if(cmTarget::CompileInfo const* info = this->Target->GetCompileInfo(config))
+ {
+ return info->CompilePdbDir;
+ }
+ return "";
+}
+
//----------------------------------------------------------------------------
void cmGeneratorTarget::GetAppleArchs(const std::string& config,
std::vector<std::string>& archVec) const
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 52ab6c0..3dbbca1 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -214,6 +214,12 @@ public:
*/
void TraceDependencies();
+ /** Get the directory in which to place the target compiler .pdb file.
+ If the configuration name is given then the generator will add its
+ subdirectory for that configuration. Otherwise just the canonical
+ compiler pdb output directory is given. */
+ std::string GetCompilePDBDirectory(const std::string& config = "") const;
+
/** Get sources that must be built before the given source. */
std::vector<cmSourceFile*> const*
GetSourceDepends(cmSourceFile const* sf) const;
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index afe145a..ccb0974 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -130,7 +130,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
}
std::string compilePdbOutputPath =
- this->Target->GetCompilePDBDirectory(this->ConfigName);
+ this->GeneratorTarget->GetCompilePDBDirectory(this->ConfigName);
cmSystemTools::MakeDirectory(compilePdbOutputPath.c_str());
std::string pdbOutputPath = this->Target->GetPDBDirectory(this->ConfigName);
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index bb0f9dd..2f995e8 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -311,7 +311,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
}
std::string compilePdbOutputPath =
- this->Target->GetCompilePDBDirectory(this->ConfigName);
+ this->GeneratorTarget->GetCompilePDBDirectory(this->ConfigName);
cmSystemTools::MakeDirectory(compilePdbOutputPath.c_str());
std::string pdbOutputPath = this->Target->GetPDBDirectory(this->ConfigName);
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 8b64bc4..9308113 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -69,12 +69,6 @@ struct cmTarget::OutputInfo
};
//----------------------------------------------------------------------------
-struct cmTarget::CompileInfo
-{
- std::string CompilePdbDir;
-};
-
-//----------------------------------------------------------------------------
class cmTargetInternals
{
public:
@@ -2673,16 +2667,6 @@ std::string cmTarget::GetPDBDirectory(const std::string& config) const
}
//----------------------------------------------------------------------------
-std::string cmTarget::GetCompilePDBDirectory(const std::string& config) const
-{
- if(CompileInfo const* info = this->GetCompileInfo(config))
- {
- return info->CompilePdbDir;
- }
- 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 a6f2465..8689838 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -334,12 +334,6 @@ public:
pdb output directory is given. */
std::string GetPDBDirectory(const std::string& config) const;
- /** Get the directory in which to place the target compiler .pdb file.
- If the configuration name is given then the generator will add its
- subdirectory for that configuration. Otherwise just the canonical
- compiler pdb output directory is given. */
- std::string GetCompilePDBDirectory(const std::string& config = "") const;
-
const char* ImportedGetLocation(const std::string& config) const;
/** Get the target major and minor version numbers interpreted from
@@ -633,7 +627,11 @@ private:
ImportInfo& info) const;
// Cache target compile paths for each configuration.
- struct CompileInfo;
+ struct CompileInfo
+ {
+ std::string CompilePdbDir;
+ };
+
CompileInfo const* GetCompileInfo(const std::string& config) const;
LinkInterface const*