summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-01-26 23:04:31 -0500
committerBen Boeckel <ben.boeckel@kitware.com>2023-01-26 23:23:12 -0500
commitc33d7d11626f1407a28744897378119284d27484 (patch)
treef403f4c2917f60053ad785e4c84c2c6510a20e1c
parent90d74fcc852ec9cec0a1d2aa90b581b9c63461e4 (diff)
downloadcmake-c33d7d11626f1407a28744897378119284d27484.tar.gz
cmTarget: use cmNonempty rather than local implementation
-rw-r--r--Source/cmTarget.cxx24
1 files changed, 2 insertions, 22 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 04492ba5c4..1037af790b 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1492,26 +1492,6 @@ std::string ConvertToString<cmValue>(cmValue value)
return std::string(*value);
}
-template <typename ValueType>
-bool StringIsEmpty(ValueType const& value);
-
-template <>
-bool StringIsEmpty<const char*>(const char* const& value)
-{
- return cmValue::IsEmpty(value);
-}
-
-template <>
-bool StringIsEmpty<cmValue>(cmValue const& value)
-{
- return value.IsEmpty();
-}
-
-template <>
-bool StringIsEmpty<std::string>(std::string const& value)
-{
- return value.empty();
-}
}
template <typename ValueType>
@@ -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<std::string>(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<std::string>(value, this->Makefile->GetBacktrace()));
}