diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 4d297e89a2..d8a62042e9 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -998,6 +998,7 @@ std::string cmComputeLinkInformation::CreateExtensionRegex( std::string cmComputeLinkInformation::NoCaseExpression(const char* str) { std::string ret; + ret.reserve(strlen(str) * 4); const char* s = str; while (*s) { if (*s == '.') {