[vcpkg] Hotfix previous commit.

This commit is contained in:
Robert Schumacher 2017-06-08 04:36:11 -07:00
parent 247a6cec90
commit 44a995d446
5 changed files with 28 additions and 27 deletions

View File

@ -4,3 +4,4 @@ Build-Depends: zlib, libpng, libjpeg-turbo, tiff
#Use the following line instead for optional features from OpenCV-contrib that require protobuf
#Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf
Description: computer vision library
Supports: x64

View File

@ -78,7 +78,7 @@ namespace vcpkg
V141,
};
bool supports(Architecture arch, Platform plat, Linkage crt, ToolsetVersion tools);
bool is_supported(Architecture arch, Platform plat, Linkage crt, ToolsetVersion tools);
private:
std::vector<Architecture> architectures;

View File

@ -61,7 +61,7 @@ namespace vcpkg::Strings
template<class Container, class Transformer, class CharType>
std::basic_string<CharType> join(const CharType* delimiter, const Container& v, Transformer transformer)
{
if (v.empty())
if (v.size() == 0)
{
return std::basic_string<CharType>();
}

View File

@ -202,7 +202,7 @@ namespace vcpkg
return std::move(unrecognized);
}
bool Supports::supports(Architecture arch, Platform plat, Linkage crt, ToolsetVersion tools)
bool Supports::is_supported(Architecture arch, Platform plat, Linkage crt, ToolsetVersion tools)
{
auto is_in_or_empty = [](auto v, auto&& c) -> bool { return c.empty() || c.end() != Util::find(c, v); };
if (!is_in_or_empty(arch, architectures)) return false;

View File

@ -45,14 +45,14 @@ namespace UnitTest1
});
Assert::AreNotEqual(uintptr_t(0), uintptr_t(v.get()));
Assert::IsTrue(v.get()->supports(System::CPUArchitecture::X64,
Supports::Platform::UWP,
Supports::Linkage::DYNAMIC,
Supports::ToolsetVersion::V140));
Assert::IsTrue(v.get()->supports(System::CPUArchitecture::ARM,
Supports::Platform::WINDOWS,
Supports::Linkage::STATIC,
Supports::ToolsetVersion::V141));
Assert::IsTrue(v.get()->is_supported(System::CPUArchitecture::X64,
Supports::Platform::UWP,
Supports::Linkage::DYNAMIC,
Supports::ToolsetVersion::V140));
Assert::IsTrue(v.get()->is_supported(System::CPUArchitecture::ARM,
Supports::Platform::WINDOWS,
Supports::Linkage::STATIC,
Supports::ToolsetVersion::V141));
}
TEST_METHOD(parse_supports_invalid)
@ -78,22 +78,22 @@ namespace UnitTest1
});
Assert::AreNotEqual(uintptr_t(0), uintptr_t(v.get()));
Assert::IsTrue(v.get()->supports(System::CPUArchitecture::X64,
Supports::Platform::WINDOWS,
Supports::Linkage::DYNAMIC,
Supports::ToolsetVersion::V140));
Assert::IsFalse(v.get()->supports(System::CPUArchitecture::ARM,
Supports::Platform::WINDOWS,
Supports::Linkage::DYNAMIC,
Supports::ToolsetVersion::V140));
Assert::IsFalse(v.get()->supports(System::CPUArchitecture::X64,
Supports::Platform::UWP,
Supports::Linkage::DYNAMIC,
Supports::ToolsetVersion::V140));
Assert::IsTrue(v.get()->supports(System::CPUArchitecture::X64,
Supports::Platform::WINDOWS,
Supports::Linkage::STATIC,
Supports::ToolsetVersion::V141));
Assert::IsTrue(v.get()->is_supported(System::CPUArchitecture::X64,
Supports::Platform::WINDOWS,
Supports::Linkage::DYNAMIC,
Supports::ToolsetVersion::V140));
Assert::IsFalse(v.get()->is_supported(System::CPUArchitecture::ARM,
Supports::Platform::WINDOWS,
Supports::Linkage::DYNAMIC,
Supports::ToolsetVersion::V140));
Assert::IsFalse(v.get()->is_supported(System::CPUArchitecture::X64,
Supports::Platform::UWP,
Supports::Linkage::DYNAMIC,
Supports::ToolsetVersion::V140));
Assert::IsTrue(v.get()->is_supported(System::CPUArchitecture::X64,
Supports::Platform::WINDOWS,
Supports::Linkage::STATIC,
Supports::ToolsetVersion::V141));
}
};
}