summaryrefslogtreecommitdiffstats
path: root/Source/cmUtilitySourceCommand.cxx
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/cmUtilitySourceCommand.cxx
parent1336d11d9ceabf070b75816b91c7ae9459f0817c (diff)
downloadCMake-1e805f53f5520d8b13d306331fe1f0b34b5d9d7d.zip
CMake-1e805f53f5520d8b13d306331fe1f0b34b5d9d7d.tar.gz
CMake-1e805f53f5520d8b13d306331fe1f0b34b5d9d7d.tar.bz2
GetDefinition: avoid duplicate calls
Diffstat (limited to 'Source/cmUtilitySourceCommand.cxx')
-rw-r--r--Source/cmUtilitySourceCommand.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx
index 5865a19..6de78ff 100644
--- a/Source/cmUtilitySourceCommand.cxx
+++ b/Source/cmUtilitySourceCommand.cxx
@@ -84,8 +84,8 @@ bool cmUtilitySourceCommand(std::vector<std::string> const& args,
std::string utilityDirectory =
status.GetMakefile().GetCurrentBinaryDirectory();
std::string exePath;
- if (status.GetMakefile().GetDefinition("EXECUTABLE_OUTPUT_PATH")) {
- exePath = status.GetMakefile().GetDefinition("EXECUTABLE_OUTPUT_PATH");
+ if (auto d = status.GetMakefile().GetDefinition("EXECUTABLE_OUTPUT_PATH")) {
+ exePath = d;
}
if (!exePath.empty()) {
utilityDirectory = exePath;