diff options
| author | Jan HrubĂ˝ <jhruby.web@gmail.com> | 2017-03-13 08:56:05 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-13 08:56:05 +0100 |
| commit | 665f4118f603c5858217ed7a2f2f824b18ff4fc5 (patch) | |
| tree | f0167041edf71e90f2331b5025f603392a8de67a /toolsrc/include/PostBuildLint_BuildPolicies.h | |
| parent | 1bec0fcb73073b5b1719f454c368a63f1bff625e (diff) | |
| parent | 1c9873a0daf625f67474aaf3e163c592c27ecb65 (diff) | |
| download | vcpkg-665f4118f603c5858217ed7a2f2f824b18ff4fc5.tar.gz vcpkg-665f4118f603c5858217ed7a2f2f824b18ff4fc5.zip | |
Merge pull request #1 from Microsoft/master
pull
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); +} |
