diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-11-25 15:25:18 -0800 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-11-25 15:25:18 -0800 |
| commit | 5335d17f53d491d83d98e80ab0e750ec0f6f430b (patch) | |
| tree | f1d366671aa5fe7e1a10c6f0b93b52ff72f49666 /toolsrc/include | |
| parent | 6b64a9adb606ad442e71ba562efd17d42baee3a0 (diff) | |
| download | vcpkg-5335d17f53d491d83d98e80ab0e750ec0f6f430b.tar.gz vcpkg-5335d17f53d491d83d98e80ab0e750ec0f6f430b.zip | |
[vcpkg] Initial experimental support for VCPKG_BUILD_TYPE release
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/vcpkg/build.h | 7 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/postbuildlint.buildtype.h | 24 |
2 files changed, 17 insertions, 14 deletions
diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index 09e74905f..18408e207 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -44,6 +44,12 @@ namespace vcpkg::Build YES }; + enum class ConfigurationType + { + DEBUG, + RELEASE, + }; + struct BuildPackageOptions { UseHeadVersion use_head_version; @@ -90,6 +96,7 @@ namespace vcpkg::Build Optional<std::string> platform_toolset; Optional<fs::path> visual_studio_path; Optional<std::string> external_toolchain_file; + Optional<ConfigurationType> build_type; }; std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset); diff --git a/toolsrc/include/vcpkg/postbuildlint.buildtype.h b/toolsrc/include/vcpkg/postbuildlint.buildtype.h index ff651fd7a..0b469d9a0 100644 --- a/toolsrc/include/vcpkg/postbuildlint.buildtype.h +++ b/toolsrc/include/vcpkg/postbuildlint.buildtype.h @@ -8,12 +8,6 @@ namespace vcpkg::PostBuildLint { - enum class ConfigurationType - { - DEBUG, - RELEASE, - }; - struct BuildType { enum class BackingEnum @@ -24,12 +18,12 @@ namespace vcpkg::PostBuildLint RELEASE_DYNAMIC }; - static BuildType value_of(const ConfigurationType& config, const Build::LinkageType& linkage); + static BuildType value_of(const Build::ConfigurationType& config, const Build::LinkageType& linkage); BuildType() = delete; constexpr BuildType(const BackingEnum backing_enum, - const ConfigurationType config, + const Build::ConfigurationType config, const Build::LinkageType linkage) : backing_enum(backing_enum), m_config(config), m_linkage(linkage) { @@ -37,14 +31,14 @@ namespace vcpkg::PostBuildLint constexpr operator BackingEnum() const { return backing_enum; } - const ConfigurationType& config() const; + const Build::ConfigurationType& config() 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; + Build::ConfigurationType m_config; Build::LinkageType m_linkage; }; @@ -55,12 +49,14 @@ namespace vcpkg::PostBuildLint static constexpr CStringView ENUM_NAME = "vcpkg::PostBuildLint::BuildType"; - 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 DEBUG_STATIC = { + BE::DEBUG_STATIC, Build::ConfigurationType::DEBUG, LinkageType::STATIC}; + static constexpr BuildType DEBUG_DYNAMIC = { + BE::DEBUG_DYNAMIC, Build::ConfigurationType::DEBUG, LinkageType::DYNAMIC}; static constexpr BuildType RELEASE_STATIC = { - BE::RELEASE_STATIC, ConfigurationType::RELEASE, LinkageType::STATIC}; + BE::RELEASE_STATIC, Build::ConfigurationType::RELEASE, LinkageType::STATIC}; static constexpr BuildType RELEASE_DYNAMIC = { - BE::RELEASE_DYNAMIC, ConfigurationType::RELEASE, LinkageType::DYNAMIC}; + BE::RELEASE_DYNAMIC, Build::ConfigurationType::RELEASE, LinkageType::DYNAMIC}; static constexpr std::array<BuildType, 4> VALUES = { DEBUG_STATIC, DEBUG_DYNAMIC, RELEASE_STATIC, RELEASE_DYNAMIC}; |
