diff options
| author | mmazaherit <m.mazaheri.t@gmail.com> | 2017-06-08 23:53:58 -0400 |
|---|---|---|
| committer | mmazaherit <m.mazaheri.t@gmail.com> | 2017-06-08 23:53:58 -0400 |
| commit | e544b742903ddceba71d4652f30a9df4baca598e (patch) | |
| tree | 824fdf1bca936d845c20b51a140e9f60629653cb /toolsrc/include/PostBuildLint_BuildType.h | |
| parent | 9b57ecbdd786113e33d8a149d240769682c7846e (diff) | |
| parent | ff52016d018c9d346cd402e9cc98d24dff39d900 (diff) | |
| download | vcpkg-e544b742903ddceba71d4652f30a9df4baca598e.tar.gz vcpkg-e544b742903ddceba71d4652f30a9df4baca598e.zip | |
Merge branch 'master' of https://github.com/mmazat/vcpkg
Diffstat (limited to 'toolsrc/include/PostBuildLint_BuildType.h')
| -rw-r--r-- | toolsrc/include/PostBuildLint_BuildType.h | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/toolsrc/include/PostBuildLint_BuildType.h b/toolsrc/include/PostBuildLint_BuildType.h index 58bb20766..38ad3084e 100644 --- a/toolsrc/include/PostBuildLint_BuildType.h +++ b/toolsrc/include/PostBuildLint_BuildType.h @@ -1,12 +1,17 @@ #pragma once #include "CStringView.h" -#include "PostBuildLint_ConfigurationType.h" -#include "PostBuildLint_LinkageType.h" +#include "vcpkg_Build.h" #include <array> #include <regex> namespace vcpkg::PostBuildLint { + enum class ConfigurationType + { + DEBUG, + RELEASE, + }; + struct BuildType { enum class BackingEnum @@ -17,11 +22,13 @@ namespace vcpkg::PostBuildLint RELEASE_DYNAMIC }; - static BuildType value_of(const ConfigurationType& config, const LinkageType& linkage); + static BuildType value_of(const ConfigurationType& config, const Build::LinkageType& linkage); BuildType() = delete; - constexpr BuildType(const BackingEnum backing_enum, const ConfigurationType config, const LinkageType linkage) + constexpr BuildType(const BackingEnum backing_enum, + const ConfigurationType config, + const Build::LinkageType linkage) : backing_enum(backing_enum), m_config(config), m_linkage(linkage) { } @@ -29,28 +36,29 @@ namespace vcpkg::PostBuildLint constexpr operator BackingEnum() const { return backing_enum; } const ConfigurationType& config() const; - const LinkageType& linkage() const; + const Build::LinkageType& linkage() const; const std::regex& crt_regex() const; const std::string& to_string() const; private: BackingEnum backing_enum; ConfigurationType m_config; - LinkageType m_linkage; + Build::LinkageType m_linkage; }; namespace BuildTypeC { - namespace CC = ConfigurationTypeC; - namespace LC = LinkageTypeC; + using Build::LinkageType; using BE = BuildType::BackingEnum; static constexpr CStringView ENUM_NAME = "vcpkg::PostBuildLint::BuildType"; - static constexpr BuildType DEBUG_STATIC = {BE::DEBUG_STATIC, CC::DEBUG, LC::STATIC}; - static constexpr BuildType DEBUG_DYNAMIC = {BE::DEBUG_DYNAMIC, CC::DEBUG, LC::DYNAMIC}; - static constexpr BuildType RELEASE_STATIC = {BE::RELEASE_STATIC, CC::RELEASE, LC::STATIC}; - static constexpr BuildType RELEASE_DYNAMIC = {BE::RELEASE_DYNAMIC, CC::RELEASE, LC::DYNAMIC}; + static constexpr BuildType DEBUG_STATIC = {BE::DEBUG_STATIC, ConfigurationType::DEBUG, LinkageType::STATIC}; + static constexpr BuildType DEBUG_DYNAMIC = {BE::DEBUG_DYNAMIC, ConfigurationType::DEBUG, LinkageType::DYNAMIC}; + static constexpr BuildType RELEASE_STATIC = { + BE::RELEASE_STATIC, ConfigurationType::RELEASE, LinkageType::STATIC}; + static constexpr BuildType RELEASE_DYNAMIC = { + BE::RELEASE_DYNAMIC, ConfigurationType::RELEASE, LinkageType::DYNAMIC}; static constexpr std::array<BuildType, 4> VALUES = { DEBUG_STATIC, DEBUG_DYNAMIC, RELEASE_STATIC, RELEASE_DYNAMIC}; |
