diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmTarget.cxx | 16 | ||||
-rw-r--r-- | Source/cmTarget.h | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 440d5c7..d095879 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -2001,13 +2001,7 @@ void cmTarget::SetProperty(const char* prop, const char* value) } this->Properties.SetProperty(prop, value, cmProperty::TARGET); - - // If imported information is being set, wipe out cached - // information. - if(this->IsImported() && strncmp(prop, "IMPORTED", 8) == 0) - { - this->Internal->ImportInfoMap.clear(); - } + this->MaybeInvalidatePropertyCache(prop); } //---------------------------------------------------------------------------- @@ -2018,9 +2012,13 @@ void cmTarget::AppendProperty(const char* prop, const char* value) return; } this->Properties.AppendProperty(prop, value, cmProperty::TARGET); + this->MaybeInvalidatePropertyCache(prop); +} - // If imported information is being set, wipe out cached - // information. +//---------------------------------------------------------------------------- +void cmTarget::MaybeInvalidatePropertyCache(const char* prop) +{ + // Wipe wipe out maps caching information affected by this property. if(this->IsImported() && strncmp(prop, "IMPORTED", 8) == 0) { this->Internal->ImportInfoMap.clear(); diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 349d0e0..db49645 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -567,6 +567,8 @@ private: LinkImplementation& impl); void ComputeLinkClosure(const char* config, LinkClosure& lc); + void MaybeInvalidatePropertyCache(const char* prop); + // The cmMakefile instance that owns this target. This should // always be set. cmMakefile* Makefile; |