diff options
author | Daniel Eiband <daniel.eiband@brainlab.com> | 2019-09-21 11:31:36 (GMT) |
---|---|---|
committer | Daniel Eiband <daniel.eiband@brainlab.com> | 2019-09-21 11:31:36 (GMT) |
commit | 8456f60dbc13b9fbd0490371c871a1e85a72c3a8 (patch) | |
tree | e1452ca079a7e1d8af1e22d23417223bf18eaae1 /Source/cmSourceFile.cxx | |
parent | ebb9346490741ddc2ce6f552bc1be57dfc730cfa (diff) | |
download | CMake-8456f60dbc13b9fbd0490371c871a1e85a72c3a8.zip CMake-8456f60dbc13b9fbd0490371c871a1e85a72c3a8.tar.gz CMake-8456f60dbc13b9fbd0490371c871a1e85a72c3a8.tar.bz2 |
cmSourceFile: Remove non-const GetProperties accessor
Manipulating the property map of cmSourceFile directly may invalidate the class
invariant of the cached value IsGenerated. Provide the setter SetProperties
which also updates IsGenerated.
Diffstat (limited to 'Source/cmSourceFile.cxx')
-rw-r--r-- | Source/cmSourceFile.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index 3344217..bd68d04 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -314,6 +314,13 @@ bool cmSourceFile::GetPropertyAsBool(const std::string& prop) const return cmIsOn(this->GetProperty(prop)); } +void cmSourceFile::SetProperties(cmPropertyMap properties) +{ + this->Properties = std::move(properties); + + this->IsGenerated = this->GetPropertyAsBool(propGENERATED); +} + cmCustomCommand* cmSourceFile::GetCustomCommand() const { return this->CustomCommand.get(); |