diff options
author | Brad King <brad.king@kitware.com> | 2020-09-03 13:17:58 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-09-03 13:18:05 (GMT) |
commit | ca5babfd7a1da8e32f927ad086fdd91c2b09853b (patch) | |
tree | 23619c551a1b4c24ff228f98a3503b64a189fb32 /Source/cmVariableWatchCommand.cxx | |
parent | 85e52ea704e13bbf932cd65c225b82f9b945e071 (diff) | |
parent | 11425041f04fd0945480b8f9e9933d1549b93981 (diff) | |
download | CMake-ca5babfd7a1da8e32f927ad086fdd91c2b09853b.zip CMake-ca5babfd7a1da8e32f927ad086fdd91c2b09853b.tar.gz CMake-ca5babfd7a1da8e32f927ad086fdd91c2b09853b.tar.bz2 |
Merge topic 'getdef'
11425041f0 cmMakefile::GetDefinition: return cmProp
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5179
Diffstat (limited to 'Source/cmVariableWatchCommand.cxx')
-rw-r--r-- | Source/cmVariableWatchCommand.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmVariableWatchCommand.cxx b/Source/cmVariableWatchCommand.cxx index ecae16d..750b0b5 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; |