resolve cyclic dependency with zstd
[platform/upstream/cmake.git] / Source / cmIncludeRegularExpressionCommand.cxx
1 /* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
2    file Copyright.txt or https://cmake.org/licensing for details.  */
3 #include "cmIncludeRegularExpressionCommand.h"
4
5 #include "cmExecutionStatus.h"
6 #include "cmMakefile.h"
7
8 bool cmIncludeRegularExpressionCommand(std::vector<std::string> const& args,
9                                        cmExecutionStatus& status)
10 {
11   if (args.empty() || args.size() > 2) {
12     status.SetError("called with incorrect number of arguments");
13     return false;
14   }
15
16   cmMakefile& mf = status.GetMakefile();
17   mf.SetIncludeRegularExpression(args[0]);
18
19   if (args.size() > 1) {
20     mf.SetComplainRegularExpression(args[1]);
21   }
22
23   return true;
24 }