aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/PostBuildLint_BuildPolicies.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-03-24 12:49:08 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-03-24 12:49:08 -0700
commit3b511adfe483ebde8a3680fefbd96723201a6667 (patch)
tree5a449ab0e1a86eca83621cf9a14ec4a762da0a43 /toolsrc/src/PostBuildLint_BuildPolicies.cpp
parentcbfc4c0e54bd70f38b8b82d426d7a7291c5f2c0d (diff)
downloadvcpkg-3b511adfe483ebde8a3680fefbd96723201a6667.tar.gz
vcpkg-3b511adfe483ebde8a3680fefbd96723201a6667.zip
Add EMPTY_INCLUDE_FOLDER policy. Resolves #816
Diffstat (limited to 'toolsrc/src/PostBuildLint_BuildPolicies.cpp')
-rw-r--r--toolsrc/src/PostBuildLint_BuildPolicies.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/toolsrc/src/PostBuildLint_BuildPolicies.cpp b/toolsrc/src/PostBuildLint_BuildPolicies.cpp
index b7ebf5380..dab27b72a 100644
--- a/toolsrc/src/PostBuildLint_BuildPolicies.cpp
+++ b/toolsrc/src/PostBuildLint_BuildPolicies.cpp
@@ -10,6 +10,7 @@ namespace vcpkg::PostBuildLint::BuildPolicies
static const std::string NAME_EMPTY_PACKAGE = "PolicyEmptyPackage";
static const std::string NAME_DLLS_WITHOUT_LIBS = "PolicyDLLsWithoutLIBs";
static const std::string NAME_ONLY_RELEASE_CRT = "PolicyOnlyReleaseCRT";
+ static const std::string NAME_EMPTY_INCLUDE_FOLDER = "PolicyEmptyIncludeFolder";
const std::string& type::toString() const
{
@@ -21,6 +22,8 @@ namespace vcpkg::PostBuildLint::BuildPolicies
return NAME_DLLS_WITHOUT_LIBS;
case ONLY_RELEASE_CRT:
return NAME_ONLY_RELEASE_CRT;
+ case EMPTY_INCLUDE_FOLDER:
+ return NAME_EMPTY_INCLUDE_FOLDER;
case NULLVALUE:
return NULLVALUE_STRING;
default:
@@ -33,6 +36,7 @@ namespace vcpkg::PostBuildLint::BuildPolicies
static const std::string CMAKE_VARIABLE_EMPTY_PACKAGE = "VCPKG_POLICY_EMPTY_PACKAGE";
static const std::string CMAKE_VARIABLE_DLLS_WITHOUT_LIBS = "VCPKG_POLICY_DLLS_WITHOUT_LIBS";
static const std::string CMAKE_VARIABLE_ONLY_RELEASE_CRT = "VCPKG_POLICY_ONLY_RELEASE_CRT";
+ static const std::string CMAKE_VARIABLE_EMPTY_INCLUDE_FOLDER = "VCPKG_POLICY_EMPTY_INCLUDE_FOLDER";
switch (this->backing_enum)
{
@@ -42,6 +46,8 @@ namespace vcpkg::PostBuildLint::BuildPolicies
return CMAKE_VARIABLE_DLLS_WITHOUT_LIBS;
case ONLY_RELEASE_CRT:
return CMAKE_VARIABLE_ONLY_RELEASE_CRT;
+ case EMPTY_INCLUDE_FOLDER:
+ return CMAKE_VARIABLE_EMPTY_INCLUDE_FOLDER;
case NULLVALUE:
Enums::nullvalue_used(VCPKG_LINE_INFO, ENUM_NAME);
default:
@@ -66,6 +72,11 @@ namespace vcpkg::PostBuildLint::BuildPolicies
return BuildPolicies::ONLY_RELEASE_CRT;
}
+ if (s == NAME_EMPTY_INCLUDE_FOLDER)
+ {
+ return BuildPolicies::EMPTY_INCLUDE_FOLDER;
+ }
+
return BuildPolicies::NULLVALUE;
}
}