diff options
author | Brad King <brad.king@kitware.com> | 2019-09-24 14:30:46 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-09-24 14:31:27 (GMT) |
commit | a6093ed18d323741c48b6c3e72c4b94c05914731 (patch) | |
tree | dc1935ed1e2e48c9ed6d50decc2462af7c50f0c6 | |
parent | 28bd7e41b8792365c8730bdbffed825d70e50471 (diff) | |
parent | 8456f60dbc13b9fbd0490371c871a1e85a72c3a8 (diff) | |
download | CMake-a6093ed18d323741c48b6c3e72c4b94c05914731.zip CMake-a6093ed18d323741c48b6c3e72c4b94c05914731.tar.gz CMake-a6093ed18d323741c48b6c3e72c4b94c05914731.tar.bz2 |
Merge topic 'update-cached-is-generated-property'
8456f60dbc cmSourceFile: Remove non-const GetProperties accessor
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3848
-rw-r--r-- | Source/cmCPluginAPI.cxx | 2 | ||||
-rw-r--r-- | Source/cmSourceFile.cxx | 7 | ||||
-rw-r--r-- | Source/cmSourceFile.h | 3 |
3 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index 9c7beca..1eaf48b 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -561,7 +561,7 @@ void* CCONV cmAddSource(void* arg, void* arg2) // Create the real cmSourceFile instance and copy over saved information. cmSourceFile* rsf = mf->GetOrCreateSource(osf->FullPath); - rsf->GetProperties() = osf->Properties; + rsf->SetProperties(osf->Properties); for (std::string const& d : osf->Depends) { rsf->AddDepend(d); } 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(); diff --git a/Source/cmSourceFile.h b/Source/cmSourceFile.h index ff465c7..3b18fdb 100644 --- a/Source/cmSourceFile.h +++ b/Source/cmSourceFile.h @@ -94,8 +94,9 @@ public: void AddDepend(const std::string& d) { this->Depends.push_back(d); } // Get the properties - cmPropertyMap& GetProperties() { return this->Properties; } const cmPropertyMap& GetProperties() const { return this->Properties; } + // Set the properties + void SetProperties(cmPropertyMap properties); /** * Check whether the given source file location could refer to this |