mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 19:17:10 +01:00
Split ConfigurationType into separate h/cpp
This commit is contained in:
parent
7a04aff33e
commit
4aef2485b9
@ -6,17 +6,10 @@
|
||||
#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);
|
||||
|
14
toolsrc/include/PostBuildLint_ConfigurationType.h
Normal file
14
toolsrc/include/PostBuildLint_ConfigurationType.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
namespace vcpkg::PostBuildLint
|
||||
{
|
||||
enum class ConfigurationType
|
||||
{
|
||||
DEBUG = 1,
|
||||
RELEASE = 2
|
||||
};
|
||||
|
||||
std::string to_string(const ConfigurationType& conf);
|
||||
}
|
@ -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)
|
||||
|
19
toolsrc/src/PostBuildLint_ConfigurationType.cpp
Normal file
19
toolsrc/src/PostBuildLint_ConfigurationType.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
#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();
|
||||
}
|
||||
}
|
||||
}
|
@ -151,6 +151,7 @@
|
||||
<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" />
|
||||
@ -209,6 +210,7 @@
|
||||
<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" />
|
||||
|
@ -162,6 +162,9 @@
|
||||
<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">
|
||||
@ -278,5 +281,8 @@
|
||||
<ClInclude Include="..\include\PostBuildLint_LinkageType.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\PostBuildLint_ConfigurationType.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
x
Reference in New Issue
Block a user