2017-02-01 09:09:48 +08:00
|
|
|
#pragma once
|
|
|
|
#include <string>
|
2017-02-10 11:00:09 +08:00
|
|
|
#include <array>
|
2017-02-01 09:09:48 +08:00
|
|
|
|
|
|
|
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,
|
2017-03-25 03:49:08 +08:00
|
|
|
ONLY_RELEASE_CRT,
|
|
|
|
EMPTY_INCLUDE_FOLDER
|
2017-02-01 09:09:48 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct type
|
|
|
|
{
|
2017-02-10 11:00:09 +08:00
|
|
|
constexpr type() : backing_enum(backing_enum_t::NULLVALUE) {}
|
2017-02-01 09:09:48 +08:00
|
|
|
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);
|
2017-02-01 09:09:48 +08:00
|
|
|
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);
|
2017-03-25 03:49:08 +08:00
|
|
|
static constexpr type EMPTY_INCLUDE_FOLDER(backing_enum_t::EMPTY_INCLUDE_FOLDER);
|
2017-02-01 09:09:48 +08:00
|
|
|
|
2017-03-25 03:49:08 +08:00
|
|
|
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
|
|
|
|
2017-02-01 09:09:48 +08:00
|
|
|
type parse(const std::string& s);
|
|
|
|
}
|