aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-02-01 13:54:08 -0800
committerAlexander Karatarakis <alkarata@microsoft.com>2017-02-01 17:54:49 -0800
commit1d34facb84812bd478f2320857a5a7a3ed327bbf (patch)
treefd298e069666feceb80aadb1af22da7bd4e2d3fb
parent0a0a17b7f9eb2aca7f999de1c4b8c63428e1eadf (diff)
downloadvcpkg-1d34facb84812bd478f2320857a5a7a3ed327bbf.tar.gz
vcpkg-1d34facb84812bd478f2320857a5a7a3ed327bbf.zip
Split OutdatedDynamicCrt into separate h/cpp
-rw-r--r--toolsrc/include/PostBuildLint_BuildInfo.h56
-rw-r--r--toolsrc/include/PostBuildLint_OutdatedDynamicCrt.h59
-rw-r--r--toolsrc/src/PostBuildLint.cpp2
-rw-r--r--toolsrc/src/PostBuildLint_BuildInfo.cpp29
-rw-r--r--toolsrc/src/PostBuildLint_OutdatedDynamicCrt.cpp35
-rw-r--r--toolsrc/vcpkglib/vcpkglib.vcxproj2
-rw-r--r--toolsrc/vcpkglib/vcpkglib.vcxproj.filters6
7 files changed, 104 insertions, 85 deletions
diff --git a/toolsrc/include/PostBuildLint_BuildInfo.h b/toolsrc/include/PostBuildLint_BuildInfo.h
index b41478ef0..ff996b2b6 100644
--- a/toolsrc/include/PostBuildLint_BuildInfo.h
+++ b/toolsrc/include/PostBuildLint_BuildInfo.h
@@ -2,67 +2,11 @@
#include <unordered_map>
#include "Paragraphs.h"
-#include <regex>
#include "PostBuildLint_BuildPolicies.h"
#include "opt_bool.h"
namespace vcpkg::PostBuildLint
{
- struct OutdatedDynamicCrt
- {
- // Old CPP
- static const OutdatedDynamicCrt MSVCP100_DLL;
- static const OutdatedDynamicCrt MSVCP100D_DLL;
- static const OutdatedDynamicCrt MSVCP110_DLL;
- static const OutdatedDynamicCrt MSVCP110_WIN_DLL;
- static const OutdatedDynamicCrt MSVCP120_DLL;
- static const OutdatedDynamicCrt MSVCP120_CLR0400_DLL;
- static const OutdatedDynamicCrt MSVCP60_DLL;
- static const OutdatedDynamicCrt MSVCP_WIN_DLL;
-
- // Old C
- static const OutdatedDynamicCrt MSVCR100_DLL;
- static const OutdatedDynamicCrt MSVCR100D_DLL;
- static const OutdatedDynamicCrt MSVCR100_CLR0400_DLL;
- static const OutdatedDynamicCrt MSVCR110_DLL;
- static const OutdatedDynamicCrt MSVCR120_DLL;
- static const OutdatedDynamicCrt MSVCR120_CLR0400_DLL;
- static const OutdatedDynamicCrt MSVCRT_DLL;
- static const OutdatedDynamicCrt MSVCRT20_DLL;
- static const OutdatedDynamicCrt MSVCRT40_DLL;
-
- static const std::vector<OutdatedDynamicCrt>& values()
- {
- static const std::vector<OutdatedDynamicCrt> v = {
- MSVCP100_DLL, MSVCP100D_DLL,
- MSVCP110_DLL,MSVCP110_WIN_DLL,
- MSVCP120_DLL, MSVCP120_CLR0400_DLL,
- MSVCP60_DLL,
- MSVCP_WIN_DLL,
-
- MSVCR100_DLL, MSVCR100D_DLL, MSVCR100_CLR0400_DLL,
- MSVCR110_DLL,
- MSVCR120_DLL, MSVCR120_CLR0400_DLL,
- MSVCRT_DLL, MSVCRT20_DLL,MSVCRT40_DLL
- };
- return v;
- }
-
- OutdatedDynamicCrt() = delete;
-
- std::regex crt_regex() const;
- const std::string& toString() const;
-
- private:
- explicit OutdatedDynamicCrt(const std::string& dll_name, const std::string& crt_regex_as_string)
- : m_dll_name(dll_name), m_crt_regex_as_string(crt_regex_as_string)
- {
- }
-
- std::string m_dll_name;
- std::string m_crt_regex_as_string;
- };
-
struct BuildInfo
{
static BuildInfo create(std::unordered_map<std::string, std::string> pgh);
diff --git a/toolsrc/include/PostBuildLint_OutdatedDynamicCrt.h b/toolsrc/include/PostBuildLint_OutdatedDynamicCrt.h
new file mode 100644
index 000000000..484f74cf0
--- /dev/null
+++ b/toolsrc/include/PostBuildLint_OutdatedDynamicCrt.h
@@ -0,0 +1,59 @@
+#pragma once
+#include <vector>
+#include <regex>
+
+namespace vcpkg::PostBuildLint
+{
+ struct OutdatedDynamicCrt
+ {
+ // Old CPP
+ static const OutdatedDynamicCrt MSVCP100_DLL;
+ static const OutdatedDynamicCrt MSVCP100D_DLL;
+ static const OutdatedDynamicCrt MSVCP110_DLL;
+ static const OutdatedDynamicCrt MSVCP110_WIN_DLL;
+ static const OutdatedDynamicCrt MSVCP120_DLL;
+ static const OutdatedDynamicCrt MSVCP120_CLR0400_DLL;
+ static const OutdatedDynamicCrt MSVCP60_DLL;
+ static const OutdatedDynamicCrt MSVCP_WIN_DLL;
+
+ // Old C
+ static const OutdatedDynamicCrt MSVCR100_DLL;
+ static const OutdatedDynamicCrt MSVCR100D_DLL;
+ static const OutdatedDynamicCrt MSVCR100_CLR0400_DLL;
+ static const OutdatedDynamicCrt MSVCR110_DLL;
+ static const OutdatedDynamicCrt MSVCR120_DLL;
+ static const OutdatedDynamicCrt MSVCR120_CLR0400_DLL;
+ static const OutdatedDynamicCrt MSVCRT_DLL;
+ static const OutdatedDynamicCrt MSVCRT20_DLL;
+ static const OutdatedDynamicCrt MSVCRT40_DLL;
+
+ static const std::vector<OutdatedDynamicCrt>& values()
+ {
+ static const std::vector<OutdatedDynamicCrt> v = {
+ MSVCP100_DLL, MSVCP100D_DLL,
+ MSVCP110_DLL,MSVCP110_WIN_DLL,
+ MSVCP120_DLL, MSVCP120_CLR0400_DLL,
+ MSVCP60_DLL,
+ MSVCP_WIN_DLL,
+
+ MSVCR100_DLL, MSVCR100D_DLL, MSVCR100_CLR0400_DLL,
+ MSVCR110_DLL,
+ MSVCR120_DLL, MSVCR120_CLR0400_DLL,
+ MSVCRT_DLL, MSVCRT20_DLL,MSVCRT40_DLL
+ };
+ return v;
+ }
+
+ OutdatedDynamicCrt() = delete;
+
+ std::regex crt_regex() const;
+ const std::string& toString() const;
+
+ private:
+ explicit OutdatedDynamicCrt(const std::string& dll_name, const std::string& crt_regex_as_string)
+ : m_dll_name(dll_name), m_crt_regex_as_string(crt_regex_as_string) { }
+
+ std::string m_dll_name;
+ std::string m_crt_regex_as_string;
+ };
+}
diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp
index e7e976383..5954089e9 100644
--- a/toolsrc/src/PostBuildLint.cpp
+++ b/toolsrc/src/PostBuildLint.cpp
@@ -6,6 +6,8 @@
#include "vcpkg_Environment.h"
#include "coff_file_reader.h"
#include "PostBuildLint_BuildInfo.h"
+#include "PostBuildLint_BuildType.h"
+#include "PostBuildLint_OutdatedDynamicCrt.h"
namespace vcpkg::PostBuildLint
{
diff --git a/toolsrc/src/PostBuildLint_BuildInfo.cpp b/toolsrc/src/PostBuildLint_BuildInfo.cpp
index 1d6d45e10..63107acd1 100644
--- a/toolsrc/src/PostBuildLint_BuildInfo.cpp
+++ b/toolsrc/src/PostBuildLint_BuildInfo.cpp
@@ -39,33 +39,4 @@ namespace vcpkg::PostBuildLint
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)");;
-
- std::regex OutdatedDynamicCrt::crt_regex() const
- {
- 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;
- }
}
diff --git a/toolsrc/src/PostBuildLint_OutdatedDynamicCrt.cpp b/toolsrc/src/PostBuildLint_OutdatedDynamicCrt.cpp
new file mode 100644
index 000000000..67965cd93
--- /dev/null
+++ b/toolsrc/src/PostBuildLint_OutdatedDynamicCrt.cpp
@@ -0,0 +1,35 @@
+#include "pch.h"
+#include "PostBuildLint_OutdatedDynamicCrt.h"
+
+namespace vcpkg::PostBuildLint
+{
+ 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)");;
+
+ std::regex OutdatedDynamicCrt::crt_regex() const
+ {
+ 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;
+ }
+}
diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj
index 59bf5c214..1217f6765 100644
--- a/toolsrc/vcpkglib/vcpkglib.vcxproj
+++ b/toolsrc/vcpkglib/vcpkglib.vcxproj
@@ -154,6 +154,7 @@
<ClInclude Include="..\include\PostBuildLint_BuildType.h" />
<ClInclude Include="..\include\PostBuildLint_ConfigurationType.h" />
<ClInclude Include="..\include\PostBuildLint_LinkageType.h" />
+ <ClInclude Include="..\include\PostBuildLint_OutdatedDynamicCrt.h" />
<ClInclude Include="..\include\SourceParagraph.h" />
<ClInclude Include="..\include\StatusParagraph.h" />
<ClInclude Include="..\include\StatusParagraphs.h" />
@@ -213,6 +214,7 @@
<ClCompile Include="..\src\PostBuildLint.cpp" />
<ClCompile Include="..\src\PostBuildLint_ConfigurationType.cpp" />
<ClCompile Include="..\src\PostBuildLint_LinkageType.cpp" />
+ <ClCompile Include="..\src\PostBuildLint_OutdatedDynamicCrt.cpp" />
<ClCompile Include="..\src\PostBuiltLint_BuildType.cpp" />
<ClCompile Include="..\src\Stopwatch.cpp" />
<ClCompile Include="..\src\vcpkglib.cpp" />
diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters
index e9758e485..f1bf4f9c9 100644
--- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters
+++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters
@@ -168,6 +168,9 @@
<ClCompile Include="..\src\PostBuiltLint_BuildType.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\src\PostBuildLint_OutdatedDynamicCrt.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\include\package_spec.h">
@@ -290,5 +293,8 @@
<ClInclude Include="..\include\PostBuildLint_BuildType.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="..\include\PostBuildLint_OutdatedDynamicCrt.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
</Project> \ No newline at end of file