Split ConfigurationType into separate h/cpp
MODIFY
include/PostBuildLint_BuildInfo.h
include/PostBuildLint_BuildInfo.h
#include "PostBuildLint_BuildPolicies.h"
#include "opt_bool.h"
#include "PostBuildLint_LinkageType.h"
+#include "PostBuildLint_ConfigurationType.h"
namespace vcpkg::PostBuildLint
{
- enum class ConfigurationType
- {
- DEBUG = 1,
- RELEASE = 2
- };
-
- std::string to_string(const ConfigurationType& conf);
-
struct BuildType
{
static BuildType value_of(const ConfigurationType& config, const LinkageType& linkage);

ADD
include/PostBuildLint_ConfigurationType.h
+#pragma once
+#pragma once
+#include <string>
+
+namespace vcpkg::PostBuildLint
+{
+ enum class ConfigurationType
+ {
+ DEBUG = 1,
+ RELEASE = 2
+ };
+
+ std::string to_string(const ConfigurationType& conf);
+}

MODIFY
src/PostBuildLint_BuildInfo.cpp
src/PostBuildLint_BuildInfo.cpp
@@ -68,19 +68,6 @@ namespace vcpkg::PostBuildLint
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])");
- std::string to_string(const ConfigurationType& conf)
- {
- switch (conf)
- {
- case ConfigurationType::DEBUG:
- return "Debug";
- case ConfigurationType::RELEASE:
- return "Release";
- default:
- Checks::unreachable();
- }
- }
-
BuildType BuildType::value_of(const ConfigurationType& config, const LinkageType& linkage)
{
if (config == ConfigurationType::DEBUG && linkage == LinkageType::STATIC)

ADD
src/PostBuildLint_ConfigurationType.cpp
+#include "pch.h"
+#include "PostBuildLint_ConfigurationType.h"
+#include "vcpkg_Checks.h"
+
+namespace vcpkg::PostBuildLint
+{
+ std::string to_string(const ConfigurationType& conf)
+ {
+ switch (conf)
+ {
+ case ConfigurationType::DEBUG:
+ return "Debug";
+ case ConfigurationType::RELEASE:
+ return "Release";
+ default:
+ Checks::unreachable();
+ }
+ }
+}

MODIFY
vcpkglib/vcpkglib.vcxproj
vcpkglib/vcpkglib.vcxproj
<ClInclude Include="..\include\Paragraphs.h" />
<ClInclude Include="..\include\pch.h" />
<ClInclude Include="..\include\PostBuildLint.h" />
+ <ClInclude Include="..\include\PostBuildLint_ConfigurationType.h" />
<ClInclude Include="..\include\PostBuildLint_LinkageType.h" />
<ClInclude Include="..\include\SourceParagraph.h" />
<ClInclude Include="..\include\StatusParagraph.h" />
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\src\PostBuildLint.cpp" />
+ <ClCompile Include="..\src\PostBuildLint_ConfigurationType.cpp" />
<ClCompile Include="..\src\PostBuildLint_LinkageType.cpp" />
<ClCompile Include="..\src\Stopwatch.cpp" />
<ClCompile Include="..\src\vcpkglib.cpp" />

MODIFY
vcpkglib/vcpkglib.vcxproj.filters
vcpkglib/vcpkglib.vcxproj.filters
<ClCompile Include="..\src\PostBuildLint_LinkageType.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\src\PostBuildLint_ConfigurationType.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\include\package_spec.h">
<ClInclude Include="..\include\PostBuildLint_LinkageType.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="..\include\PostBuildLint_ConfigurationType.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
</Project>
\ No newline at end of file

Split ConfigurationType into separate h/cpp