aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include/PostBuildLint_BuildPolicies.h
blob: 8298ffe2d4277cfc223556963d1eee49083cb6c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once
#include <string>

namespace vcpkg::PostBuildLint::BuildPolicies
{
    enum class backing_enum_t
    {
        UNKNOWN = 0,
        DLLS_WITHOUT_LIBS
    };

    struct type
    {
        constexpr explicit type(backing_enum_t backing_enum) : backing_enum(backing_enum) { }
        constexpr operator backing_enum_t() const { return backing_enum; }

        const std::string& toString() const;
        const std::string& cmake_variable() const;

    private:
        type();
        backing_enum_t backing_enum;
    };

    static constexpr int value_count = 2;
    const std::vector<type>& values();

    static constexpr type UNKNOWN(backing_enum_t::UNKNOWN);
    static constexpr type DLLS_WITHOUT_LIBS(backing_enum_t::DLLS_WITHOUT_LIBS);

    type parse(const std::string& s);
}