summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-02-01 16:54:49 -0500
committerBrad King <brad.king@kitware.com>2007-02-01 16:54:49 -0500
commit4bc0fd0941a97a86b2925562b717597f5ed0a2f4 (patch)
tree426e9f6ffe79babf1373cc62394ee8282825bde5 /Source
parented7de15676aa3e1731a16d263ce5113cbb2fe4fc (diff)
downloadcmake-4bc0fd0941a97a86b2925562b717597f5ed0a2f4.tar.gz
ENH: Added cmTarget::GetPDBName method to simplify computation of .pdb file name for a target.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx16
-rw-r--r--Source/cmTarget.cxx11
-rw-r--r--Source/cmTarget.h3
3 files changed, 16 insertions, 14 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index da579dbd2d..f59f3dabf7 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -638,29 +638,17 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
{
if(target.GetType() == cmTarget::EXECUTABLE)
{
- std::string targetName;
- std::string targetNameFull;
- std::string targetNamePDB;
- target.GetExecutableNames(targetName, targetNameFull,
- targetNamePDB, configName);
fout << "\t\t\t\tProgramDataBaseFileName=\""
<< this->ExecutableOutputPath
- << "$(OutDir)/" << targetNamePDB << "\"\n";
+ << "$(OutDir)/" << target.GetPDBName(configName) << "\"\n";
}
else if(target.GetType() == cmTarget::STATIC_LIBRARY ||
target.GetType() == cmTarget::SHARED_LIBRARY ||
target.GetType() == cmTarget::MODULE_LIBRARY)
{
- std::string targetName;
- std::string targetNameSO;
- std::string targetNameFull;
- std::string targetNameImport;
- std::string targetNamePDB;
- target.GetLibraryNames(targetName, targetNameSO, targetNameFull,
- targetNameImport, targetNamePDB, configName);
fout << "\t\t\t\tProgramDataBaseFileName=\""
<< this->LibraryOutputPath
- << "$(OutDir)/" << targetNamePDB << "\"\n";
+ << "$(OutDir)/" << target.GetPDBName(configName) << "\"\n";
}
}
fout << "/>\n"; // end of <Tool Name=VCCLCompilerTool
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 1b5138b59a..5e2001a0ac 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1376,6 +1376,17 @@ const char* cmTarget::GetPrefixVariableInternal(TargetType type,
}
//----------------------------------------------------------------------------
+std::string cmTarget::GetPDBName(const char* config)
+{
+ std::string prefix;
+ std::string base;
+ std::string suffix;
+ this->GetFullNameInternal(this->GetType(), config, false,
+ prefix, base, suffix);
+ return prefix+base+".pdb";
+}
+
+//----------------------------------------------------------------------------
std::string cmTarget::GetFullName(const char* config, bool implib)
{
return this->GetFullNameInternal(this->GetType(), config, implib);
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index afe28623cc..3e7d838a04 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -205,6 +205,9 @@ public:
void GetFullName(std::string& prefix,
std::string& base, std::string& suffix,
const char* config=0, bool implib = false);
+
+ /** Get the name of the pdb file for the target. */
+ std::string GetPDBName(const char* config=0);
/** Get the full path to the target according to the settings in its
makefile and the configuration type. */