From c814c9b8ac883aa42930e1f48660145fd4234fe6 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 27 Mar 2018 13:23:30 -0700 Subject: [vcpkgTools.xml] Restructre os-specific info --- toolsrc/src/vcpkg/vcpkgpaths.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'toolsrc/src') diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 9b331d7fc..feacda026 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -46,9 +46,9 @@ namespace vcpkg #if defined(_WIN32) static constexpr StringLiteral OS_STRING = ""; #elif defined(__APPLE__) - static constexpr StringLiteral OS_STRING = " os=\"osx\""; + static constexpr StringLiteral OS_STRING = R"(os="osx")"; #else // assume linux - static constexpr StringLiteral OS_STRING = " os=\"linux\""; + static constexpr StringLiteral OS_STRING = R"(os="linux")"; #endif static const fs::path XML_PATH = paths.scripts / "vcpkgTools.xml"; @@ -72,15 +72,15 @@ namespace vcpkg }; static const std::string XML = paths.get_filesystem().read_contents(XML_PATH).value_or_exit(VCPKG_LINE_INFO); - static const std::regex VERSION_REGEX{ - Strings::format(R"###(([\s\S]*?))###", tool)}; + static const std::regex VERSION_REGEX{R"###(([\s\S]*?))###"}; static const std::regex EXE_RELATIVE_PATH_REGEX{ - Strings::format(R"###(([\s\S]*?))###", OS_STRING)}; + Strings::format(R"###(([\s\S]*?))###")}; static const std::regex ARCHIVE_RELATIVE_PATH_REGEX{ - Strings::format(R"###(([\s\S]*?))###", OS_STRING)}; - static const std::regex URL_REGEX{Strings::format(R"###(([\s\S]*?))###", OS_STRING)}; + Strings::format(R"###(([\s\S]*?))###")}; + static const std::regex URL_REGEX{Strings::format(R"###(([\s\S]*?))###")}; - const std::regex tool_regex{Strings::format(R"###(([\s\S]*?))###", tool)}; + const std::regex tool_regex{ + Strings::format(R"###(([\s\S]*?))###", tool, OS_STRING)}; std::smatch match_tool; const bool has_match_tool = std::regex_search(XML.cbegin(), XML.cend(), match_tool, tool_regex); -- cgit v1.2.3