| 649 | }; |
| 650 | |
| 651 | struct ConditionScope { |
| 652 | Generator &gen; |
| 653 | bool endif = false; |
| 654 | |
| 655 | ConditionScope(Generator &gen, const std::string &condition) : gen(gen) { |
| 656 | endif = gen.if_condition(condition); |
| 657 | } |
| 658 | |
| 659 | ConditionScope(const ConditionScope &) = delete; |
| 660 | ConditionScope(ConditionScope &&) = delete; |
| 661 | |
| 662 | ~ConditionScope() { |
| 663 | if (endif) { |
| 664 | gen.cmd("endif")(); |
| 665 | } |
| 666 | } |
| 667 | }; |
| 668 | |
| 669 | static bool vcpkg_valid_identifier(const std::string &name) { |
| 670 | // [a-z0-9]+(-[a-z0-9]+)* |
nothing calls this directly
no outgoing calls
no test coverage detected