summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-01-27 04:04:31 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2023-01-27 04:23:12 (GMT)
commitc33d7d11626f1407a28744897378119284d27484 (patch)
treef403f4c2917f60053ad785e4c84c2c6510a20e1c /Source
parent90d74fcc852ec9cec0a1d2aa90b581b9c63461e4 (diff)
downloadCMake-c33d7d11626f1407a28744897378119284d27484.zip
CMake-c33d7d11626f1407a28744897378119284d27484.tar.gz
CMake-c33d7d11626f1407a28744897378119284d27484.tar.bz2
cmTarget: use cmNonempty rather than local implementation
Diffstat (limited to 'Source')
-rw-r--r--Source/cmTarget.cxx24
1 files 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>(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()));
}