summaryrefslogtreecommitdiff
path: root/Source/cmVariableWatchCommand.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2020-08-01 15:00:00 -0400
committerVitaly Stakhovsky <vvs31415@gitlab.org>2020-09-02 07:27:32 -0400
commit11425041f04fd0945480b8f9e9933d1549b93981 (patch)
tree9cafffd6774513f686440b31795cbb3b5e38b65c /Source/cmVariableWatchCommand.cxx
parent99b21e58e020fedc6d09a619c1a8dc2e9ea7e2c5 (diff)
downloadcmake-11425041f04fd0945480b8f9e9933d1549b93981.tar.gz
cmMakefile::GetDefinition: return cmProp
Diffstat (limited to 'Source/cmVariableWatchCommand.cxx')
-rw-r--r--Source/cmVariableWatchCommand.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmVariableWatchCommand.cxx b/Source/cmVariableWatchCommand.cxx
index ecae16daeb..750b0b5bfb 100644
--- a/Source/cmVariableWatchCommand.cxx
+++ b/Source/cmVariableWatchCommand.cxx
@@ -10,6 +10,7 @@
#include "cmListFileCache.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
+#include "cmProperty.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmVariableWatch.h"
@@ -45,7 +46,7 @@ void cmVariableWatchCommandVariableAccessed(const std::string& variable,
std::string stack = *mf->GetProperty("LISTFILE_STACK");
if (!data->Command.empty()) {
cmListFileFunction newLFF;
- const char* const currentListFile =
+ cmProp const currentListFile =
mf->GetDefinition("CMAKE_CURRENT_LIST_FILE");
const auto fakeLineNo =
std::numeric_limits<decltype(cmListFileArgument::Line)>::max();
@@ -53,7 +54,7 @@ void cmVariableWatchCommandVariableAccessed(const std::string& variable,
{ variable, cmListFileArgument::Quoted, fakeLineNo },
{ accessString, cmListFileArgument::Quoted, fakeLineNo },
{ newValue ? newValue : "", cmListFileArgument::Quoted, fakeLineNo },
- { currentListFile, cmListFileArgument::Quoted, fakeLineNo },
+ { *currentListFile, cmListFileArgument::Quoted, fakeLineNo },
{ stack, cmListFileArgument::Quoted, fakeLineNo }
};
newLFF.Name = data->Command;