vcpkg/toolsrc/include/PostBuildLint_BuildPolicies.h

41 lines
1.3 KiB
C
Raw Normal View History

#pragma once
#include <string>
2017-02-10 11:00:09 +08:00
#include <array>
namespace vcpkg::PostBuildLint::BuildPolicies
{
enum class backing_enum_t
{
2017-02-10 11:00:09 +08:00
NULLVALUE = 0,
2017-02-08 09:02:57 +08:00
EMPTY_PACKAGE,
2017-03-04 11:00:48 +08:00
DLLS_WITHOUT_LIBS,
ONLY_RELEASE_CRT,
EMPTY_INCLUDE_FOLDER
};
struct type
{
2017-02-10 11:00:09 +08:00
constexpr type() : backing_enum(backing_enum_t::NULLVALUE) {}
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:
backing_enum_t backing_enum;
};
2017-02-10 11:00:09 +08:00
static const std::string ENUM_NAME = "vcpkg::PostBuildLint::BuildPolicies";
2017-02-01 10:55:14 +08:00
2017-02-10 11:00:09 +08:00
static constexpr type NULLVALUE(backing_enum_t::NULLVALUE);
2017-02-08 09:02:57 +08:00
static constexpr type EMPTY_PACKAGE(backing_enum_t::EMPTY_PACKAGE);
static constexpr type DLLS_WITHOUT_LIBS(backing_enum_t::DLLS_WITHOUT_LIBS);
2017-03-04 11:09:24 +08:00
static constexpr type ONLY_RELEASE_CRT(backing_enum_t::ONLY_RELEASE_CRT);
static constexpr type EMPTY_INCLUDE_FOLDER(backing_enum_t::EMPTY_INCLUDE_FOLDER);
static constexpr std::array<type, 4> values = { EMPTY_PACKAGE, DLLS_WITHOUT_LIBS, ONLY_RELEASE_CRT, EMPTY_INCLUDE_FOLDER };
2017-02-10 11:00:09 +08:00
type parse(const std::string& s);
}