From ce2a6ed8352250f26b7d4c8de8114377a7389e66 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Tue, 21 May 2019 01:18:24 +0800 Subject: [PATCH] [vcpkg] Avoid duplication of targets in the CMake message (#6536) --- toolsrc/src/vcpkg/install.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 646e9bc2e8..6e7ad274da 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -531,7 +531,9 @@ namespace vcpkg::Install while (next != last) { auto match = *next; - library_targets[find_package_name].push_back(match[1]); + auto& targets = library_targets[find_package_name]; + if (std::find(targets.cbegin(), targets.cend(), match[1]) == targets.cend()) + targets.push_back(match[1]); ++next; } }