Browse Source

cmPolicies: use `cmStrCat` for string additions

Ben Boeckel 2 years ago
parent
commit
59eda7fa0a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/cmPolicies.cxx

+ 1 - 1
Source/cmPolicies.cxx

@@ -139,7 +139,7 @@ static void DiagnoseAncientPolicies(
 static bool GetPolicyDefault(cmMakefile* mf, std::string const& policy,
                              cmPolicies::PolicyStatus* defaultSetting)
 {
-  std::string defaultVar = "CMAKE_POLICY_DEFAULT_" + policy;
+  std::string defaultVar = cmStrCat("CMAKE_POLICY_DEFAULT_", policy);
   std::string const& defaultValue = mf->GetSafeDefinition(defaultVar);
   if (defaultValue == "NEW") {
     *defaultSetting = cmPolicies::NEW;