From c33d7d11626f1407a28744897378119284d27484 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 26 Jan 2023 23:04:31 -0500 Subject: cmTarget: use cmNonempty rather than local implementation --- Source/cmTarget.cxx | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 04492ba..1037af7 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1492,26 +1492,6 @@ std::string ConvertToString(cmValue value) return std::string(*value); } -template -bool StringIsEmpty(ValueType const& value); - -template <> -bool StringIsEmpty(const char* const& value) -{ - return cmValue::IsEmpty(value); -} - -template <> -bool StringIsEmpty(cmValue const& value) -{ - return value.IsEmpty(); -} - -template <> -bool StringIsEmpty(std::string const& value) -{ - return value.empty(); -} } template @@ -1874,7 +1854,7 @@ void cmTargetInternals::AddDirectoryToFileSet(cmTarget* self, if (action == FileSetType::Action::Set) { fileSet->ClearDirectoryEntries(); } - if (!StringIsEmpty(value)) { + if (cmNonempty(value)) { fileSet->AddDirectoryEntry( BT(value, this->Makefile->GetBacktrace())); } @@ -1905,7 +1885,7 @@ void cmTargetInternals::AddPathToFileSet(cmTarget* self, if (action == FileSetType::Action::Set) { fileSet->ClearFileEntries(); } - if (!StringIsEmpty(value)) { + if (cmNonempty(value)) { fileSet->AddFileEntry( BT(value, this->Makefile->GetBacktrace())); } -- cgit v0.12