aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2016-11-09 18:44:11 -0800
committerAlexander Karatarakis <alkarata@microsoft.com>2016-11-09 18:44:11 -0800
commitbf7978dcf962c8ff37b3319121e60eb1629be684 (patch)
tree4c0305ed26f1dfc8cf7065957e0086497611f18d /toolsrc/include
parent968fb2768d7ba8ab7c5c5f352cd63d18dcc3bde3 (diff)
downloadvcpkg-bf7978dcf962c8ff37b3319121e60eb1629be684.tar.gz
vcpkg-bf7978dcf962c8ff37b3319121e60eb1629be684.zip
[post-build-checks] Rework crt linkage checks
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/BuildInfo.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/toolsrc/include/BuildInfo.h b/toolsrc/include/BuildInfo.h
index 870001474..235c83837 100644
--- a/toolsrc/include/BuildInfo.h
+++ b/toolsrc/include/BuildInfo.h
@@ -2,6 +2,7 @@
#include <unordered_map>
#include "Paragraphs.h"
+#include <regex>
namespace fs = std::tr2::sys;
@@ -35,17 +36,33 @@ namespace vcpkg
static const BuildType RELEASE_STATIC;
static const BuildType RELEASE_DYNAMIC;
- const ConfigurationType config;
- const LinkageType linkage;
+ static constexpr int length()
+ {
+ return 4;
+ }
+
+ static const std::vector<BuildType>& values()
+ {
+ static const std::vector<BuildType> v = {DEBUG_STATIC, DEBUG_DYNAMIC, RELEASE_STATIC, RELEASE_DYNAMIC};
+ return v;
+ }
BuildType() = delete;
- std::string toString() const;
+ const ConfigurationType& config() const;
+ const LinkageType& linkage() const;
+ const std::regex& crt_regex() const;
+ const std::string& toString() const;
private:
- BuildType(const ConfigurationType& config, const LinkageType& linkage) : config(config), linkage(linkage)
+ 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);