Rename policy to OnlyReleaseCRT

This commit is contained in:
Alexander Karatarakis 2017-03-03 19:09:24 -08:00
parent d7fb7b7736
commit b03b578ffc
6 changed files with 16 additions and 16 deletions

View File

@ -1,3 +1,3 @@
Source: msmpi Source: msmpi
Version: 8.0 Version: 8.0-1
Description: Microsoft MPI Description: Microsoft MPI

View File

@ -96,7 +96,7 @@ endif()
# Install debug libraries # Install debug libraries
# NOTE: since the binary distribution does not include any debug libraries we simply install the release libraries # NOTE: since the binary distribution does not include any debug libraries we simply install the release libraries
SET(VCPKG_POLICY_NO_DEBUG_BINARIES enabled) SET(VCPKG_POLICY_ONLY_RELEASE_CRT enabled)
file(INSTALL file(INSTALL
"${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpi.lib" "${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpi.lib"
"${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpifec.lib" "${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpifec.lib"

View File

@ -82,8 +82,8 @@ if(CMD MATCHES "^BUILD$")
if (DEFINED VCPKG_POLICY_EMPTY_PACKAGE) if (DEFINED VCPKG_POLICY_EMPTY_PACKAGE)
file(APPEND ${BUILD_INFO_FILE_PATH} "PolicyEmptyPackage: ${VCPKG_POLICY_EMPTY_PACKAGE}\n") file(APPEND ${BUILD_INFO_FILE_PATH} "PolicyEmptyPackage: ${VCPKG_POLICY_EMPTY_PACKAGE}\n")
endif() endif()
if (DEFINED VCPKG_POLICY_NO_DEBUG_BINARIES) if (DEFINED VCPKG_POLICY_ONLY_RELEASE_CRT)
file(APPEND ${BUILD_INFO_FILE_PATH} "PolicyNoDebugBinaries: ${VCPKG_POLICY_NO_DEBUG_BINARIES}\n") file(APPEND ${BUILD_INFO_FILE_PATH} "PolicyOnlyReleaseCRT: ${VCPKG_POLICY_ONLY_RELEASE_CRT}\n")
endif() endif()
elseif(CMD MATCHES "^CREATE$") elseif(CMD MATCHES "^CREATE$")
file(TO_NATIVE_PATH ${VCPKG_ROOT_DIR} NATIVE_VCPKG_ROOT_DIR) file(TO_NATIVE_PATH ${VCPKG_ROOT_DIR} NATIVE_VCPKG_ROOT_DIR)

View File

@ -9,7 +9,7 @@ namespace vcpkg::PostBuildLint::BuildPolicies
NULLVALUE = 0, NULLVALUE = 0,
EMPTY_PACKAGE, EMPTY_PACKAGE,
DLLS_WITHOUT_LIBS, DLLS_WITHOUT_LIBS,
NO_DEBUG_BINARIES ONLY_RELEASE_CRT
}; };
struct type struct type
@ -30,9 +30,9 @@ namespace vcpkg::PostBuildLint::BuildPolicies
static constexpr type NULLVALUE(backing_enum_t::NULLVALUE); static constexpr type NULLVALUE(backing_enum_t::NULLVALUE);
static constexpr type EMPTY_PACKAGE(backing_enum_t::EMPTY_PACKAGE); static constexpr type EMPTY_PACKAGE(backing_enum_t::EMPTY_PACKAGE);
static constexpr type DLLS_WITHOUT_LIBS(backing_enum_t::DLLS_WITHOUT_LIBS); static constexpr type DLLS_WITHOUT_LIBS(backing_enum_t::DLLS_WITHOUT_LIBS);
static constexpr type NO_DEBUG_BINARIES(backing_enum_t::NO_DEBUG_BINARIES); static constexpr type ONLY_RELEASE_CRT(backing_enum_t::ONLY_RELEASE_CRT);
static constexpr std::array<type, 3> values = { EMPTY_PACKAGE, DLLS_WITHOUT_LIBS, NO_DEBUG_BINARIES }; static constexpr std::array<type, 3> values = { EMPTY_PACKAGE, DLLS_WITHOUT_LIBS, ONLY_RELEASE_CRT };
type parse(const std::string& s); type parse(const std::string& s);
} }

View File

@ -684,7 +684,7 @@ namespace vcpkg::PostBuildLint
error_count += check_bin_folders_are_not_present_in_static_build(package_dir); error_count += check_bin_folders_are_not_present_in_static_build(package_dir);
if (!contains_and_enabled(build_info.policies, BuildPolicies::NO_DEBUG_BINARIES)) if (!contains_and_enabled(build_info.policies, BuildPolicies::ONLY_RELEASE_CRT))
{ {
error_count += check_crt_linkage_of_libs(BuildType::value_of(ConfigurationType::DEBUG, build_info.crt_linkage), debug_libs, dumpbin_exe); error_count += check_crt_linkage_of_libs(BuildType::value_of(ConfigurationType::DEBUG, build_info.crt_linkage), debug_libs, dumpbin_exe);
} }

View File

@ -8,7 +8,7 @@ namespace vcpkg::PostBuildLint::BuildPolicies
static const std::string NAME_EMPTY_PACKAGE = "PolicyEmptyPackage"; static const std::string NAME_EMPTY_PACKAGE = "PolicyEmptyPackage";
static const std::string NAME_DLLS_WITHOUT_LIBS = "PolicyDLLsWithoutLIBs"; static const std::string NAME_DLLS_WITHOUT_LIBS = "PolicyDLLsWithoutLIBs";
static const std::string NAME_NO_DEBUG_BINARIES = "PolicyNoDebugBinaries"; static const std::string NAME_ONLY_RELEASE_CRT = "PolicyOnlyReleaseCRT";
const std::string& type::toString() const const std::string& type::toString() const
{ {
@ -18,8 +18,8 @@ namespace vcpkg::PostBuildLint::BuildPolicies
return NAME_EMPTY_PACKAGE; return NAME_EMPTY_PACKAGE;
case DLLS_WITHOUT_LIBS: case DLLS_WITHOUT_LIBS:
return NAME_DLLS_WITHOUT_LIBS; return NAME_DLLS_WITHOUT_LIBS;
case NO_DEBUG_BINARIES: case ONLY_RELEASE_CRT:
return NAME_NO_DEBUG_BINARIES; return NAME_ONLY_RELEASE_CRT;
case NULLVALUE: case NULLVALUE:
return NULLVALUE_STRING; return NULLVALUE_STRING;
default: default:
@ -31,7 +31,7 @@ namespace vcpkg::PostBuildLint::BuildPolicies
{ {
static const std::string CMAKE_VARIABLE_EMPTY_PACKAGE = "VCPKG_POLICY_EMPTY_PACKAGE"; 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_DLLS_WITHOUT_LIBS = "VCPKG_POLICY_DLLS_WITHOUT_LIBS";
static const std::string CMAKE_VARIABLE_NO_DEBUG_BINARIES = "VCPKG_POLICY_NO_DEBUG_BINARIES"; static const std::string CMAKE_VARIABLE_ONLY_RELEASE_CRT = "VCPKG_POLICY_ONLY_RELEASE_CRT";
switch (this->backing_enum) switch (this->backing_enum)
{ {
@ -39,8 +39,8 @@ namespace vcpkg::PostBuildLint::BuildPolicies
return CMAKE_VARIABLE_EMPTY_PACKAGE; return CMAKE_VARIABLE_EMPTY_PACKAGE;
case DLLS_WITHOUT_LIBS: case DLLS_WITHOUT_LIBS:
return CMAKE_VARIABLE_DLLS_WITHOUT_LIBS; return CMAKE_VARIABLE_DLLS_WITHOUT_LIBS;
case NO_DEBUG_BINARIES: case ONLY_RELEASE_CRT:
return CMAKE_VARIABLE_NO_DEBUG_BINARIES; return CMAKE_VARIABLE_ONLY_RELEASE_CRT;
case NULLVALUE: case NULLVALUE:
Enums::nullvalue_used(ENUM_NAME); Enums::nullvalue_used(ENUM_NAME);
default: default:
@ -60,9 +60,9 @@ namespace vcpkg::PostBuildLint::BuildPolicies
return BuildPolicies::DLLS_WITHOUT_LIBS; return BuildPolicies::DLLS_WITHOUT_LIBS;
} }
if (s == NAME_NO_DEBUG_BINARIES) if (s == NAME_ONLY_RELEASE_CRT)
{ {
return BuildPolicies::NO_DEBUG_BINARIES; return BuildPolicies::ONLY_RELEASE_CRT;
} }
return BuildPolicies::NULLVALUE; return BuildPolicies::NULLVALUE;