summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2022-11-16 09:57:43 -0500
committerKyle Edwards <kyle.edwards@kitware.com>2022-11-18 09:37:58 -0500
commit830eed374d540ebd643cd9385546838804c07160 (patch)
tree3c71403a089cfa791665d381a80f21902dfa11bd /Source/cmGeneratorTarget.cxx
parentc6368a23feae261bfce4beaf0b4fca4c5c56677e (diff)
downloadcmake-830eed374d540ebd643cd9385546838804c07160.tar.gz
CMake: fix sizeof string literal violations
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 6065285729..fae6d54e44 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -6718,7 +6718,7 @@ bool cmGeneratorTarget::IsLinkLookupScope(std::string const& n,
cmLocalGenerator const*& lg) const
{
if (cmHasLiteralPrefix(n, CMAKE_DIRECTORY_ID_SEP)) {
- cmDirectoryId const dirId = n.substr(sizeof(CMAKE_DIRECTORY_ID_SEP) - 1);
+ cmDirectoryId const dirId = n.substr(cmStrLen(CMAKE_DIRECTORY_ID_SEP));
if (dirId.String.empty()) {
lg = this->LocalGenerator;
return true;