summaryrefslogtreecommitdiffstats
path: root/Source/cmCMakePathCommand.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2021-05-11 15:20:00 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2021-05-11 15:20:04 (GMT)
commit5e8fa0b7bcdd8f4f1af2a61335df9a1c952dbbdf (patch)
tree440ad6c931ede616674c1616cb328efc0ad80cf0 /Source/cmCMakePathCommand.cxx
parentee87e53d3732a6482841c01c16e89f2822137d0e (diff)
downloadCMake-5e8fa0b7bcdd8f4f1af2a61335df9a1c952dbbdf.zip
CMake-5e8fa0b7bcdd8f4f1af2a61335df9a1c952dbbdf.tar.gz
CMake-5e8fa0b7bcdd8f4f1af2a61335df9a1c952dbbdf.tar.bz2
Source: Minor code improvements
Diffstat (limited to 'Source/cmCMakePathCommand.cxx')
-rw-r--r--Source/cmCMakePathCommand.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmCMakePathCommand.cxx b/Source/cmCMakePathCommand.cxx
index 962fdcc..9a5fa7b 100644
--- a/Source/cmCMakePathCommand.cxx
+++ b/Source/cmCMakePathCommand.cxx
@@ -18,6 +18,7 @@
#include "cmCMakePath.h"
#include "cmExecutionStatus.h"
#include "cmMakefile.h"
+#include "cmProperty.h"
#include "cmRange.h"
#include "cmStringAlgorithms.h"
#include "cmSubcommandTable.h"
@@ -149,8 +150,8 @@ public:
bool getInputPath(const std::string& arg, cmExecutionStatus& status,
std::string& path)
{
- const auto* def = status.GetMakefile().GetDefinition(arg);
- if (def == nullptr) {
+ cmProp def = status.GetMakefile().GetDefinition(arg);
+ if (!def) {
status.SetError("undefined variable for input path.");
return false;
}