diff options
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/PostBuildLint.h | 5 | ||||
| -rw-r--r-- | toolsrc/include/triplet.h | 2 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg_Build.h | 13 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg_Strings.h | 6 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg_System.h | 14 |
5 files changed, 32 insertions, 8 deletions
diff --git a/toolsrc/include/PostBuildLint.h b/toolsrc/include/PostBuildLint.h index 0ee47d0c1..69fafc9f7 100644 --- a/toolsrc/include/PostBuildLint.h +++ b/toolsrc/include/PostBuildLint.h @@ -5,5 +5,8 @@ namespace vcpkg::PostBuildLint { - size_t perform_all_checks(const PackageSpec& spec, const VcpkgPaths& paths, const Build::BuildInfo& build_info); + size_t perform_all_checks(const PackageSpec& spec, + const VcpkgPaths& paths, + const Build::PreBuildInfo& pre_build_info, + const Build::BuildInfo& build_info); } diff --git a/toolsrc/include/triplet.h b/toolsrc/include/triplet.h index 4d837bc47..e634afd3f 100644 --- a/toolsrc/include/triplet.h +++ b/toolsrc/include/triplet.h @@ -15,8 +15,6 @@ namespace vcpkg static const Triplet ARM_UWP; const std::string& canonical_name() const; - std::string architecture() const; - std::string system() const; const std::string& to_string() const; private: diff --git a/toolsrc/include/vcpkg_Build.h b/toolsrc/include/vcpkg_Build.h index 28ddb0d16..4deb81900 100644 --- a/toolsrc/include/vcpkg_Build.h +++ b/toolsrc/include/vcpkg_Build.h @@ -8,7 +8,6 @@ #include "vcpkg_Files.h" #include "vcpkg_optional.h" #include <map> -#include <string> #include <unordered_map> #include <vector> @@ -33,7 +32,17 @@ namespace vcpkg::Build std::string create_error_message(const BuildResult build_result, const PackageSpec& spec); std::string create_user_troubleshooting_message(const PackageSpec& spec); - std::wstring make_build_env_cmd(const Triplet& triplet, const Toolset& toolset); + struct PreBuildInfo + { + static PreBuildInfo from_triplet_file(const VcpkgPaths& paths, const Triplet& triplet); + + std::string target_architecture; + std::string cmake_system_name; + std::string cmake_system_version; + std::string platform_toolset; + }; + + std::wstring make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset); struct ExtendedBuildResult { diff --git a/toolsrc/include/vcpkg_Strings.h b/toolsrc/include/vcpkg_Strings.h index 11c8b5a6a..3f8f4562e 100644 --- a/toolsrc/include/vcpkg_Strings.h +++ b/toolsrc/include/vcpkg_Strings.h @@ -48,12 +48,14 @@ namespace vcpkg::Strings return details::wformat_internal(fmtstr, to_wprintf_arg(to_wprintf_arg(args))...); } - std::wstring utf8_to_utf16(const CStringView s); + std::wstring to_utf16(const CStringView s); - std::string utf16_to_utf8(const CWStringView w); + std::string to_utf8(const CWStringView w); std::string::const_iterator case_insensitive_ascii_find(const std::string& s, const std::string& pattern); + int case_insensitive_ascii_compare(const CStringView left, const CStringView right); + std::string ascii_to_lowercase(const std::string& input); template<class T, class Transformer, class CharType> diff --git a/toolsrc/include/vcpkg_System.h b/toolsrc/include/vcpkg_System.h index c8deac38e..71033a642 100644 --- a/toolsrc/include/vcpkg_System.h +++ b/toolsrc/include/vcpkg_System.h @@ -61,10 +61,22 @@ namespace vcpkg::System return println(c, Strings::format(messageTemplate, messageArg1, messageArgs...)); } - Optional<std::wstring> get_environmental_variable(const CWStringView varname) noexcept; + Optional<std::wstring> get_environment_variable(const CWStringView varname) noexcept; Optional<std::wstring> get_registry_string(HKEY base, const CWStringView subkey, const CWStringView valuename); + enum class CPUArchitecture + { + X86, + X64, + ARM, + ARM64, + }; + + Optional<CPUArchitecture> to_cpu_architecture(CStringView arch); + + CPUArchitecture get_host_processor(); + const fs::path& get_ProgramFiles_32_bit(); const fs::path& get_ProgramFiles_platform_bitness(); |
