diff options
| author | Thomas Fussell <thomas.fussell@gmail.com> | 2017-03-12 17:44:06 -0400 |
|---|---|---|
| committer | Thomas Fussell <thomas.fussell@gmail.com> | 2017-03-12 17:44:06 -0400 |
| commit | 2f42035ab43dd50cd863b51944aa099a99ae60f0 (patch) | |
| tree | 4b6cfd43955e946721c58028fd8564c861d5c331 /toolsrc/include/PostBuildLint_BuildPolicies.h | |
| parent | e02e85626f3206feda86a6f5757009005e0cfe3e (diff) | |
| parent | 1c9873a0daf625f67474aaf3e163c592c27ecb65 (diff) | |
| download | vcpkg-2f42035ab43dd50cd863b51944aa099a99ae60f0.tar.gz vcpkg-2f42035ab43dd50cd863b51944aa099a99ae60f0.zip | |
Merge branch 'master' of git://github.com/Microsoft/vcpkg
Diffstat (limited to 'toolsrc/include/PostBuildLint_BuildPolicies.h')
| -rw-r--r-- | toolsrc/include/PostBuildLint_BuildPolicies.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/toolsrc/include/PostBuildLint_BuildPolicies.h b/toolsrc/include/PostBuildLint_BuildPolicies.h new file mode 100644 index 000000000..d815c6d27 --- /dev/null +++ b/toolsrc/include/PostBuildLint_BuildPolicies.h @@ -0,0 +1,38 @@ +#pragma once +#include <string> +#include <array> + +namespace vcpkg::PostBuildLint::BuildPolicies +{ + enum class backing_enum_t + { + NULLVALUE = 0, + EMPTY_PACKAGE, + DLLS_WITHOUT_LIBS, + ONLY_RELEASE_CRT + }; + + struct type + { + 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; + }; + + static const std::string ENUM_NAME = "vcpkg::PostBuildLint::BuildPolicies"; + + static constexpr type NULLVALUE(backing_enum_t::NULLVALUE); + static constexpr type EMPTY_PACKAGE(backing_enum_t::EMPTY_PACKAGE); + static constexpr type DLLS_WITHOUT_LIBS(backing_enum_t::DLLS_WITHOUT_LIBS); + static constexpr type ONLY_RELEASE_CRT(backing_enum_t::ONLY_RELEASE_CRT); + + static constexpr std::array<type, 3> values = { EMPTY_PACKAGE, DLLS_WITHOUT_LIBS, ONLY_RELEASE_CRT }; + + type parse(const std::string& s); +} |
