cmAlgorithms: Add cmContains

Also, use the new function where applicable.
This commit is contained in:
Regina Pfeifer
2019-08-19 14:31:52 +02:00
parent c41c79285b
commit 2dfc52675c
30 changed files with 140 additions and 174 deletions
+1 -2
View File
@@ -16,7 +16,6 @@
#include "cmTargetExport.h"
#include "cmake.h"
#include <algorithm>
#include <map>
#include <set>
#include <sstream>
@@ -306,7 +305,7 @@ cmExportBuildFileGenerator::FindBuildExportInfo(cmGlobalGenerator* gg,
const cmExportBuildFileGenerator* exportSet = exp.second;
std::vector<std::string> targets;
exportSet->GetTargets(targets);
if (std::find(targets.begin(), targets.end(), name) != targets.end()) {
if (cmContains(targets, name)) {
exportFiles.push_back(exp.first);
ns = exportSet->GetNamespace();
}