diff options
author | Brad King <brad.king@kitware.com> | 2018-04-12 15:32:31 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-04-12 15:32:37 (GMT) |
commit | 2cdefcbe62707a82eccbc301fe34f85bb74d932a (patch) | |
tree | fca403211b0449955f38e3f7dfdb6ea9169e314a /Source | |
parent | d59cd3b131a0c18d93fbc04f745bed990cfefa31 (diff) | |
parent | 65198cfd0f96d51269c748a84bafe27cf3312abd (diff) | |
download | CMake-2cdefcbe62707a82eccbc301fe34f85bb74d932a.zip CMake-2cdefcbe62707a82eccbc301fe34f85bb74d932a.tar.gz CMake-2cdefcbe62707a82eccbc301fe34f85bb74d932a.tar.bz2 |
Merge topic 'variable_watch-on-PARENT_SCOPE'
65198cfd0f variable_watch: trigger on variables set via PARENT_SCOPE
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1948
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefile.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 87cfc3b..9aeeb5c 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3839,7 +3839,16 @@ void cmMakefile::RaiseScope(const std::string& var, const char* varDef) std::ostringstream m; m << "Cannot set \"" << var << "\": current scope has no parent."; this->IssueMessage(cmake::AUTHOR_WARNING, m.str()); + return; } + +#ifdef CMAKE_BUILD_WITH_CMAKE + cmVariableWatch* vv = this->GetVariableWatch(); + if (vv) { + vv->VariableAccessed(var, cmVariableWatch::VARIABLE_MODIFIED_ACCESS, + varDef, this); + } +#endif } cmTarget* cmMakefile::AddImportedTarget(const std::string& name, |