summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2019-02-08 05:27:00 (GMT)
committerSaleem Abdulrasool <compnerd@compnerd.org>2019-02-11 18:44:24 (GMT)
commitfc8b90af2c7f35f770b3167de2dd4c632b3042ea (patch)
tree018c561eea618044d60bb2530a563f534934da80 /Source/cmVisualStudio10TargetGenerator.cxx
parent8a1d25afdf92cabab88598cc9b9e5a9fb2a9493b (diff)
downloadCMake-fc8b90af2c7f35f770b3167de2dd4c632b3042ea.zip
CMake-fc8b90af2c7f35f770b3167de2dd4c632b3042ea.tar.gz
CMake-fc8b90af2c7f35f770b3167de2dd4c632b3042ea.tar.bz2
Create and use `cmGeneratorTarget::Names`
Rather than taking a number of out parameters for the various names, create a structure that is reused for both `GetLibraryNames` and `GetExecutableNames`. Replace uses according to the new interface.
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx19
1 files changed, 6 insertions, 13 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 8e08417..00a2d74 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -3439,18 +3439,11 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions(
linkDirs.push_back("%(AdditionalLibraryDirectories)");
linkOptions.AddFlag("AdditionalLibraryDirectories", linkDirs);
- std::string targetName;
- std::string targetNameSO;
- std::string targetNameFull;
- std::string targetNameImport;
- std::string targetNamePDB;
+ cmGeneratorTarget::Names targetNames;
if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE) {
- this->GeneratorTarget->GetExecutableNames(
- targetName, targetNameFull, targetNameImport, targetNamePDB, config);
+ targetNames = this->GeneratorTarget->GetExecutableNames(config);
} else {
- this->GeneratorTarget->GetLibraryNames(targetName, targetNameSO,
- targetNameFull, targetNameImport,
- targetNamePDB, config);
+ targetNames = this->GeneratorTarget->GetLibraryNames(config);
}
if (this->MSTools) {
@@ -3491,11 +3484,11 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions(
std::string pdb = this->GeneratorTarget->GetPDBDirectory(config);
pdb += "/";
- pdb += targetNamePDB;
+ pdb += targetNames.PDB;
std::string imLib = this->GeneratorTarget->GetDirectory(
config, cmStateEnums::ImportLibraryArtifact);
imLib += "/";
- imLib += targetNameImport;
+ imLib += targetNames.ImportLibrary;
linkOptions.AddFlag("ImportLibrary", imLib);
linkOptions.AddFlag("ProgramDataBaseFile", pdb);
@@ -3519,7 +3512,7 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions(
linkOptions.AppendFlag("IgnoreSpecificDefaultLibraries", "ole32.lib");
}
} else if (this->NsightTegra) {
- linkOptions.AddFlag("SoName", targetNameSO);
+ linkOptions.AddFlag("SoName", targetNames.SharedObject);
}
linkOptions.Parse(flags);