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

View File

@@ -2980,7 +2980,7 @@ bool HandleArchiveCreateCommand(std::vector<std::string> const& args,
};
if (!parsedArgs.Format.empty() &&
!cmContains(knownFormats, parsedArgs.Format)) {
!cm::contains(knownFormats, parsedArgs.Format)) {
status.SetError(
cmStrCat("archive format ", parsedArgs.Format, " not supported"));
cmSystemTools::SetFatalErrorOccured();
@@ -2989,7 +2989,7 @@ bool HandleArchiveCreateCommand(std::vector<std::string> const& args,
const char* zipFileFormats[] = { "7zip", "zip" };
if (!parsedArgs.Type.empty() &&
cmContains(zipFileFormats, parsedArgs.Format)) {
cm::contains(zipFileFormats, parsedArgs.Format)) {
status.SetError(cmStrCat("archive format ", parsedArgs.Format,
" does not support TYPE arguments"));
cmSystemTools::SetFatalErrorOccured();