mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 03:39:43 -06:00
cmMakefileLibraryTargetGenerator: improve output building
GCC warns about buffer juggling here. To avoid the warning, improve the code to avoid resizing on the following two pushes.
This commit is contained in:
@@ -929,7 +929,9 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
|
||||
}
|
||||
|
||||
// Compute the list of outputs.
|
||||
std::vector<std::string> outputs(1, targetFullPathReal);
|
||||
std::vector<std::string> outputs;
|
||||
outputs.reserve(3);
|
||||
outputs.push_back(targetFullPathReal);
|
||||
if (this->TargetNames.SharedObject != this->TargetNames.Real) {
|
||||
outputs.push_back(targetFullPathSO);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user