aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/BuildInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'toolsrc/src/BuildInfo.cpp')
-rw-r--r--toolsrc/src/BuildInfo.cpp62
1 files changed, 54 insertions, 8 deletions
diff --git a/toolsrc/src/BuildInfo.cpp b/toolsrc/src/BuildInfo.cpp
index 2e74eefc3..1f802869f 100644
--- a/toolsrc/src/BuildInfo.cpp
+++ b/toolsrc/src/BuildInfo.cpp
@@ -4,14 +4,31 @@
namespace vcpkg
{
- std::string BuildType::toString() const
+ const ConfigurationType& BuildType::config() const
{
- return Strings::format("[%s,%s]", to_string(config), to_string(linkage));
+ return this->m_config;
+ }
+
+ const LinkageType& BuildType::linkage() const
+ {
+ return this->m_linkage;
+ }
+
+ const std::regex& BuildType::crt_regex() const
+ {
+ static const std::regex r(this->m_crt_regex_as_string, std::regex_constants::icase);
+ return r;
+ }
+
+ const std::string& BuildType::toString() const
+ {
+ static const std::string s = Strings::format("[%s,%s]", to_string(this->m_config), to_string(this->m_linkage));
+ return s;
}
bool operator==(const BuildType& lhs, const BuildType& rhs)
{
- return lhs.config == rhs.config && lhs.linkage == rhs.linkage;
+ return lhs.config() == rhs.config() && lhs.linkage() == rhs.linkage();
}
bool operator!=(const BuildType& lhs, const BuildType& rhs)
@@ -35,10 +52,10 @@ namespace vcpkg
return build_info;
}
- const BuildType BuildType::DEBUG_STATIC = BuildType(ConfigurationType::DEBUG, LinkageType::STATIC);
- const BuildType BuildType::DEBUG_DYNAMIC = BuildType(ConfigurationType::DEBUG, LinkageType::DYNAMIC);
- const BuildType BuildType::RELEASE_STATIC = BuildType(ConfigurationType::RELEASE, LinkageType::STATIC);
- const BuildType BuildType::RELEASE_DYNAMIC = BuildType(ConfigurationType::RELEASE, LinkageType::DYNAMIC);
+ const BuildType BuildType::DEBUG_STATIC = BuildType(ConfigurationType::DEBUG, LinkageType::STATIC, R"(/DEFAULTLIB:LIBCMTD)");
+ const BuildType BuildType::DEBUG_DYNAMIC = BuildType(ConfigurationType::DEBUG, LinkageType::DYNAMIC, R"(/DEFAULTLIB:MSVCRTD)");
+ const BuildType BuildType::RELEASE_STATIC = BuildType(ConfigurationType::RELEASE, LinkageType::STATIC, R"(/DEFAULTLIB:LIBCMT[^D])");
+ const BuildType BuildType::RELEASE_DYNAMIC = BuildType(ConfigurationType::RELEASE, LinkageType::DYNAMIC, R"(/DEFAULTLIB:MSVCRT[^D])");
LinkageType linkage_type_value_of(const std::string& as_string)
@@ -70,7 +87,6 @@ namespace vcpkg
}
std::string to_string(const ConfigurationType& conf)
-
{
switch (conf)
{
@@ -115,4 +131,34 @@ namespace vcpkg
return BuildInfo::create(pghs[0]);
}
+
+ const OutdatedDynamicCrt OutdatedDynamicCrt::MSVCP100_DLL = OutdatedDynamicCrt("msvcp100.dll", R"(msvcp100\.dll)");
+ const OutdatedDynamicCrt OutdatedDynamicCrt::MSVCP100D_DLL = OutdatedDynamicCrt("msvcp100d.dll", R"(msvcp100d\.dll)");
+ const OutdatedDynamicCrt OutdatedDynamicCrt::MSVCP110_DLL = OutdatedDynamicCrt("msvcp110.dll", R"(msvcp110\.dll)");
+ const OutdatedDynamicCrt OutdatedDynamicCrt::MSVCP110_WIN_DLL = OutdatedDynamicCrt("msvcp110_win.dll", R"(msvcp110_win\.dll)");
+ const OutdatedDynamicCrt OutdatedDynamicCrt::MSVCP120_DLL = OutdatedDynamicCrt("msvcp120.dll", R"(msvcp120\.dll)");
+ const OutdatedDynamicCrt OutdatedDynamicCrt::MSVCP120_CLR0400_DLL = OutdatedDynamicCrt("msvcp120_clr0400.dll", R"(msvcp120_clr0400\.dll)");
+ const OutdatedDynamicCrt OutdatedDynamicCrt::MSVCP60_DLL = OutdatedDynamicCrt("msvcp60.dll", R"(msvcp60\.dll)");
+ const OutdatedDynamicCrt OutdatedDynamicCrt::MSVCP_WIN_DLL = OutdatedDynamicCrt("msvcp60.dll", R"(msvcp60\.dll)");;
+
+ const OutdatedDynamicCrt OutdatedDynamicCrt::MSVCR100_DLL = OutdatedDynamicCrt("msvcr100.dll", R"(msvcr100\.dll)");
+ const OutdatedDynamicCrt OutdatedDynamicCrt::MSVCR100D_DLL = OutdatedDynamicCrt("msvcr100d.dll", R"(msvcr100d\.dll)");
+ const OutdatedDynamicCrt OutdatedDynamicCrt::MSVCR100_CLR0400_DLL = OutdatedDynamicCrt("msvcr100_clr0400.dll", R"(msvcr100_clr0400\.dll)");
+ const OutdatedDynamicCrt OutdatedDynamicCrt::MSVCR110_DLL = OutdatedDynamicCrt("msvcr110.dll", R"(msvcr110\.dll)");
+ const OutdatedDynamicCrt OutdatedDynamicCrt::MSVCR120_DLL = OutdatedDynamicCrt("msvcr120.dll", R"(msvcr120\.dll)");
+ const OutdatedDynamicCrt OutdatedDynamicCrt::MSVCR120_CLR0400_DLL = OutdatedDynamicCrt("msvcr120_clr0400.dll", R"(msvcr120_clr0400\.dll)");
+ const OutdatedDynamicCrt OutdatedDynamicCrt::MSVCRT_DLL = OutdatedDynamicCrt("msvcrt.dll", R"(msvcrt\.dll)");
+ const OutdatedDynamicCrt OutdatedDynamicCrt::MSVCRT20_DLL = OutdatedDynamicCrt("msvcrt20.dll", R"(msvcrt20\.dll)");;
+ const OutdatedDynamicCrt OutdatedDynamicCrt::MSVCRT40_DLL = OutdatedDynamicCrt("msvcrt40.dll", R"(msvcrt40\.dll)");;
+
+ const std::regex& OutdatedDynamicCrt::crt_regex() const
+ {
+ static const std::regex r(this->m_crt_regex_as_string, std::regex_constants::icase);
+ return r;
+ }
+
+ const std::string& OutdatedDynamicCrt::toString() const
+ {
+ return this->m_dll_name;
+ }
}