From ff9bc7291ad15aa4cd80b337c2abff63fd4793b2 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 6 Nov 2024 14:46:35 -0500 Subject: [PATCH] cmPolicies: Remove now-unused GetRequiredPolicyError method --- Source/cmPolicies.cxx | 22 ---------------------- Source/cmPolicies.h | 3 --- 2 files changed, 25 deletions(-) diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index df4fa94e69..c3601654cb 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -376,28 +376,6 @@ std::string cmPolicies::GetPolicyDeprecatedWarning(cmPolicies::PolicyID id) "to the NEW behavior and not rely on setting a policy to OLD."); } -//! return an error string for when a required policy is unspecified -std::string cmPolicies::GetRequiredPolicyError(cmPolicies::PolicyID id) -{ - return cmStrCat( - "Policy ", idToString(id), - " is not set to NEW: ", idToShortDescription(id), - " " - "Run \"cmake --help-policy ", - idToString(id), - "\" for policy details. " - "CMake now requires this policy to be set to NEW by the project. " - "The policy may be set explicitly using the code\n" - " cmake_policy(SET ", - idToString(id), - " NEW)\n" - "or by upgrading all policies with the code\n" - " cmake_policy(VERSION ", - idToVersion(id), - ") # or later\n" - "Run \"cmake --help-command cmake_policy\" for more information."); -} - bool cmPolicies::IsRemoved(cmPolicies::PolicyID id) { return idToStatus(id) == cmPolicies::NEW; diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index 0c0955a513..84617b6626 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -656,9 +656,6 @@ public: static std::string GetPolicyWarning(cmPolicies::PolicyID id); static std::string GetPolicyDeprecatedWarning(cmPolicies::PolicyID id); - //! return an error string for when a required policy is unspecified - static std::string GetRequiredPolicyError(cmPolicies::PolicyID id); - //! return an error string for when a required policy is unspecified static std::string GetRemovedPolicyError(cmPolicies::PolicyID id);