cmCMakePolicyCommand
| 20 | |
| 21 | // cmCMakePolicyCommand |
| 22 | bool cmCMakePolicyCommand(std::vector<std::string> const& args, |
| 23 | cmExecutionStatus& status) |
| 24 | { |
| 25 | if (args.empty()) { |
| 26 | status.SetError("requires at least one argument."); |
| 27 | return false; |
| 28 | } |
| 29 | |
| 30 | if (args[0] == "SET") { |
| 31 | return HandleSetMode(args, status); |
| 32 | } |
| 33 | if (args[0] == "GET") { |
| 34 | return HandleGetMode(args, status); |
| 35 | } |
| 36 | if (args[0] == "PUSH") { |
| 37 | if (args.size() > 1) { |
| 38 | status.SetError("PUSH may not be given additional arguments."); |
| 39 | return false; |
| 40 | } |
| 41 | status.GetMakefile().PushPolicy(); |
| 42 | return true; |
| 43 | } |
| 44 | if (args[0] == "POP") { |
| 45 | if (args.size() > 1) { |
| 46 | status.SetError("POP may not be given additional arguments."); |
| 47 | return false; |
| 48 | } |
| 49 | status.GetMakefile().PopPolicy(); |
| 50 | return true; |
| 51 | } |
| 52 | if (args[0] == "VERSION") { |
| 53 | return HandleVersionMode(args, status); |
| 54 | } |
| 55 | if (args[0] == "GET_WARNING") { |
| 56 | return HandleGetWarningMode(args, status); |
| 57 | } |
| 58 | |
| 59 | status.SetError(cmStrCat("given unknown first argument \"", args[0], '"')); |
| 60 | return false; |
| 61 | } |
| 62 | |
| 63 | namespace { |
| 64 |
nothing calls this directly
no test coverage detected
searching dependent graphs…