mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-06 04:03:27 +03: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:
1 parent
f1d55ff7e9
commit
13ab9fbf36
1 file changed
+3
-1
@@ -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