summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2021-08-09 14:56:41 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2021-08-09 14:56:41 (GMT)
commite5421168143dda5f72088a6ff451785ec137e8c4 (patch)
tree0d1c49327000d3a1ad008f1acd69e6f3d4adb945
parent7e3250da2fa0155a8c83b3aadef0407a701f2953 (diff)
downloadCMake-e5421168143dda5f72088a6ff451785ec137e8c4.zip
CMake-e5421168143dda5f72088a6ff451785ec137e8c4.tar.gz
CMake-e5421168143dda5f72088a6ff451785ec137e8c4.tar.bz2
Refactor: cmGeneratorTarget::GetSourcesProperty returns cmProp
-rw-r--r--Source/cmGeneratorTarget.cxx6
-rw-r--r--Source/cmGeneratorTarget.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 6bd41bd..4208689 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -62,7 +62,7 @@ cmProp cmTargetPropertyComputer::GetSources<cmGeneratorTarget>(
cmGeneratorTarget const* tgt, cmMessenger* /* messenger */,
cmListFileBacktrace const& /* context */)
{
- return cmProp(tgt->GetSourcesProperty());
+ return tgt->GetSourcesProperty();
}
template <>
@@ -332,7 +332,7 @@ cmGeneratorTarget::cmGeneratorTarget(cmTarget* t, cmLocalGenerator* lg)
cmGeneratorTarget::~cmGeneratorTarget() = default;
-const std::string& cmGeneratorTarget::GetSourcesProperty() const
+cmProp cmGeneratorTarget::GetSourcesProperty() const
{
std::vector<std::string> values;
for (auto const& se : this->SourceEntries) {
@@ -341,7 +341,7 @@ const std::string& cmGeneratorTarget::GetSourcesProperty() const
static std::string value;
value.clear();
value = cmJoin(values, ";");
- return value;
+ return cmProp(value);
}
cmGlobalGenerator* cmGeneratorTarget::GetGlobalGenerator() const
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index bd4e08f..fb1b2e6 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -837,7 +837,7 @@ public:
std::string GetFortranModuleDirectory(std::string const& working_dir) const;
bool IsFortranBuildingInstrinsicModules() const;
- const std::string& GetSourcesProperty() const;
+ cmProp GetSourcesProperty() const;
void AddISPCGeneratedHeader(std::string const& header,
std::string const& config);