mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 07:08:38 -05:00
Merge topic 'update-cached-is-generated-property'
8456f60dbc cmSourceFile: Remove non-const GetProperties accessor
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3848
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user