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
|
|
|
|
{
|
2017-04-04 05:50:50 +08:00
|
|
|
enum class BackingEnum
|
2017-02-01 09:09:48 +08:00
|
|
|
{
|
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
|
|
|
};
|
|
|
|
|
2017-04-04 05:50:50 +08:00
|
|
|
struct Type
|
2017-02-01 09:09:48 +08:00
|
|
|
{
|
2017-04-04 05:50:50 +08:00
|
|
|
constexpr Type() : backing_enum(BackingEnum::NULLVALUE) {}
|
|
|
|
constexpr explicit Type(BackingEnum backing_enum) : backing_enum(backing_enum) { }
|
|
|
|
constexpr operator BackingEnum() const { return backing_enum; }
|
2017-02-01 09:09:48 +08:00
|
|
|
|
2017-04-04 08:08:08 +08:00
|
|
|
const std::string& to_string() const;
|
2017-02-01 09:09:48 +08:00
|
|
|
const std::string& cmake_variable() const;
|
|
|
|
|
|
|
|
private:
|
2017-04-04 05:50:50 +08:00
|
|
|
BackingEnum backing_enum;
|
2017-02-01 09:09:48 +08:00
|
|
|
};
|
|
|
|
|
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-04-04 05:50:50 +08:00
|
|
|
static constexpr Type NULLVALUE(BackingEnum::NULLVALUE);
|
|
|
|
static constexpr Type EMPTY_PACKAGE(BackingEnum::EMPTY_PACKAGE);
|
|
|
|
static constexpr Type DLLS_WITHOUT_LIBS(BackingEnum::DLLS_WITHOUT_LIBS);
|
|
|
|
static constexpr Type ONLY_RELEASE_CRT(BackingEnum::ONLY_RELEASE_CRT);
|
|
|
|
static constexpr Type EMPTY_INCLUDE_FOLDER(BackingEnum::EMPTY_INCLUDE_FOLDER);
|
2017-02-01 09:09:48 +08:00
|
|
|
|
2017-04-04 05:50:50 +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-04-04 05:50:50 +08:00
|
|
|
Type parse(const std::string& s);
|
2017-02-01 09:09:48 +08:00
|
|
|
}
|