Refactoring: add cm::contains to <cmext/algorithm>

This commit is contained in:
Marc Chevrier
2020-04-13 12:11:31 +02:00
parent 9a450bcfec
commit aacd4e4a90
39 changed files with 259 additions and 186 deletions
+4 -5
View File
@@ -15,7 +15,6 @@
#include "cmsys/RegularExpression.hxx"
#include "cmAlgorithms.h"
#include "cmComputeLinkInformation.h"
#include "cmCustomCommand.h"
#include "cmCustomCommandGenerator.h"
@@ -363,7 +362,7 @@ cmGlobalXCodeGenerator::GenerateBuildCommand(
std::string projectArg = cmStrCat(projectName, ".xcodeproj");
makeCommand.Add(projectArg);
}
if (cmContains(targetNames, "clean")) {
if (cm::contains(targetNames, "clean")) {
makeCommand.Add("clean");
makeCommand.Add("-target", "ALL_BUILD");
} else {
@@ -911,7 +910,7 @@ void cmGlobalXCodeGenerator::AddXCodeProjBuildRule(
"/CMakeLists.txt");
cmSourceFile* srcCMakeLists = target->Makefile->GetOrCreateSource(
listfile, false, cmSourceFileLocationKind::Known);
if (!cmContains(sources, srcCMakeLists)) {
if (!cm::contains(sources, srcCMakeLists)) {
sources.push_back(srcCMakeLists);
}
}
@@ -1427,8 +1426,8 @@ void cmGlobalXCodeGenerator::ForceLinkerLanguage(cmGeneratorTarget* gtgt)
bool cmGlobalXCodeGenerator::IsHeaderFile(cmSourceFile* sf)
{
return cmContains(this->CMakeInstance->GetHeaderExtensions(),
sf->GetExtension());
return cm::contains(this->CMakeInstance->GetHeaderExtensions(),
sf->GetExtension());
}
cmXCodeObject* cmGlobalXCodeGenerator::CreateBuildPhase(