From e5421168143dda5f72088a6ff451785ec137e8c4 Mon Sep 17 00:00:00 2001 From: Marc Chevrier Date: Mon, 9 Aug 2021 16:56:41 +0200 Subject: Refactor: cmGeneratorTarget::GetSourcesProperty returns cmProp --- Source/cmGeneratorTarget.cxx | 6 +++--- Source/cmGeneratorTarget.h | 2 +- 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 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 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); -- cgit v0.12