summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorExpression.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/cmGeneratorExpression.cxx
parentc6368a23feae261bfce4beaf0b4fca4c5c56677e (diff)
downloadcmake-830eed374d540ebd643cd9385546838804c07160.tar.gz
CMake: fix sizeof string literal violations
Diffstat (limited to 'Source/cmGeneratorExpression.cxx')
-rw-r--r--Source/cmGeneratorExpression.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index b605350230..c5ae31bd38 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -406,7 +406,7 @@ void cmGeneratorExpression::ReplaceInstallPrefix(
while ((pos = input.find("$<INSTALL_PREFIX>", lastPos)) !=
std::string::npos) {
- std::string::size_type endPos = pos + sizeof("$<INSTALL_PREFIX>") - 1;
+ std::string::size_type endPos = pos + cmStrLen("$<INSTALL_PREFIX>");
input.replace(pos, endPos - pos, replacement);
lastPos = endPos;
}