diff options
author | Brad King <brad.king@kitware.com> | 2007-02-01 16:54:49 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-02-01 16:54:49 -0500 |
commit | 4bc0fd0941a97a86b2925562b717597f5ed0a2f4 (patch) | |
tree | 426e9f6ffe79babf1373cc62394ee8282825bde5 /Source | |
parent | ed7de15676aa3e1731a16d263ce5113cbb2fe4fc (diff) | |
download | cmake-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.cxx | 16 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 11 | ||||
-rw-r--r-- | Source/cmTarget.h | 3 |
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. */ |