diff options
author | Brad King <brad.king@kitware.com> | 2020-03-17 12:04:59 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-03-17 12:05:29 (GMT) |
commit | d2e0b8bcfdf93806a01917e3692cc93a34d2f90c (patch) | |
tree | e6d9745f97ad345a7b31301d33fae1389f11dda2 /Source/cmExportFileGenerator.cxx | |
parent | 2b720f6ab6b86db3eed13c107acda8562072ffef (diff) | |
parent | 60f57d0dccb18bfcb37e6bd0c6496cc2e7996d14 (diff) | |
download | CMake-d2e0b8bcfdf93806a01917e3692cc93a34d2f90c.zip CMake-d2e0b8bcfdf93806a01917e3692cc93a34d2f90c.tar.gz CMake-d2e0b8bcfdf93806a01917e3692cc93a34d2f90c.tar.bz2 |
Merge topic 'prop_t'
60f57d0dcc cmPropertyMap: Introduce cmProp as return type for GetProperty() functions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4471
Diffstat (limited to 'Source/cmExportFileGenerator.cxx')
-rw-r--r-- | Source/cmExportFileGenerator.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index bbae86c..003019a 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -1215,9 +1215,9 @@ bool cmExportFileGenerator::PopulateExportProperties( std::string& errorMessage) { auto& targetProperties = gte->Target->GetProperties(); - if (const char* exportProperties = + if (cmProp exportProperties = targetProperties.GetPropertyValue("EXPORT_PROPERTIES")) { - for (auto& prop : cmExpandedList(exportProperties)) { + for (auto& prop : cmExpandedList(*exportProperties)) { /* Black list reserved properties */ if (cmHasLiteralPrefix(prop, "IMPORTED_") || cmHasLiteralPrefix(prop, "INTERFACE_")) { @@ -1228,15 +1228,15 @@ bool cmExportFileGenerator::PopulateExportProperties( errorMessage = e.str(); return false; } - auto propertyValue = targetProperties.GetPropertyValue(prop); + cmProp propertyValue = targetProperties.GetPropertyValue(prop); if (propertyValue == nullptr) { // Asked to export a property that isn't defined on the target. Do not // consider this an error, there's just nothing to export. continue; } std::string evaluatedValue = cmGeneratorExpression::Preprocess( - propertyValue, cmGeneratorExpression::StripAllGeneratorExpressions); - if (evaluatedValue != propertyValue) { + *propertyValue, cmGeneratorExpression::StripAllGeneratorExpressions); + if (evaluatedValue != *propertyValue) { std::ostringstream e; e << "Target \"" << gte->Target->GetName() << "\" contains property \"" << prop << "\" in EXPORT_PROPERTIES but this property contains a " @@ -1244,7 +1244,7 @@ bool cmExportFileGenerator::PopulateExportProperties( errorMessage = e.str(); return false; } - properties[prop] = propertyValue; + properties[prop] = *propertyValue; } } return true; |