From 9086fcebdf43ad01892c8f96afc5e676f9b72135 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 1 Feb 2017 13:24:06 -0800 Subject: Rename files in PostBuildLint namespace --- toolsrc/include/BuildInfo.h | 133 -------------------------- toolsrc/include/BuildPolicies.h | 32 ------- toolsrc/include/PostBuildLint.h | 8 ++ toolsrc/include/PostBuildLint_BuildInfo.h | 133 ++++++++++++++++++++++++++ toolsrc/include/PostBuildLint_BuildPolicies.h | 32 +++++++ toolsrc/include/post_build_lint.h | 8 -- 6 files changed, 173 insertions(+), 173 deletions(-) delete mode 100644 toolsrc/include/BuildInfo.h delete mode 100644 toolsrc/include/BuildPolicies.h create mode 100644 toolsrc/include/PostBuildLint.h create mode 100644 toolsrc/include/PostBuildLint_BuildInfo.h create mode 100644 toolsrc/include/PostBuildLint_BuildPolicies.h delete mode 100644 toolsrc/include/post_build_lint.h (limited to 'toolsrc/include') diff --git a/toolsrc/include/BuildInfo.h b/toolsrc/include/BuildInfo.h deleted file mode 100644 index 1fd032aa2..000000000 --- a/toolsrc/include/BuildInfo.h +++ /dev/null @@ -1,133 +0,0 @@ -#pragma once - -#include -#include "Paragraphs.h" -#include -#include "BuildPolicies.h" -#include "opt_bool.h" - -namespace vcpkg::PostBuildLint -{ - enum class LinkageType - { - DYNAMIC, - STATIC, - UNKNOWN - }; - - LinkageType linkage_type_value_of(const std::string& as_string); - - std::string to_string(const LinkageType& build_info); - - enum class ConfigurationType - { - DEBUG = 1, - RELEASE = 2 - }; - - std::string to_string(const ConfigurationType& conf); - - struct BuildType - { - static BuildType value_of(const ConfigurationType& config, const LinkageType& linkage); - - static const BuildType DEBUG_STATIC; - static const BuildType DEBUG_DYNAMIC; - static const BuildType RELEASE_STATIC; - static const BuildType RELEASE_DYNAMIC; - - static const std::vector& values() - { - static const std::vector v = {DEBUG_STATIC, DEBUG_DYNAMIC, RELEASE_STATIC, RELEASE_DYNAMIC}; - return v; - } - - BuildType() = delete; - - const ConfigurationType& config() const; - const LinkageType& linkage() const; - std::regex crt_regex() const; - std::string toString() const; - - private: - BuildType(const ConfigurationType& config, const LinkageType& linkage, const std::string& crt_regex_as_string) - : m_config(config), m_linkage(linkage), m_crt_regex_as_string(crt_regex_as_string) - { - } - - ConfigurationType m_config; - LinkageType m_linkage; - std::string m_crt_regex_as_string; - }; - - bool operator ==(const BuildType& lhs, const BuildType& rhs); - - bool operator !=(const BuildType& lhs, const BuildType& rhs); - - struct OutdatedDynamicCrt - { - // Old CPP - static const OutdatedDynamicCrt MSVCP100_DLL; - static const OutdatedDynamicCrt MSVCP100D_DLL; - static const OutdatedDynamicCrt MSVCP110_DLL; - static const OutdatedDynamicCrt MSVCP110_WIN_DLL; - static const OutdatedDynamicCrt MSVCP120_DLL; - static const OutdatedDynamicCrt MSVCP120_CLR0400_DLL; - static const OutdatedDynamicCrt MSVCP60_DLL; - static const OutdatedDynamicCrt MSVCP_WIN_DLL; - - // Old C - static const OutdatedDynamicCrt MSVCR100_DLL; - static const OutdatedDynamicCrt MSVCR100D_DLL; - static const OutdatedDynamicCrt MSVCR100_CLR0400_DLL; - static const OutdatedDynamicCrt MSVCR110_DLL; - static const OutdatedDynamicCrt MSVCR120_DLL; - static const OutdatedDynamicCrt MSVCR120_CLR0400_DLL; - static const OutdatedDynamicCrt MSVCRT_DLL; - static const OutdatedDynamicCrt MSVCRT20_DLL; - static const OutdatedDynamicCrt MSVCRT40_DLL; - - static const std::vector& values() - { - static const std::vector v = { - MSVCP100_DLL, MSVCP100D_DLL, - MSVCP110_DLL,MSVCP110_WIN_DLL, - MSVCP120_DLL, MSVCP120_CLR0400_DLL, - MSVCP60_DLL, - MSVCP_WIN_DLL, - - MSVCR100_DLL, MSVCR100D_DLL, MSVCR100_CLR0400_DLL, - MSVCR110_DLL, - MSVCR120_DLL, MSVCR120_CLR0400_DLL, - MSVCRT_DLL, MSVCRT20_DLL,MSVCRT40_DLL - }; - return v; - } - - OutdatedDynamicCrt() = delete; - - std::regex crt_regex() const; - const std::string& toString() const; - - private: - explicit OutdatedDynamicCrt(const std::string& dll_name, const std::string& crt_regex_as_string) - : m_dll_name(dll_name), m_crt_regex_as_string(crt_regex_as_string) - { - } - - std::string m_dll_name; - std::string m_crt_regex_as_string; - }; - - struct BuildInfo - { - static BuildInfo create(std::unordered_map pgh); - - std::string crt_linkage; - std::string library_linkage; - - std::map policies; - }; - - BuildInfo read_build_info(const fs::path& filepath); -} diff --git a/toolsrc/include/BuildPolicies.h b/toolsrc/include/BuildPolicies.h deleted file mode 100644 index 8298ffe2d..000000000 --- a/toolsrc/include/BuildPolicies.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once -#include - -namespace vcpkg::PostBuildLint::BuildPolicies -{ - enum class backing_enum_t - { - UNKNOWN = 0, - DLLS_WITHOUT_LIBS - }; - - struct type - { - 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: - type(); - backing_enum_t backing_enum; - }; - - static constexpr int value_count = 2; - const std::vector& values(); - - static constexpr type UNKNOWN(backing_enum_t::UNKNOWN); - static constexpr type DLLS_WITHOUT_LIBS(backing_enum_t::DLLS_WITHOUT_LIBS); - - type parse(const std::string& s); -} diff --git a/toolsrc/include/PostBuildLint.h b/toolsrc/include/PostBuildLint.h new file mode 100644 index 000000000..215a237aa --- /dev/null +++ b/toolsrc/include/PostBuildLint.h @@ -0,0 +1,8 @@ +#pragma once +#include "package_spec.h" +#include "vcpkg_paths.h" + +namespace vcpkg::PostBuildLint +{ + void perform_all_checks(const package_spec& spec, const vcpkg_paths& paths); +} diff --git a/toolsrc/include/PostBuildLint_BuildInfo.h b/toolsrc/include/PostBuildLint_BuildInfo.h new file mode 100644 index 000000000..cf444ce90 --- /dev/null +++ b/toolsrc/include/PostBuildLint_BuildInfo.h @@ -0,0 +1,133 @@ +#pragma once + +#include +#include "Paragraphs.h" +#include +#include "PostBuildLint_BuildPolicies.h" +#include "opt_bool.h" + +namespace vcpkg::PostBuildLint +{ + enum class LinkageType + { + DYNAMIC, + STATIC, + UNKNOWN + }; + + LinkageType linkage_type_value_of(const std::string& as_string); + + std::string to_string(const LinkageType& build_info); + + enum class ConfigurationType + { + DEBUG = 1, + RELEASE = 2 + }; + + std::string to_string(const ConfigurationType& conf); + + struct BuildType + { + static BuildType value_of(const ConfigurationType& config, const LinkageType& linkage); + + static const BuildType DEBUG_STATIC; + static const BuildType DEBUG_DYNAMIC; + static const BuildType RELEASE_STATIC; + static const BuildType RELEASE_DYNAMIC; + + static const std::vector& values() + { + static const std::vector v = {DEBUG_STATIC, DEBUG_DYNAMIC, RELEASE_STATIC, RELEASE_DYNAMIC}; + return v; + } + + BuildType() = delete; + + const ConfigurationType& config() const; + const LinkageType& linkage() const; + std::regex crt_regex() const; + std::string toString() const; + + private: + BuildType(const ConfigurationType& config, const LinkageType& linkage, const std::string& crt_regex_as_string) + : m_config(config), m_linkage(linkage), m_crt_regex_as_string(crt_regex_as_string) + { + } + + ConfigurationType m_config; + LinkageType m_linkage; + std::string m_crt_regex_as_string; + }; + + bool operator ==(const BuildType& lhs, const BuildType& rhs); + + bool operator !=(const BuildType& lhs, const BuildType& rhs); + + struct OutdatedDynamicCrt + { + // Old CPP + static const OutdatedDynamicCrt MSVCP100_DLL; + static const OutdatedDynamicCrt MSVCP100D_DLL; + static const OutdatedDynamicCrt MSVCP110_DLL; + static const OutdatedDynamicCrt MSVCP110_WIN_DLL; + static const OutdatedDynamicCrt MSVCP120_DLL; + static const OutdatedDynamicCrt MSVCP120_CLR0400_DLL; + static const OutdatedDynamicCrt MSVCP60_DLL; + static const OutdatedDynamicCrt MSVCP_WIN_DLL; + + // Old C + static const OutdatedDynamicCrt MSVCR100_DLL; + static const OutdatedDynamicCrt MSVCR100D_DLL; + static const OutdatedDynamicCrt MSVCR100_CLR0400_DLL; + static const OutdatedDynamicCrt MSVCR110_DLL; + static const OutdatedDynamicCrt MSVCR120_DLL; + static const OutdatedDynamicCrt MSVCR120_CLR0400_DLL; + static const OutdatedDynamicCrt MSVCRT_DLL; + static const OutdatedDynamicCrt MSVCRT20_DLL; + static const OutdatedDynamicCrt MSVCRT40_DLL; + + static const std::vector& values() + { + static const std::vector v = { + MSVCP100_DLL, MSVCP100D_DLL, + MSVCP110_DLL,MSVCP110_WIN_DLL, + MSVCP120_DLL, MSVCP120_CLR0400_DLL, + MSVCP60_DLL, + MSVCP_WIN_DLL, + + MSVCR100_DLL, MSVCR100D_DLL, MSVCR100_CLR0400_DLL, + MSVCR110_DLL, + MSVCR120_DLL, MSVCR120_CLR0400_DLL, + MSVCRT_DLL, MSVCRT20_DLL,MSVCRT40_DLL + }; + return v; + } + + OutdatedDynamicCrt() = delete; + + std::regex crt_regex() const; + const std::string& toString() const; + + private: + explicit OutdatedDynamicCrt(const std::string& dll_name, const std::string& crt_regex_as_string) + : m_dll_name(dll_name), m_crt_regex_as_string(crt_regex_as_string) + { + } + + std::string m_dll_name; + std::string m_crt_regex_as_string; + }; + + struct BuildInfo + { + static BuildInfo create(std::unordered_map pgh); + + std::string crt_linkage; + std::string library_linkage; + + std::map policies; + }; + + BuildInfo read_build_info(const fs::path& filepath); +} diff --git a/toolsrc/include/PostBuildLint_BuildPolicies.h b/toolsrc/include/PostBuildLint_BuildPolicies.h new file mode 100644 index 000000000..8298ffe2d --- /dev/null +++ b/toolsrc/include/PostBuildLint_BuildPolicies.h @@ -0,0 +1,32 @@ +#pragma once +#include + +namespace vcpkg::PostBuildLint::BuildPolicies +{ + enum class backing_enum_t + { + UNKNOWN = 0, + DLLS_WITHOUT_LIBS + }; + + struct type + { + 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: + type(); + backing_enum_t backing_enum; + }; + + static constexpr int value_count = 2; + const std::vector& values(); + + static constexpr type UNKNOWN(backing_enum_t::UNKNOWN); + static constexpr type DLLS_WITHOUT_LIBS(backing_enum_t::DLLS_WITHOUT_LIBS); + + type parse(const std::string& s); +} diff --git a/toolsrc/include/post_build_lint.h b/toolsrc/include/post_build_lint.h deleted file mode 100644 index 215a237aa..000000000 --- a/toolsrc/include/post_build_lint.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once -#include "package_spec.h" -#include "vcpkg_paths.h" - -namespace vcpkg::PostBuildLint -{ - void perform_all_checks(const package_spec& spec, const vcpkg_paths& paths); -} -- cgit v1.2.3