diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 66031dbc4e..21b91e012d 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -929,7 +929,9 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( } // Compute the list of outputs. - std::vector outputs(1, targetFullPathReal); + std::vector outputs; + outputs.reserve(3); + outputs.push_back(targetFullPathReal); if (this->TargetNames.SharedObject != this->TargetNames.Real) { outputs.push_back(targetFullPathSO); }