MCPcopy Create free account
hub / github.com/build-cpp/cmkr / ConditionScope

Class ConditionScope

src/cmake_generator.cpp:651–667  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

649};
650
651struct 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
669static bool vcpkg_valid_identifier(const std::string &name) {
670 // [a-z0-9]+(-[a-z0-9]+)*

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected