diff options
author | Brad King <brad.king@kitware.com> | 2014-05-27 13:46:33 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-05-27 13:46:33 (GMT) |
commit | 4a67e9cd4122e668a6d0352e2a18a4aad6953d7d (patch) | |
tree | f4d50f24b5ff1b46dd23804b85eeffc1e7bd85b2 /Source/cmMakefile.cxx | |
parent | 03a3ee222b737a0e9d1678c7022c735b37d98fa5 (diff) | |
parent | 9ba91463e61b1e4ff5b3dcdea82981f65097e7dd (diff) | |
download | CMake-4a67e9cd4122e668a6d0352e2a18a4aad6953d7d.zip CMake-4a67e9cd4122e668a6d0352e2a18a4aad6953d7d.tar.gz CMake-4a67e9cd4122e668a6d0352e2a18a4aad6953d7d.tar.bz2 |
Merge topic 'dev/CMP0053-variable_watch'
9ba91463 tests: test CMP0053 in WARN mode when watching variables
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 3abcd5d..aca7a93 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -103,6 +103,7 @@ cmMakefile::cmMakefile(): Internal(new Internals) this->GeneratingBuildSystem = false; this->NumLastMatches = 0; + this->SuppressWatches = false; } cmMakefile::cmMakefile(const cmMakefile& mf): Internal(new Internals) @@ -153,6 +154,7 @@ cmMakefile::cmMakefile(const cmMakefile& mf): Internal(new Internals) this->OutputToSource = mf.OutputToSource; this->NumLastMatches = mf.NumLastMatches; + this->SuppressWatches = mf.SuppressWatches; } //---------------------------------------------------------------------------- @@ -2463,7 +2465,7 @@ const char* cmMakefile::GetDefinition(const std::string& name) const } #ifdef CMAKE_BUILD_WITH_CMAKE cmVariableWatch* vv = this->GetVariableWatch(); - if ( vv ) + if ( vv && !this->SuppressWatches ) { if ( def ) { @@ -2559,10 +2561,14 @@ const char *cmMakefile::ExpandVariablesInString(std::string& source, original = source; newResult = source; compareResults = true; + // Suppress variable watches to avoid calling hooks twice. Suppress new + // dereferences since the OLD behavior is still what is actually used. + this->SuppressWatches = true; newError = ExpandVariablesInStringNew(newErrorstr, newResult, escapeQuotes, noEscapes, atOnly, filename, line, removeEmpty, replaceAt); + this->SuppressWatches = false; } case cmPolicies::OLD: mtype = ExpandVariablesInStringOld(errorstr, source, escapeQuotes, |