summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2020-05-29 04:00:00 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2020-05-29 17:12:22 (GMT)
commit1e805f53f5520d8b13d306331fe1f0b34b5d9d7d (patch)
tree904b39e963db393fa5f982c39639361693d26b6e /Source/CPack
parent1336d11d9ceabf070b75816b91c7ae9459f0817c (diff)
downloadCMake-1e805f53f5520d8b13d306331fe1f0b34b5d9d7d.zip
CMake-1e805f53f5520d8b13d306331fe1f0b34b5d9d7d.tar.gz
CMake-1e805f53f5520d8b13d306331fe1f0b34b5d9d7d.tar.bz2
GetDefinition: avoid duplicate calls
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackGenerator.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 08fd2a2..288dc58 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -921,11 +921,11 @@ int cmCPackGenerator::InstallCMakeProject(
}
}
- if (nullptr != mf.GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES")) {
+ if (auto d = mf.GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES")) {
if (!absoluteDestFiles.empty()) {
absoluteDestFiles += ";";
}
- absoluteDestFiles += mf.GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES");
+ absoluteDestFiles += d;
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"Got some ABSOLUTE DESTINATION FILES: " << absoluteDestFiles
<< std::endl);
@@ -936,8 +936,7 @@ int cmCPackGenerator::InstallCMakeProject(
GetComponentInstallDirNameSuffix(component);
if (nullptr != this->GetOption(absoluteDestFileComponent)) {
std::string absoluteDestFilesListComponent =
- cmStrCat(this->GetOption(absoluteDestFileComponent), ';',
- mf.GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES"));
+ cmStrCat(this->GetOption(absoluteDestFileComponent), ';', d);
this->SetOption(absoluteDestFileComponent,
absoluteDestFilesListComponent.c_str());
} else {