/src/CMake/Source/cmIncludeRegularExpressionCommand.cxx
Line | Count | Source |
1 | | /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying |
2 | | file LICENSE.rst 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 | 0 | { |
11 | 0 | if (args.empty() || args.size() > 2) { |
12 | 0 | status.SetError("called with incorrect number of arguments"); |
13 | 0 | return false; |
14 | 0 | } |
15 | | |
16 | 0 | cmMakefile& mf = status.GetMakefile(); |
17 | 0 | mf.SetIncludeRegularExpression(args[0]); |
18 | |
|
19 | 0 | if (args.size() > 1) { |
20 | 0 | mf.SetComplainRegularExpression(args[1]); |
21 | 0 | } |
22 | |
|
23 | 0 | return true; |
24 | 0 | } |