diff options
author | Regina Pfeifer <regina@mailbox.org> | 2019-08-19 12:31:52 (GMT) |
---|---|---|
committer | Regina Pfeifer <regina@mailbox.org> | 2019-08-19 18:01:39 (GMT) |
commit | 2dfc52675c3ea732bd389852675e680e296415cb (patch) | |
tree | 23ff56e62d180ef60fe92b9e9d01878f9a96c36a /Source/cmcmd.cxx | |
parent | c41c79285b5ebb7dd914a6e714aa553bb5078641 (diff) | |
download | CMake-2dfc52675c3ea732bd389852675e680e296415cb.zip CMake-2dfc52675c3ea732bd389852675e680e296415cb.tar.gz CMake-2dfc52675c3ea732bd389852675e680e296415cb.tar.bz2 |
cmAlgorithms: Add cmContains
Also, use the new function where applicable.
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index ba2788e..30aaa9c 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -38,10 +38,8 @@ #include "cmsys/FStream.hxx" #include "cmsys/Process.h" #include "cmsys/Terminal.h" -#include <algorithm> #include <array> #include <iostream> -#include <iterator> #include <memory> #include <sstream> #include <stdio.h> @@ -1075,11 +1073,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string> const& args) } } else if (cmHasLiteralPrefix(arg, "--format=")) { format = arg.substr(9); - bool isKnown = - std::find(cm::cbegin(knownFormats), cm::cend(knownFormats), - format) != cm::cend(knownFormats); - - if (!isKnown) { + if (!cmContains(knownFormats, format)) { cmSystemTools::Error("Unknown -E tar --format= argument: " + format); return 1; |