diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx index 00e8a9533d..46067d1dc6 100644 --- a/Source/cmAddCustomCommandCommand.cxx +++ b/Source/cmAddCustomCommandCommand.cxx @@ -14,7 +14,6 @@ #include "cmCustomCommand.h" #include "cmCustomCommandLines.h" #include "cmCustomCommandTypes.h" -#include "cmDiagnostics.h" #include "cmExecutionStatus.h" #include "cmGeneratorExpression.h" #include "cmGlobalGenerator.h" @@ -209,10 +208,7 @@ bool cmAddCustomCommandCommand(std::vector const& args, return false; } if (cmp0175 == cmPolicies::WARN) { - mf.IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(msg, '\n', - cmPolicies::GetPolicyWarning(cmPolicies::CMP0175))); + mf.IssuePolicyWarning(cmPolicies::CMP0175, msg); } } keywordExpectingValue = nullptr; @@ -382,10 +378,7 @@ bool cmAddCustomCommandCommand(std::vector const& args, return false; } if (cmp0175 == cmPolicies::WARN) { - mf.IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(msg, '\n', - cmPolicies::GetPolicyWarning(cmPolicies::CMP0175))); + mf.IssuePolicyWarning(cmPolicies::CMP0175, msg); } } comment_buffer = copy; @@ -466,10 +459,7 @@ bool cmAddCustomCommandCommand(std::vector const& args, return false; } if (cmp0175 == cmPolicies::WARN) { - mf.IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(msg, ".\n", - cmPolicies::GetPolicyWarning(cmPolicies::CMP0175))); + mf.IssuePolicyWarning(cmPolicies::CMP0175, cmStrCat(msg, '.')); } } mf.AppendCustomCommandToOutput(output[0], depends, implicit_depends, @@ -504,10 +494,7 @@ bool cmAddCustomCommandCommand(std::vector const& args, return false; } if (cmp0175 == cmPolicies::WARN) { - mf.IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(msg, '\n', - cmPolicies::GetPolicyWarning(cmPolicies::CMP0175))); + mf.IssuePolicyWarning(cmPolicies::CMP0175, msg); } } @@ -526,10 +513,7 @@ bool cmAddCustomCommandCommand(std::vector const& args, return false; } if (cmp0175 == cmPolicies::WARN) { - mf.IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(msg, ".\n", - cmPolicies::GetPolicyWarning(cmPolicies::CMP0175))); + mf.IssuePolicyWarning(cmPolicies::CMP0175, cmStrCat(msg, '.')); } } auto const prePostCount = keywordsSeen.count(keyPRE_BUILD) + @@ -553,10 +537,9 @@ bool cmAddCustomCommandCommand(std::vector const& args, case cmCustomCommandType::POST_BUILD: msg += "POST_BUILD"; } - mf.IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(msg, " to preserve backward compatibility.\n", - cmPolicies::GetPolicyWarning(cmPolicies::CMP0175))); + mf.IssuePolicyWarning( + cmPolicies::CMP0175, + cmStrCat(msg, " to preserve backward compatibility."_s)); } } mf.AddCustomCommandToTarget(target, cctype, std::move(cc)); @@ -577,10 +560,7 @@ bool cmAddCustomCommandCommand(std::vector const& args, return false; } if (cmp0175 == cmPolicies::WARN) { - mf.IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(msg, ".\n", - cmPolicies::GetPolicyWarning(cmPolicies::CMP0175))); + mf.IssuePolicyWarning(cmPolicies::CMP0175, cmStrCat(msg, '.')); } } cc->SetOutputs(output); diff --git a/Source/cmBinUtilsLinker.cxx b/Source/cmBinUtilsLinker.cxx index ef89eb895d..836c6ca858 100644 --- a/Source/cmBinUtilsLinker.cxx +++ b/Source/cmBinUtilsLinker.cxx @@ -6,7 +6,6 @@ #include #include "cmCMakePath.h" -#include "cmDiagnostics.h" #include "cmMakefile.h" #include "cmPolicies.h" #include "cmRuntimeDependencyArchive.h" @@ -34,14 +33,9 @@ void cmBinUtilsLinker::NormalizePath(std::string& path) const cmPolicies::PolicyStatus policy = this->Archive->GetMakefile()->GetPolicyStatus(cmPolicies::CMP0207); if (policy == cmPolicies::WARN) { - this->Archive->GetMakefile()->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0207), - "\n" - "Path\n \"", - path, - "\"\n" - "would be converted to\n \"", + this->Archive->GetMakefile()->IssuePolicyWarning( + cmPolicies::CMP0207, {}, + cmStrCat("Path\n \"", path, "\"\nwould be converted to\n \"", normalizedPath, "\"\n")); } else if (policy == cmPolicies::NEW) { path = std::move(normalizedPath); diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index 6478e6b823..26abfbdcf2 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -363,11 +363,10 @@ public: if (!makefile->GetCMakeInstance()->GetIsInTryCompile() && makefile->PolicyOptionalWarningEnabled( "CMAKE_POLICY_WARNING_CMP0156")) { - makefile->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0156), - "\nSince the policy is not set, legacy libraries " - "de-duplication strategy will be applied."), + makefile->IssuePolicyWarning( + cmPolicies::CMP0156, {}, + "Since the policy is not set, legacy libraries " + "de-duplication strategy will be applied."_s, target->GetBacktrace()); } CM_FALLTHROUGH; @@ -380,12 +379,10 @@ public: !makefile->GetCMakeInstance()->GetIsInTryCompile() && makefile->PolicyOptionalWarningEnabled( "CMAKE_POLICY_WARNING_CMP0179")) { - makefile->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0179), - "\nSince the policy is not set, static libraries " - "de-duplication will keep the last occurrence of the " - "static libraries."), + makefile->IssuePolicyWarning( + cmPolicies::CMP0179, {}, + "Since the policy is not set, static libraries de-duplication " + "will keep the last occurrence of the static libraries."_s, target->GetBacktrace()); } diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index b8a8909867..5b03b883ea 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -17,7 +17,6 @@ #include "cmsys/RegularExpression.hxx" #include "cmCMakePath.h" -#include "cmDiagnostics.h" #include "cmExpandedCommandArgument.h" #include "cmList.h" #include "cmMakefile.h" @@ -660,14 +659,11 @@ bool cmConditionEvaluator::HandleLevel2(cmArgumentList& newArgs, } else if (this->Policy139Status == cmPolicies::WARN) { - std::ostringstream e; - e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0139) - << "\n" - "PATH_EQUAL will be interpreted as an operator " - "when the policy is set to NEW. " - "Since the policy is not set the OLD behavior will be used."; - - this->Makefile.IssueDiagnostic(cmDiagnostics::CMD_POLICY, e.str()); + this->Makefile.IssuePolicyWarning( + cmPolicies::CMP0139, {}, + "PATH_EQUAL will be interpreted as an operator " + "when the policy is set to NEW. " + "Since the policy is not set the OLD behavior will be used."_s); } } } diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 2236205cbd..f662732028 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -750,15 +750,11 @@ cm::optional cmCoreTryCompile::TryCompileCode( case cmPolicies::WARN: if (this->Makefile->PolicyOptionalWarningEnabled( "CMAKE_POLICY_WARNING_CMP0066")) { - std::ostringstream w; - /* clang-format off */ - w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0066) << "\n" + this->Makefile->IssuePolicyWarning( + cmPolicies::CMP0066, {}, "For compatibility with older versions of CMake, try_compile " "is not honoring caller config-specific compiler flags " - "(e.g. CMAKE_C_FLAGS_DEBUG) in the test project." - ; - /* clang-format on */ - this->Makefile->IssueDiagnostic(cmDiagnostics::CMD_POLICY, w.str()); + "(e.g. CMAKE_C_FLAGS_DEBUG) in the test project."_s); } CM_FALLTHROUGH; case cmPolicies::OLD: @@ -1039,16 +1035,12 @@ cm::optional cmCoreTryCompile::TryCompileCode( if (!warnCMP0067Variables.empty()) { std::ostringstream w; - /* clang-format off */ - w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0067) << "\n" - "For compatibility with older versions of CMake, try_compile " - "is not honoring language standard variables in the test project:\n" - ; - /* clang-format on */ + w << "For compatibility with older versions of CMake, try_compile is " + "not honoring language standard variables in the test project:\n"_s; for (std::string const& vi : warnCMP0067Variables) { w << " " << vi << "\n"; } - this->Makefile->IssueDiagnostic(cmDiagnostics::CMD_POLICY, w.str()); + this->Makefile->IssuePolicyWarning(cmPolicies::CMP0067, {}, w.str()); } for (auto const& p : arguments.LangProps) { diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx index e727f75d91..dddfc6f104 100644 --- a/Source/cmExportCommand.cxx +++ b/Source/cmExportCommand.cxx @@ -199,11 +199,9 @@ static bool HandleTargetsMode(std::vector const& args, if (gg->GetExportedTargetsFile(fname)) { switch (mf.GetPolicyStatus(cmPolicies::CMP0103)) { case cmPolicies::WARN: - mf.IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0103), - "\n" - "export() command already specified for the file\n ", + mf.IssuePolicyWarning( + cmPolicies::CMP0103, {}, + cmStrCat("export() command already specified for the file\n ", arguments.Filename, "\nDid you miss 'APPEND' keyword?")); CM_FALLTHROUGH; case cmPolicies::OLD: @@ -286,9 +284,7 @@ static bool HandleExportMode(std::vector const& args, if (p == cmPolicies::WARN) { status.GetMakefile().IssueDiagnostic( cmDiagnostics::CMD_AUTHOR, cmStrCat("export "_s, status.GetError())); - status.GetMakefile().IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmPolicies::GetPolicyWarning(cmPolicies::CMP0208)); + status.GetMakefile().IssuePolicyWarning(cmPolicies::CMP0208); } } diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 96b36d0a20..d5b2422e00 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -416,12 +416,10 @@ bool HandleStringsCommand(std::vector const& args, case cmPolicies::WARN: if (status.GetMakefile().PolicyOptionalWarningEnabled( "CMAKE_POLICY_WARNING_CMP0159")) { - status.GetMakefile().IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0159), - "\n" - "For compatibility, CMake is leaving CMAKE_MATCH_ " - "unchanged.")); + status.GetMakefile().IssuePolicyWarning( + cmPolicies::CMP0159, {}, + "For compatibility, CMake is leaving CMAKE_MATCH_ " + "unchanged."_s); } CM_FALLTHROUGH; case cmPolicies::OLD: @@ -1376,17 +1374,14 @@ bool HandleRealPathCommand(std::vector const& args, if (warnAbout152) { computeNewPath(input, realPath); if (oldPolicyPath != realPath) { - status.GetMakefile().IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0152), - "\n" - "From input path:\n ", - input, "\nthe policy OLD behavior produces path:\n ", - oldPolicyPath, - "\nbut the policy NEW behavior produces path:\n ", - realPath, - "\nSince the policy is not set, CMake is using the OLD " - "behavior for compatibility.")); + status.GetMakefile().IssuePolicyWarning( + cmPolicies::CMP0152, {}, + cmStrCat( + "From input path:\n ", input, + "\nthe policy OLD behavior produces path:\n ", oldPolicyPath, + "\nbut the policy NEW behavior produces path:\n ", realPath, + "\nSince the policy is not set, CMake is using the OLD " + "behavior for compatibility.")); } } realPath = oldPolicyPath; @@ -3323,12 +3318,11 @@ bool HandleCreateLinkCommand(std::vector const& args, if (cmp0205 == cmPolicies::NEW) { needToTry = false; } else if (cmp0205 == cmPolicies::WARN && arguments.CopyOnError) { - status.GetMakefile().IssueDiagnostic( - cmDiagnostics::CMD_POLICY, + status.GetMakefile().IssuePolicyWarning( + cmPolicies::CMP0205, cmStrCat("Path\n ", fileName, "\nis a directory. Hard link creation is not supported " - "for directories.\n", - cmPolicies::GetPolicyWarning(cmPolicies::CMP0205))); + "for directories.")); } } @@ -3349,12 +3343,11 @@ bool HandleCreateLinkCommand(std::vector const& args, if (cmp0205 == cmPolicies::WARN && arguments.CopyOnError && sourceIsDirectory) { - status.GetMakefile().IssueDiagnostic( - cmDiagnostics::CMD_POLICY, + status.GetMakefile().IssuePolicyWarning( + cmPolicies::CMP0205, cmStrCat("Path\n ", fileName, "\nis a directory. It will be copied " - "recursively when CMP0205 is set to NEW.\n", - cmPolicies::GetPolicyWarning(cmPolicies::CMP0205))); + "recursively when CMP0205 is set to NEW.")); } // Check if copy-on-error is enabled in the arguments. diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 62811a532a..2f2c5c6662 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -1566,9 +1566,7 @@ bool cmFindPackageCommand::FindModule(bool& found) this->Makefile->GetPolicyStatus(it->second); switch (status) { case cmPolicies::WARN: { - this->Makefile->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(it->second), '\n')); + this->Makefile->IssuePolicyWarning(it->second); CM_FALLTHROUGH; } case cmPolicies::OLD: diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx index bc935611f1..64fc7d6bc3 100644 --- a/Source/cmFindProgramCommand.cxx +++ b/Source/cmFindProgramCommand.cxx @@ -6,8 +6,8 @@ #include #include +#include -#include "cmDiagnostics.h" #include "cmFindCommon.h" #include "cmMakefile.h" #include "cmPolicies.h" @@ -143,27 +143,17 @@ struct cmFindProgramHelper return isExeNew; } if (isExeNew) { - this->Makefile->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0109), - "\n" - "The file\n" - " ", - file, - "\n" - "is executable but not readable. " - "CMake is ignoring it for compatibility.")); + this->Makefile->IssuePolicyWarning( + cmPolicies::CMP0109, {}, + cmStrCat("The file\n "_s, file, + "\nis executable but not readable. " + "CMake is ignoring it for compatibility."_s)); } else { - this->Makefile->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0109), - "\n" - "The file\n" - " ", - file, - "\n" - "is readable but not executable. " - "CMake is using it for compatibility.")); + this->Makefile->IssuePolicyWarning( + cmPolicies::CMP0109, {}, + cmStrCat("The file\n "_s, file, + "\nis readable but not executable. " + "CMake is using it for compatibility."_s)); } return isExeOld; } diff --git a/Source/cmGeneratorExpressionEvaluationFile.cxx b/Source/cmGeneratorExpressionEvaluationFile.cxx index 57cc7663aa..733d986e98 100644 --- a/Source/cmGeneratorExpressionEvaluationFile.cxx +++ b/Source/cmGeneratorExpressionEvaluationFile.cxx @@ -6,9 +6,10 @@ #include #include +#include + #include "cmsys/FStream.hxx" -#include "cmDiagnostics.h" #include "cmGenExContext.h" #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" @@ -17,6 +18,7 @@ #include "cmMakefile.h" #include "cmMessageType.h" #include "cmSourceFile.h" +#include "cmStringAlgorithms.h" #include "cmSystemTools.h" cmGeneratorExpressionEvaluationFile::cmGeneratorExpressionEvaluationFile( @@ -231,29 +233,16 @@ std::string cmGeneratorExpressionEvaluationFile::FixRelativePath( { std::string resultPath; switch (this->PolicyStatusCMP0070) { - case cmPolicies::WARN: { - std::string arg; - switch (role) { - case PathForInput: - arg = "INPUT"; - break; - case PathForOutput: - arg = "OUTPUT"; - break; - } - std::ostringstream w; - /* clang-format off */ - w << - cmPolicies::GetPolicyWarning(cmPolicies::CMP0070) << "\n" - "file(GENERATE) given relative " << arg << " path:\n" - " " << relativePath << "\n" - "This is not defined behavior unless CMP0070 is set to NEW. " - "For compatibility with older versions of CMake, the previous " - "undefined behavior will be used." - ; - /* clang-format on */ - lg->IssueDiagnostic(cmDiagnostics::CMD_POLICY, w.str()); - } + case cmPolicies::WARN: + lg->IssuePolicyWarning( + cmPolicies::CMP0070, {}, + cmStrCat( + "file(GENERATE) given relative "_s, + (role == PathForInput ? "INPUT"_s : "OUTPUT"_s), " path:\n "_s, + relativePath, + "\nThis is not defined behavior unless CMP0070 is set to NEW. " + "For compatibility with older versions of CMake, the previous " + "undefined behavior will be used."_s)); CM_FALLTHROUGH; case cmPolicies::OLD: // OLD behavior is to use the relative path unchanged, diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 980fa1169e..f8eb2f0b77 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -29,7 +29,6 @@ #include "cmCMakePath.h" #include "cmCMakeString.hxx" #include "cmComputeLinkInformation.h" -#include "cmDiagnostics.h" #include "cmGenExContext.h" #include "cmGenExEvaluation.h" #include "cmGeneratorExpression.h" @@ -426,11 +425,11 @@ static const struct InListNode : public cmGeneratorExpressionNode case cmPolicies::OLD: values.assign(parameters[1]); if (check && values != checkValues) { - std::string const err = - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0085), - "\nSearch Item:\n \""_s, parameters.front(), - "\"\nList:\n \""_s, parameters[1], "\"\n"_s); - lg->IssueDiagnostic(cmDiagnostics::CMD_POLICY, err, eval->Backtrace); + lg->IssuePolicyWarning( + cmPolicies::CMP0085, {}, + cmStrCat("Search Item:\n \""_s, parameters.front(), + "\"\nList:\n \""_s, parameters[1], "\"\n"_s), + eval->Backtrace); return "0"; } if (values.empty()) { @@ -2894,14 +2893,13 @@ static const struct ConfigurationTestNode : public cmGeneratorExpressionNode case cmPolicies::WARN: if (lg->GetMakefile()->PolicyOptionalWarningEnabled( "CMAKE_POLICY_WARNING_CMP0199")) { - std::string const err = - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0199), - "\nEvaluation of $ for imported target \"", - eval->CurrentTarget->GetName(), "\", used by \"", + lg->IssuePolicyWarning( + cmPolicies::CMP0199, {}, + cmStrCat("Evaluation of $ for imported target \""_s, + eval->CurrentTarget->GetName(), "\", used by \""_s, eval->HeadTarget->GetName(), - "\", may match multiple configurations.\n"); - lg->IssueDiagnostic(cmDiagnostics::CMD_POLICY, err, - eval->Backtrace); + "\", may match multiple configurations."_s), + eval->Backtrace); } CM_FALLTHROUGH; case cmPolicies::OLD: @@ -4663,9 +4661,7 @@ static const struct TargetPolicyNode : public cmGeneratorExpressionNode cmLocalGenerator* lg = eval->HeadTarget->GetLocalGenerator(); switch (statusForTarget(eval->HeadTarget, policy)) { case cmPolicies::WARN: - lg->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmPolicies::GetPolicyWarning(policyForString(policy))); + lg->IssuePolicyWarning(policyForString(policy)); CM_FALLTHROUGH; case cmPolicies::OLD: return "0"; @@ -4749,11 +4745,11 @@ struct TargetFilesystemArtifactDependencyCMP0112 case cmPolicies::WARN: if (lg->GetMakefile()->PolicyOptionalWarningEnabled( "CMAKE_POLICY_WARNING_CMP0112")) { - std::string const err = - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0112), - "\nDependency being added to target:\n \"", - target->GetName(), "\"\n"); - lg->IssueDiagnostic(cmDiagnostics::CMD_POLICY, err, eval->Backtrace); + lg->IssuePolicyWarning( + cmPolicies::CMP0112, {}, + cmStrCat("Dependency being added to target:\n \""_s, + target->GetName(), "\"\n"_s), + eval->Backtrace); } CM_FALLTHROUGH; case cmPolicies::OLD: @@ -5442,13 +5438,10 @@ struct TargetOutputNameArtifactResultGetter if (target->GetPolicyStatusCMP0202() == cmPolicies::WARN && postfix != Postfix::Unspecified) { - lg->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0202), - "\n" - "\"POSTFIX\" option is recognized only when the policy is " - "set to NEW. Since the policy is not set, the OLD behavior " - "will be used."), + lg->IssuePolicyWarning( + cmPolicies::CMP0202, {}, + "\"POSTFIX\" option is recognized only when the policy is set to NEW." + " Since the policy is not set, the OLD behavior will be used."_s, eval->Backtrace); } diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index b86054fe77..a31c1b2595 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -26,7 +26,6 @@ #include "cmCryptoHash.h" #include "cmCxxModuleMetadata.h" #include "cmCxxModuleUsageEffects.h" -#include "cmDiagnostics.h" #include "cmExperimental.h" #include "cmFileSet.h" #include "cmFileSetMetadata.h" @@ -824,12 +823,12 @@ bool cmGeneratorTarget::IsIPOEnabled(std::string const& lang, bool const in_try_compile = this->LocalGenerator->GetCMakeInstance()->GetIsInTryCompile(); if (cmp0069 == cmPolicies::WARN && !in_try_compile) { - std::ostringstream w; - w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0069) << "\n"; - w << "INTERPROCEDURAL_OPTIMIZATION property will be ignored for target " - << "'" << this->GetName() << "'."; - this->Makefile->IssueDiagnostic(cmDiagnostics::CMD_POLICY, w.str(), - this->GetBacktrace()); + this->Makefile->IssuePolicyWarning( + cmPolicies::CMP0069, {}, + cmStrCat("INTERPROCEDURAL_OPTIMIZATION property " + "will be ignored for target '"_s, + this->GetName(), "'."_s), + this->GetBacktrace()); this->PolicyReportedCMP0069 = true; } @@ -2581,11 +2580,10 @@ void cmGeneratorTarget::AddCUDAArchitectureFlags(cmBuildStep compileOrLink, switch (this->GetPolicyStatusCMP0104()) { case cmPolicies::WARN: if (!this->LocalGenerator->GetCMakeInstance()->GetIsInTryCompile()) { - this->Makefile->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmPolicies::GetPolicyWarning(cmPolicies::CMP0104) + - "\nCUDA_ARCHITECTURES is empty for target \"" + this->GetName() + - "\"."); + this->Makefile->IssuePolicyWarning( + cmPolicies::CMP0104, {}, + cmStrCat("CUDA_ARCHITECTURES is empty for target \""_s, + this->GetName(), "\"."_s)); } CM_FALLTHROUGH; case cmPolicies::OLD: diff --git a/Source/cmGeneratorTarget_HeaderSetVerification.cxx b/Source/cmGeneratorTarget_HeaderSetVerification.cxx index a1a7b496c0..18ba58e1a6 100644 --- a/Source/cmGeneratorTarget_HeaderSetVerification.cxx +++ b/Source/cmGeneratorTarget_HeaderSetVerification.cxx @@ -17,8 +17,8 @@ #include #include #include +#include -#include "cmDiagnostics.h" #include "cmFileSetMetadata.h" #include "cmGenExContext.h" #include "cmGeneratedFileStream.h" @@ -103,15 +103,12 @@ bool cmGeneratorTarget::AddHeaderSetVerification() this->GetType() == cmStateEnums::EXECUTABLE && !this->GetPropertyAsBool("ENABLE_EXPORTS")) { if (cmp0209 == cmPolicies::WARN && !fileSets.empty()) { - this->Makefile->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0209), - "\n" - "Executable target \"", - this->GetName(), + this->Makefile->IssuePolicyWarning( + cmPolicies::CMP0209, {}, + cmStrCat("Executable target \""_s, this->GetName(), "\" has interface header file sets, but it does not " "enable exports. Those headers would be verified under " - "CMP0209 NEW behavior.\n")); + "CMP0209 NEW behavior.\n"_s)); } continue; } diff --git a/Source/cmGeneratorTarget_LinkDirectories.cxx b/Source/cmGeneratorTarget_LinkDirectories.cxx index 4b35b3dd6e..d2360d422d 100644 --- a/Source/cmGeneratorTarget_LinkDirectories.cxx +++ b/Source/cmGeneratorTarget_LinkDirectories.cxx @@ -12,7 +12,6 @@ #include -#include "cmDiagnostics.h" #include "cmEvaluatedTargetProperty.h" #include "cmGenExContext.h" #include "cmGeneratorExpressionDAGChecker.h" @@ -53,10 +52,9 @@ void processLinkDirectories(cmGeneratorTarget const* tgt, } switch (tgt->GetPolicyStatusCMP0081()) { case cmPolicies::WARN: - tgt->GetLocalGenerator()->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0081), - "\nFound relative path while evaluating" + tgt->GetLocalGenerator()->IssuePolicyWarning( + cmPolicies::CMP0081, {}, + cmStrCat("Found relative path while evaluating" " link directories of \"", tgt->GetName(), "\":\n \"", entryDirectory, "\"\n")); break; diff --git a/Source/cmGeneratorTarget_Sources.cxx b/Source/cmGeneratorTarget_Sources.cxx index 995947b1ba..6e6a7d59dc 100644 --- a/Source/cmGeneratorTarget_Sources.cxx +++ b/Source/cmGeneratorTarget_Sources.cxx @@ -23,7 +23,6 @@ #include "cmsys/RegularExpression.hxx" -#include "cmDiagnostics.h" #include "cmEvaluatedTargetProperty.h" #include "cmFileSetMetadata.h" #include "cmGenExContext.h" @@ -124,7 +123,7 @@ bool processSources(cmGeneratorTarget const* tgt, std::string const& config, std::string fullPath = sf->ResolveFullPath(&e, &w); cmLocalGenerator const* const lg = tgt->GetLocalGenerator(); if (!w.empty()) { - lg->IssueDiagnostic(cmDiagnostics::CMD_POLICY, w, entry.Backtrace); + lg->IssuePolicyWarning(cmPolicies::CMP0115, {}, w, entry.Backtrace); } if (fullPath.empty()) { if (!e.empty()) { @@ -179,10 +178,9 @@ bool processSources(cmGeneratorTarget const* tgt, std::string const& config, auto const* fileSet = *fileSets.begin(); switch (tgt->GetPolicyStatusCMP0211()) { case cmPolicies::WARN: - tgt->GetLocalGenerator()->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0211), - "\nIn target \"", tgt->GetName(), "\" the file\n ", + tgt->GetLocalGenerator()->IssuePolicyWarning( + cmPolicies::CMP0211, {}, + cmStrCat("In target \"", tgt->GetName(), "\" the file\n ", src, "\nalready belongs to file set \"", fileSet->GetName(), "\".")); CM_FALLTHROUGH; diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 07b34ddbdb..3e1ef85438 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1019,14 +1019,11 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility( case cmPolicies::WARN: if (!this->CMakeInstance->GetIsInTryCompile() && mf->PolicyOptionalWarningEnabled("CMAKE_POLICY_WARNING_CMP0089")) { - std::ostringstream w; - /* clang-format off */ - w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0089) << "\n" - "Converting " << lang << - R"( compiler id "XLClang" to "XL" for compatibility.)" - ; - /* clang-format on */ - mf->IssueDiagnostic(cmDiagnostics::CMD_POLICY, w.str()); + mf->IssuePolicyWarning( + cmPolicies::CMP0089, {}, + cmStrCat( + "Converting "_s, lang, + R"( compiler id "XLClang" to "XL" for compatibility.)"_s)); } CM_FALLTHROUGH; case cmPolicies::OLD: @@ -1044,14 +1041,10 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility( case cmPolicies::WARN: if (!this->CMakeInstance->GetIsInTryCompile() && mf->PolicyOptionalWarningEnabled("CMAKE_POLICY_WARNING_CMP0129")) { - std::ostringstream w; - /* clang-format off */ - w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0129) << "\n" - "Converting " << lang << - R"( compiler id "LCC" to "GNU" for compatibility.)" - ; - /* clang-format on */ - mf->IssueDiagnostic(cmDiagnostics::CMD_POLICY, w.str()); + mf->IssuePolicyWarning( + cmPolicies::CMP0129, {}, + cmStrCat("Converting "_s, lang, + R"( compiler id "LCC" to "GNU" for compatibility.)"_s)); } CM_FALLTHROUGH; case cmPolicies::OLD: @@ -3101,10 +3094,8 @@ void cmGlobalGenerator::ReserveGlobalTargetCodegen() switch (policyStatus) { case cmPolicies::WARN: - tgt->GetMakefile()->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0171), '\n', - "The target name \"codegen\" is reserved."), + tgt->GetMakefile()->IssuePolicyWarning( + cmPolicies::CMP0171, {}, "The target name \"codegen\" is reserved.", tgt->GetBacktrace()); break; case cmPolicies::OLD: diff --git a/Source/cmIncludeCommand.cxx b/Source/cmIncludeCommand.cxx index db5451fe33..bb2cffa394 100644 --- a/Source/cmIncludeCommand.cxx +++ b/Source/cmIncludeCommand.cxx @@ -106,10 +106,7 @@ bool cmIncludeCommand(std::vector const& args, status.GetMakefile().GetPolicyStatus(ModulePolicy->second); switch (PolicyStatus) { case cmPolicies::WARN: { - status.GetMakefile().IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(ModulePolicy->second), - '\n')); + status.GetMakefile().IssuePolicyWarning(ModulePolicy->second); CM_FALLTHROUGH; } case cmPolicies::OLD: diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 17d6e13922..20f9c05d78 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -1811,9 +1811,7 @@ bool HandleDirectoryMode(std::vector const& args, // generator expressions if (cmGeneratorExpression::Find(args[i]) == cm::string_view::npos && args[i] != cmCMakePath(args[i]).Normal().String()) { - status.GetMakefile().IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmPolicies::GetPolicyWarning(cmPolicies::CMP0177)); + status.GetMakefile().IssuePolicyWarning(cmPolicies::CMP0177); } CM_FALLTHROUGH; case cmPolicies::OLD: diff --git a/Source/cmInstallCommandArguments.cxx b/Source/cmInstallCommandArguments.cxx index 7ecb63155b..84815cec91 100644 --- a/Source/cmInstallCommandArguments.cxx +++ b/Source/cmInstallCommandArguments.cxx @@ -10,7 +10,6 @@ #include #include "cmCMakePath.h" -#include "cmDiagnostics.h" #include "cmGeneratorExpression.h" #include "cmMakefile.h" #include "cmPolicies.h" @@ -48,9 +47,7 @@ cmInstallCommandArguments::cmInstallCommandArguments( // generator expressions if (cmGeneratorExpression::Find(arg) == cm::string_view::npos && arg != cmCMakePath(arg).Normal().String()) { - makefile.IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmPolicies::GetPolicyWarning(cmPolicies::CMP0177)); + makefile.IssuePolicyWarning(cmPolicies::CMP0177); } return ArgumentParser::Continue::No; }; diff --git a/Source/cmInstallScriptGenerator.cxx b/Source/cmInstallScriptGenerator.cxx index d77b5a57d2..685fbdb590 100644 --- a/Source/cmInstallScriptGenerator.cxx +++ b/Source/cmInstallScriptGenerator.cxx @@ -7,7 +7,6 @@ #include #include "cmDiagnosticContext.h" -#include "cmDiagnostics.h" #include "cmGeneratorExpression.h" #include "cmLocalGenerator.h" #include "cmPolicies.h" @@ -37,9 +36,7 @@ bool cmInstallScriptGenerator::Compute(cmLocalGenerator* lg) if (this->ActionsPerConfig) { switch (this->LocalGenerator->GetPolicyStatus(cmPolicies::CMP0087)) { case cmPolicies::WARN: - this->LocalGenerator->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmPolicies::GetPolicyWarning(cmPolicies::CMP0087)); + this->LocalGenerator->IssuePolicyWarning(cmPolicies::CMP0087); CM_FALLTHROUGH; case cmPolicies::OLD: break; diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index 921a900509..21d4f67300 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -16,7 +16,6 @@ #include #include -#include "cmDiagnostics.h" #include "cmExecutionStatus.h" #include "cmList.h" #include "cmMakefile.h" @@ -36,10 +35,9 @@ bool GetIndexArg(std::string const& arg, int* idx, cmMakefile& mf) case cmPolicies::WARN: { // Default is to warn and use old behavior OLD behavior is to allow // compatibility, so issue a warning and use the previous behavior. - std::string warn = - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0121), - " Invalid list index \"", arg, "\"."); - mf.IssueDiagnostic(cmDiagnostics::CMD_POLICY, warn); + mf.IssuePolicyWarning( + cmPolicies::CMP0121, {}, + cmStrCat("Invalid list index \""_s, arg, "\"."_s)); CM_FALLTHROUGH; } case cmPolicies::OLD: diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index c4a09e0add..c49293ae85 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -255,6 +255,14 @@ void cmLocalGenerator::IssueDiagnostic( this->GetMakefile()->IssueDiagnostic(category, text, context); } +void cmLocalGenerator::IssuePolicyWarning(cmPolicies::PolicyID policy, + cm::string_view preface, + cm::string_view postface, + cmListFileBacktrace const& bt) const +{ + this->GetMakefile()->IssuePolicyWarning(policy, preface, postface, bt); +} + void cmLocalGenerator::ComputeObjectMaxPath() { // Choose a maximum object file name length. @@ -719,9 +727,7 @@ void cmLocalGenerator::GenerateInstallRules() if (haveInstallAfterSubdirectory && this->Makefile->PolicyOptionalWarningEnabled( "CMAKE_POLICY_WARNING_CMP0082")) { - std::ostringstream e; - e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0082) << "\n"; - this->IssueDiagnostic(cmDiagnostics::CMD_POLICY, e.str()); + this->IssuePolicyWarning(cmPolicies::CMP0082); } CM_FALLTHROUGH; case cmPolicies::OLD: { @@ -2633,13 +2639,10 @@ void cmLocalGenerator::AppendFlags(std::string& flags, if (!this->Makefile->GetCMakeInstance()->GetIsInTryCompile() && this->Makefile->PolicyOptionalWarningEnabled( "CMAKE_POLICY_WARNING_CMP0181")) { - this->Makefile->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0181), - "\nSince the policy is not set, the contents of variable '", - name, - "' will " - "be used as is."), + this->Makefile->IssuePolicyWarning( + cmPolicies::CMP0181, {}, + cmStrCat("Since the policy is not set, the contents of variable '"_s, + name, "' will be used as is."_s), target->GetBacktrace()); } CM_FALLTHROUGH; @@ -3435,12 +3438,12 @@ void cmLocalGenerator::AddPerLanguageLinkFlags(std::string& flags, this->Makefile->GetSafeDefinition( cmStrCat("CMAKE_EXECUTABLE_CREATE_", lang, "_FLAGS")) && this->GlobalGenerator->ShouldWarnCMP0210(lang)) { - this->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0210), "\n", - "For compatibility with older versions of CMake, ", - "CMAKE_", lang, "_LINK_FLAGS will be ignored for all ", - "non-EXECUTABLE targets which use these flags.")); + this->IssuePolicyWarning( + cmPolicies::CMP0210, {}, + cmStrCat("For compatibility with older versions of CMake, CMAKE_"_s, + lang, + "_LINK_FLAGS will be ignored for all non-EXECUTABLE " + "targets which use these flags."_s)); } CM_FALLTHROUGH; case cmPolicies::OLD: diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 7a0227e712..b8574a8775 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -15,6 +15,7 @@ #include #include +#include #include "cmCustomCommandTypes.h" #include "cmDiagnosticContext.h" @@ -592,6 +593,16 @@ public: } void IssueDiagnostic(cmDiagnosticCategory category, std::string const& text, cmDiagnosticContext const& context) const; + void IssuePolicyWarning(cmPolicies::PolicyID policy, cm::string_view preface, + cm::string_view postface, + cmListFileBacktrace const& bt) const; + void IssuePolicyWarning(cmPolicies::PolicyID policy, + cm::string_view preface = {}, + cm::string_view postface = {}) const + { + this->IssuePolicyWarning(policy, preface, postface, + this->DirectoryBacktrace); + } void CreateEvaluationFileOutputs(); void CreateEvaluationFileOutputs(std::string const& config); diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 5062a0c9a6..d660a6df6b 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -240,6 +240,23 @@ void cmMakefile::IssueDiagnostic(cmDiagnosticCategory category, this->GetStateSnapshot(), context); } +void cmMakefile::IssuePolicyWarning(cmPolicies::PolicyID policy, + cm::string_view preface, + cm::string_view postface, + cmListFileBacktrace const& bt) const +{ + std::string msg = cmPolicies::GetPolicyWarning(policy); + if (!preface.empty() && !postface.empty()) { + msg = cmStrCat(preface, '\n', msg, '\n', postface); + } else if (!preface.empty()) { + msg = cmStrCat(preface, '\n', msg); + } else if (!postface.empty()) { + msg = cmStrCat(msg, '\n', postface); + } + this->IssueDiagnostic(cmDiagnostics::CMD_POLICY, msg, + cmDiagnosticContext{ bt }); +} + Message::LogLevel cmMakefile::GetCurrentLogLevel() const { cmake const* cmakeInstance = this->GetCMakeInstance(); @@ -279,7 +296,7 @@ void cmMakefile::MaybeWarnCMP0074(std::string const& rootVar, cmValue rootDef, { // Warn if a _ROOT variable we may use is set. if ((rootDef || rootEnv) && this->WarnedCMP0074.insert(rootVar).second) { - auto e = cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0074), '\n'); + std::string e; if (rootDef) { e += cmStrCat("CMake variable ", rootVar, " is set to:\n ", *rootDef, '\n'); @@ -289,7 +306,7 @@ void cmMakefile::MaybeWarnCMP0074(std::string const& rootVar, cmValue rootDef, *rootEnv, '\n'); } e += "For compatibility, CMake is ignoring the variable."; - this->IssueDiagnostic(cmDiagnostics::CMD_POLICY, e); + this->IssuePolicyWarning(cmPolicies::CMP0074, {}, e); } } @@ -298,7 +315,7 @@ void cmMakefile::MaybeWarnCMP0144(std::string const& rootVar, cmValue rootDef, { // Warn if a _ROOT variable we may use is set. if ((rootDef || rootEnv) && this->WarnedCMP0144.insert(rootVar).second) { - auto e = cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0144), '\n'); + std::string e; if (rootDef) { e += cmStrCat("CMake variable ", rootVar, " is set to:\n ", *rootDef, '\n'); @@ -309,7 +326,7 @@ void cmMakefile::MaybeWarnCMP0144(std::string const& rootVar, cmValue rootDef, } e += "For compatibility, find_package is ignoring the variable, but " "code in a .cmake module might still use it."; - this->IssueDiagnostic(cmDiagnostics::CMD_POLICY, e); + this->IssuePolicyWarning(cmPolicies::CMP0144, {}, e); } } @@ -1932,12 +1949,11 @@ void cmMakefile::AddCacheDefinition(std::string const& name, cmValue value, case cmPolicies::WARN: if (this->PolicyOptionalWarningEnabled("CMAKE_POLICY_WARNING_CMP0126") && this->IsNormalDefinitionSet(name)) { - this->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0126), - "\nFor compatibility with older versions of CMake, normal " - "variable \"", - name, "\" will be removed from the current scope.")); + this->IssuePolicyWarning( + cmPolicies::CMP0126, {}, + cmStrCat("For compatibility with older versions of CMake, " + "normal variable \""_s, + name, "\" will be removed from the current scope."_s)); } CM_FALLTHROUGH; case cmPolicies::OLD: diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index c8e062ad2d..955aa428b2 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -1059,6 +1059,15 @@ public: } void IssueDiagnostic(cmDiagnosticCategory category, std::string const& text, cmDiagnosticContext const& context) const; + void IssuePolicyWarning(cmPolicies::PolicyID policy, cm::string_view preface, + cm::string_view postface, + cmListFileBacktrace const& bt) const; + void IssuePolicyWarning(cmPolicies::PolicyID policy, + cm::string_view preface = {}, + cm::string_view postface = {}) const + { + this->IssuePolicyWarning(policy, preface, postface, this->Backtrace); + } Message::LogLevel GetCurrentLogLevel() const; /** Set whether or not to report a CMP0000 violation. */ diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx index 23e6a5117c..2f5de9a0fc 100644 --- a/Source/cmOptionCommand.cxx +++ b/Source/cmOptionCommand.cxx @@ -2,7 +2,8 @@ file LICENSE.rst or https://cmake.org/licensing for details. */ #include "cmOptionCommand.h" -#include "cmDiagnostics.h" +#include + #include "cmExecutionStatus.h" #include "cmMakefile.h" #include "cmPolicies.h" @@ -78,13 +79,11 @@ bool cmOptionCommand(std::vector const& args, auto const& existsAfterSet = status.GetMakefile().GetStateSnapshot().GetDefinition(args[0]); if (!existsAfterSet) { - status.GetMakefile().IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0077), - "\n" - "For compatibility with older versions of CMake, option " - "is clearing the normal variable '", - args[0], "'.")); + status.GetMakefile().IssuePolicyWarning( + cmPolicies::CMP0077, {}, + cmStrCat("For compatibility with older versions of CMake, " + "option is clearing the normal variable '"_s, + args[0], "'."_s)); } } return true; diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx index fd1f775386..19030f18f8 100644 --- a/Source/cmQtAutoGenInitializer.cxx +++ b/Source/cmQtAutoGenInitializer.cxx @@ -1221,20 +1221,18 @@ bool cmQtAutoGenInitializer::InitScanFiles() for (MUFile const* muf : this->AutogenTarget.FilesGenerated) { files += cmStrCat(" ", Quoted(muf->FullPath), '\n'); } - this->Makefile->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, + this->Makefile->IssuePolicyWarning( + cmPolicies::CMP0071, {}, cmStrCat( - cmPolicies::GetPolicyWarning(cmPolicies::CMP0071), - "\n" "For compatibility, CMake is excluding the GENERATED source " - "file(s):\n", - files, "from processing by ", + "file(s):\n"_s, + files, "from processing by "_s, cmQtAutoGen::Tools(this->Moc.Enabled, this->Uic.Enabled, false), ". If any of the files should be processed, set CMP0071 to NEW. " "If any of the files should not be processed, " - "explicitly exclude them by setting the source file property ", - property, ":\n set_property(SOURCE file.h PROPERTY ", property, - " ON)\n")); + "explicitly exclude them by setting the source file property "_s, + property, ":\n set_property(SOURCE file.h PROPERTY "_s, property, + " ON)"_s)); } } @@ -1253,19 +1251,17 @@ bool cmQtAutoGenInitializer::InitScanFiles() for (cmSourceFile const* sf : this->AutogenTarget.CMP0100HeadersWarn) { files += cmStrCat(" ", Quoted(sf->GetFullPath()), '\n'); } - this->Makefile->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, + this->Makefile->IssuePolicyWarning( + cmPolicies::CMP0100, {}, cmStrCat( - cmPolicies::GetPolicyWarning(cmPolicies::CMP0100), - "\n" - "For compatibility, CMake is excluding the header file(s):\n", - files, "from processing by ", + "For compatibility, CMake is excluding the header file(s):\n"_s, files, + "from processing by "_s, cmQtAutoGen::Tools(this->Moc.Enabled, this->Uic.Enabled, false), ". If any of the files should be processed, set CMP0100 to NEW. " "If any of the files should not be processed, " - "explicitly exclude them by setting the source file property ", - property, ":\n set_property(SOURCE file.hh PROPERTY ", property, - " ON)\n")); + "explicitly exclude them by setting the source file property "_s, + property, ":\n set_property(SOURCE file.hh PROPERTY "_s, property, + " ON)"_s)); } // Process qrc files diff --git a/Source/cmReturnCommand.cxx b/Source/cmReturnCommand.cxx index 80f28dacf3..265bc0c308 100644 --- a/Source/cmReturnCommand.cxx +++ b/Source/cmReturnCommand.cxx @@ -5,7 +5,6 @@ #include #include -#include "cmDiagnostics.h" #include "cmExecutionStatus.h" #include "cmMakefile.h" #include "cmPolicies.h" @@ -19,14 +18,11 @@ bool cmReturnCommand(std::vector const& args, if (!args.empty()) { switch (status.GetMakefile().GetPolicyStatus(cmPolicies::CMP0140)) { case cmPolicies::WARN: - status.GetMakefile().IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat( - cmPolicies::GetPolicyWarning(cmPolicies::CMP0140), - "\n" - "return() checks its arguments when the policy is set to NEW. " - "Since the policy is not set the OLD behavior will be used so " - "the arguments will be ignored.")); + status.GetMakefile().IssuePolicyWarning( + cmPolicies::CMP0140, {}, + "return() checks its arguments when the policy is set to NEW. " + "Since the policy is not set the OLD behavior will be used so " + "the arguments will be ignored."_s); CM_FALLTHROUGH; case cmPolicies::OLD: return true; diff --git a/Source/cmSetPropertyCommand.cxx b/Source/cmSetPropertyCommand.cxx index 0b8d9a883c..292a308b27 100644 --- a/Source/cmSetPropertyCommand.cxx +++ b/Source/cmSetPropertyCommand.cxx @@ -8,6 +8,7 @@ #include #include +#include #include "cmDiagnostics.h" #include "cmExecutionStatus.h" @@ -396,29 +397,24 @@ bool HandleAndValidateSourceFilePropertyGENERATED( if (cmp0118PolicyWARN) { if (!cmIsOn(propertyValue) && !cmIsOff(propertyValue)) { - mf.IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0118), - "\nAttempt to set property 'GENERATED' with the following " - "non-boolean value (which will be interpreted as \"0\"):\n", + mf.IssuePolicyWarning( + cmPolicies::CMP0118, {}, + cmStrCat("Attempt to set property 'GENERATED' with the following " + "non-boolean value (which will be interpreted as \"0\"):\n"_s, propertyValue, "\nThat exact value will not be retrievable. A value of " "\"0\" will be returned instead.\n" - "This will be an error under policy CMP0118.\n")); + "This will be an error under policy CMP0118."_s)); } if (cmIsOff(propertyValue)) { - mf.IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0118), - "\nUnsetting property 'GENERATED' will not be allowed under " - "policy CMP0118!\n")); + mf.IssuePolicyWarning(cmPolicies::CMP0118, {}, + "Unsetting property 'GENERATED' " + "will not be allowed under policy CMP0118!"_s); } if (op == PropertyOp::Append || op == PropertyOp::AppendAsString) { - mf.IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0118), - "\nAppending to property 'GENERATED' will not be allowed " - "under policy CMP0118!\n")); + mf.IssuePolicyWarning(cmPolicies::CMP0118, {}, + "Appending to property 'GENERATED' " + "will not be allowed under policy CMP0118!"_s); } } diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index 7e6de5b357..6ee095af83 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -7,7 +7,6 @@ #include #include -#include "cmDiagnostics.h" #include "cmGlobalGenerator.h" #include "cmList.h" #include "cmListFileCache.h" @@ -201,14 +200,12 @@ bool cmSourceFile::FindFullPath(std::string* error, if (this->IsGenerated || cmSystemTools::FileExists(extPath)) { this->FullPath = extPath; if (cmp0115 == cmPolicies::WARN) { - std::string warning = - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0115), - "\nFile:\n ", extPath); + std::string warning = cmStrCat("File:\n "_s, extPath); if (cmp0115Warning) { *cmp0115Warning = std::move(warning); } else { - makefile->IssueDiagnostic(cmDiagnostics::CMD_POLICY, warning, - cmListFileBacktrace{}); + makefile->IssuePolicyWarning(cmPolicies::CMP0115, {}, warning, + cmListFileBacktrace{}); } } return true; diff --git a/Source/cmStandardLevelResolver.cxx b/Source/cmStandardLevelResolver.cxx index 230d57d78a..d4b1b3de9e 100644 --- a/Source/cmStandardLevelResolver.cxx +++ b/Source/cmStandardLevelResolver.cxx @@ -18,7 +18,6 @@ #include #include -#include "cmDiagnostics.h" #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" @@ -128,11 +127,10 @@ struct StandardLevelComputer state = "disabled"; } if (state) { - makefile->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0128), - "\nFor compatibility with older versions of CMake, " - "compiler extensions won't be ", + makefile->IssuePolicyWarning( + cmPolicies::CMP0128, {}, + cmStrCat("For compatibility with older versions of CMake, " + "compiler extensions won't be "_s, state, '.')); } } @@ -178,12 +176,10 @@ struct StandardLevelComputer if (cmp0128 == cmPolicies::WARN && makefile->PolicyOptionalWarningEnabled( "CMAKE_POLICY_WARNING_CMP0128")) { - makefile->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0128), - "\nFor compatibility with older versions of CMake, " - "unnecessary flags for language standard or compiler " - "extensions may be added.")); + makefile->IssuePolicyWarning( + cmPolicies::CMP0128, {}, + "For compatibility with older versions of CMake, unnecessary flags " + "for language standard or compiler extensions may be added."_s); } } diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 66431b2aa0..7e86f08a1f 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -471,13 +471,8 @@ void cmState::AddDisallowedCommand(std::string const& name, cmExecutionStatus& status) -> bool { cmMakefile& mf = status.GetMakefile(); switch (mf.GetPolicyStatus(policy)) { - case cmPolicies::WARN: { - std::string warning = cmPolicies::GetPolicyWarning(policy); - if (additionalWarning) { - warning = cmStrCat(warning, '\n', additionalWarning); - } - mf.IssueDiagnostic(cmDiagnostics::CMD_POLICY, warning); - } + case cmPolicies::WARN: + mf.IssuePolicyWarning(policy, {}, additionalWarning); CM_FALLTHROUGH; case cmPolicies::OLD: break; diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 366a77f2f8..6221d0f254 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -21,7 +21,6 @@ #include "cmAlgorithms.h" #include "cmCustomCommand.h" -#include "cmDiagnostics.h" #include "cmFileSet.h" #include "cmFileSetMetadata.h" #include "cmFindPackageStack.h" @@ -2061,10 +2060,8 @@ struct ReadOnlyProperty } else { switch (target->GetPolicyStatus(*this->Policy)) { case cmPolicies::WARN: - context->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmPolicies::GetPolicyWarning(cmPolicies::CMP0160) + "\n" + - this->message(prop, target)); + context->IssuePolicyWarning(cmPolicies::CMP0160, {}, + this->message(prop, target)); CM_FALLTHROUGH; case cmPolicies::OLD: readOnly = false; @@ -3137,10 +3134,8 @@ std::string cmTarget::ImportedGetFullPath( switch (this->GetPolicyStatus(cmPolicies::CMP0111)) { case cmPolicies::WARN: - this->impl->Makefile->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmPolicies::GetPolicyWarning(cmPolicies::CMP0111) + "\n" + - message()); + this->impl->Makefile->IssuePolicyWarning(cmPolicies::CMP0111, {}, + message()); CM_FALLTHROUGH; case cmPolicies::OLD: break; @@ -3323,12 +3318,12 @@ bool cmTarget::GetMappedConfig(std::string const& desiredConfig, cmValue& loc, if (newResult) { // NEW policy found a configuration, OLD did not. cm::string_view newConfig = configFromSuffix(newSuffix); - std::string const err = cmStrCat( - cmPolicies::GetPolicyWarning(cmPolicies::CMP0200), - "\nConfiguration selection for imported target \"", this->GetName(), - "\" failed, but would select configuration \"", newConfig, - "\" under the NEW policy.\n"); - this->GetMakefile()->IssueDiagnostic(cmDiagnostics::CMD_POLICY, err); + this->GetMakefile()->IssuePolicyWarning( + cmPolicies::CMP0200, {}, + cmStrCat("Configuration selection for imported target \""_s, + this->GetName(), + "\" failed, but would select configuration \""_s, newConfig, + "\" under the NEW policy."_s)); } return false; @@ -3337,22 +3332,20 @@ bool cmTarget::GetMappedConfig(std::string const& desiredConfig, cmValue& loc, cm::string_view oldConfig = configFromSuffix(suffix); if (!newResult) { // NEW policy did not find a configuration, OLD did. - std::string const err = - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0200), - "\nConfiguration selection for imported target \"", - this->GetName(), "\" selected configuration \"", oldConfig, - "\", but would fail under the NEW policy.\n"); - this->GetMakefile()->IssueDiagnostic(cmDiagnostics::CMD_POLICY, err); + this->GetMakefile()->IssuePolicyWarning( + cmPolicies::CMP0200, {}, + cmStrCat("Configuration selection for imported target \""_s, + this->GetName(), "\" selected configuration \""_s, oldConfig, + "\", but would fail under the NEW policy."_s)); } else if (suffix != newSuffix) { // OLD and NEW policies found different configurations. cm::string_view newConfig = configFromSuffix(newSuffix); - std::string const err = - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0200), - "\nConfiguration selection for imported target \"", - this->GetName(), "\" selected configuration \"", oldConfig, - "\", but would select configuration \"", newConfig, - "\" under the NEW policy.\n"); - this->GetMakefile()->IssueDiagnostic(cmDiagnostics::CMD_POLICY, err); + this->GetMakefile()->IssuePolicyWarning( + cmPolicies::CMP0200, {}, + cmStrCat("Configuration selection for imported target \""_s, + this->GetName(), "\" selected configuration \""_s, oldConfig, + "\", but would select configuration \""_s, newConfig, + "\" under the NEW policy."_s)); } return true; diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index 14f698e037..f6cc7bd481 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -11,6 +11,7 @@ #include #include +#include #include "cmDiagnostics.h" #include "cmExecutionStatus.h" @@ -444,17 +445,14 @@ bool TLL::HandleLibrary(ProcessingState currentProcessingState, } if (this->WarnRemoteInterface) { - this->Makefile.IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat( - cmPolicies::GetPolicyWarning(cmPolicies::CMP0079), "\nTarget\n ", - this->Target->GetName(), - "\nis not created in this " - "directory. For compatibility with older versions of CMake, link " - "library\n ", - lib, - "\nwill be looked up in the directory in which " - "the target was created rather than in this calling directory.")); + this->Makefile.IssuePolicyWarning( + cmPolicies::CMP0079, {}, + cmStrCat("Target\n "_s, this->Target->GetName(), + "\nis not created in this directory. For compatibility " + "with older versions of CMake, link library\n "_s, + lib, + "\nwill be looked up in the directory in which the target " + "was created rather than in this calling directory."_s)); } // Handle (additional) case where the command was called with PRIVATE / diff --git a/Source/cmTargetSourcesCommand.cxx b/Source/cmTargetSourcesCommand.cxx index fa115cd39f..042170f58b 100644 --- a/Source/cmTargetSourcesCommand.cxx +++ b/Source/cmTargetSourcesCommand.cxx @@ -2,7 +2,6 @@ file LICENSE.rst or https://cmake.org/licensing for details. */ #include "cmTargetSourcesCommand.h" -#include #include #include @@ -11,7 +10,6 @@ #include "cmArgumentParser.h" #include "cmArgumentParserTypes.h" -#include "cmDiagnostics.h" #include "cmFileSet.h" #include "cmFileSetMetadata.h" #include "cmGeneratorExpression.h" @@ -157,40 +155,30 @@ std::vector TargetSourcesImpl::ConvertToAbsoluteContent( return content; } - bool issueMessage = true; - bool useAbsoluteContent = false; - std::ostringstream e; if (checkCmp0076 == CheckCMP0076::Yes) { switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0076)) { case cmPolicies::WARN: - e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0076) << "\n"; - break; + if (isInterfaceContent == IsInterface::Yes) { + this->Makefile->IssuePolicyWarning( + cmPolicies::CMP0076, {}, + cmStrCat("An interface source of target \""_s, tgt->GetName(), + "\" has a relative path."_s)); + } else { + this->Makefile->IssuePolicyWarning( + cmPolicies::CMP0076, {}, + cmStrCat("A private source from a directory " + "other than that of target \""_s, + tgt->GetName(), "\" has a relative path."_s)); + } + CM_FALLTHROUGH; case cmPolicies::OLD: - issueMessage = false; + return content; + case cmPolicies::NEW: break; - case cmPolicies::NEW: { - issueMessage = false; - useAbsoluteContent = true; - break; - } } - } else { - issueMessage = false; - useAbsoluteContent = true; } - if (issueMessage) { - if (isInterfaceContent == IsInterface::Yes) { - e << "An interface source of target \"" << tgt->GetName() - << "\" has a relative path."; - } else { - e << "A private source from a directory other than that of target \"" - << tgt->GetName() << "\" has a relative path."; - } - this->Makefile->IssueDiagnostic(cmDiagnostics::CMD_POLICY, e.str()); - } - - return useAbsoluteContent ? absoluteContent : content; + return absoluteContent; } bool TargetSourcesImpl::HandleFileSetMode( diff --git a/Source/cmTestGenerator.cxx b/Source/cmTestGenerator.cxx index 37cf4c9a0a..f4fcfbb14c 100644 --- a/Source/cmTestGenerator.cxx +++ b/Source/cmTestGenerator.cxx @@ -9,7 +9,6 @@ #include #include -#include "cmDiagnostics.h" #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" #include "cmList.h" @@ -36,10 +35,9 @@ bool needToQuoteTestName(cmMakefile const& mf, std::string const& name) case cmPolicies::WARN: // Only warn if a forbidden character is used in the name. if (name.find_first_of("$[] #;\t\n\"\\") != std::string::npos) { - mf.IssueDiagnostic( - cmDiagnostics::CMD_POLICY, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0110), - "\nThe following name given to add_test() is invalid if " + mf.IssuePolicyWarning( + cmPolicies::CMP0110, {}, + cmStrCat("The following name given to add_test() is invalid if " "CMP0110 is not set or set to OLD:\n `", name, "ยด\n")); } @@ -148,14 +146,13 @@ void cmTestGenerator::GenerateCommand(std::ostream& os, cmList argsWithEmptyValuesPreserved( propVal, cmList::ExpandElements::Yes, cmList::EmptyElements::Yes); if (launcherWithArgs != argsWithEmptyValuesPreserved) { - this->LG->GetMakefile()->IssueDiagnostic( - cmDiagnostics::CMD_POLICY, + this->LG->GetMakefile()->IssuePolicyWarning( + cmPolicies::CMP0178, cmStrCat("The ", propertyName, " property of target '", target->GetName(), "' contains empty list items. Those empty items are " "being silently discarded to preserve backward " - "compatibility.\n", - cmPolicies::GetPolicyWarning(cmPolicies::CMP0178))); + "compatibility.")); } } std::string launcherExe(launcherWithArgs[0]); diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx index 63200f11bf..8a3e59a153 100644 --- a/Source/cmWhileCommand.cxx +++ b/Source/cmWhileCommand.cxx @@ -10,7 +10,6 @@ #include #include "cmConditionEvaluator.h" -#include "cmDiagnostics.h" #include "cmExecutionStatus.h" #include "cmExpandedCommandArgument.h" #include "cmFunctionBlocker.h" @@ -19,7 +18,6 @@ #include "cmMessageType.h" #include "cmOutputConverter.h" #include "cmPolicies.h" -#include "cmStringAlgorithms.h" #include "cmSystemTools.h" class cmWhileFunctionBlocker : public cmFunctionBlocker @@ -131,9 +129,7 @@ bool cmWhileFunctionBlocker::Replay(std::vector functions, err += "\n"; err += errorString; if (mf.GetPolicyStatus(cmPolicies::CMP0130) == cmPolicies::WARN) { - err = - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0130), '\n', err); - mf.IssueDiagnostic(cmDiagnostics::CMD_POLICY, err, whileBT); + mf.IssuePolicyWarning(cmPolicies::CMP0130, {}, err, whileBT); } else { mf.IssueMessage(messageType, err, whileBT); if (messageType == MessageType::FATAL_ERROR) { diff --git a/Source/cmake.cxx b/Source/cmake.cxx index bcd0d755b3..9178a89815 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -182,8 +182,7 @@ void cmDeprecatedWatch(std::string const& /*unused*/, cmMakefile const* mf) { if (mf->GetPolicyStatus(cmPolicies::CMP0218) == cmPolicies::WARN) { - mf->IssueDiagnostic(cmDiagnostics::CMD_POLICY, - cmPolicies::GetPolicyWarning(cmPolicies::CMP0218)); + mf->IssuePolicyWarning(cmPolicies::CMP0218); } } #endif diff --git a/Tests/RunCMake/CMP0106/CMP0106-WARN-ParaView-stderr.txt b/Tests/RunCMake/CMP0106/CMP0106-WARN-ParaView-stderr.txt index 317cb093eb..b2a19cc6df 100644 --- a/Tests/RunCMake/CMP0106/CMP0106-WARN-ParaView-stderr.txt +++ b/Tests/RunCMake/CMP0106/CMP0106-WARN-ParaView-stderr.txt @@ -2,7 +2,6 @@ CMake Warning \(policy\) at CMP0106-Common\.cmake:1 \(include\): Policy CMP0106 is not set: The Documentation module is removed\. Run "cmake --help-policy CMP0106" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - Call Stack \(most recent call first\): subdir/CMakeLists\.txt:2 \(include\) This warning is for project developers\. Use -Wno-author or -Wno-policy to diff --git a/Tests/RunCMake/CMP0106/CMP0106-WARN-VTK-stderr.txt b/Tests/RunCMake/CMP0106/CMP0106-WARN-VTK-stderr.txt index 3b9d4f05fc..c153071837 100644 --- a/Tests/RunCMake/CMP0106/CMP0106-WARN-VTK-stderr.txt +++ b/Tests/RunCMake/CMP0106/CMP0106-WARN-VTK-stderr.txt @@ -2,7 +2,6 @@ CMake Warning \(policy\) at CMP0106-Common\.cmake:1 \(include\): Policy CMP0106 is not set: The Documentation module is removed\. Run "cmake --help-policy CMP0106" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - Call Stack \(most recent call first\): CMP0106-WARN-VTK\.cmake:2 \(include\) CMakeLists\.txt:7 \(include\) diff --git a/Tests/RunCMake/CMP0106/CMP0106-WARN-stderr.txt b/Tests/RunCMake/CMP0106/CMP0106-WARN-stderr.txt index db83787b52..497fa58a82 100644 --- a/Tests/RunCMake/CMP0106/CMP0106-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0106/CMP0106-WARN-stderr.txt @@ -2,7 +2,6 @@ CMake Warning \(policy\) at CMP0106-Common\.cmake:1 \(include\): Policy CMP0106 is not set: The Documentation module is removed\. Run "cmake --help-policy CMP0106" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - Call Stack \(most recent call first\): CMP0106-WARN\.cmake:2 \(include\) CMakeLists\.txt:7 \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test11-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test11-stderr.txt index 99f0c6c40d..a931f13a9d 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test11-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test11-stderr.txt @@ -5,7 +5,6 @@ warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - This warning is for project developers\. Use -Wno-author or -Wno-policy to suppress it\. +)+ @@ -16,7 +15,6 @@ suppress it\. warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test11\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test13-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test13-stderr.txt index 3513b9d7c7..a6a20a75cc 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test13-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test13-stderr.txt @@ -14,7 +14,6 @@ CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\ warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - This warning is for project developers\. Use -Wno-author or -Wno-policy to suppress it\. +)+ @@ -25,7 +24,6 @@ suppress it\. warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test13\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test15-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test15-stderr.txt index 504c187e08..881e847bb6 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test15-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test15-stderr.txt @@ -5,7 +5,6 @@ warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - This warning is for project developers\. Use -Wno-author or -Wno-policy to suppress it\. +)+ @@ -16,7 +15,6 @@ suppress it\. warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test15\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4-stderr.txt index 6ed4eb647b..78c8ff37fa 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4-stderr.txt @@ -5,7 +5,6 @@ warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -25,7 +24,6 @@ CMake Warning \(policy\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -45,7 +43,6 @@ CMake Warning \(policy\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -65,7 +62,6 @@ CMake Warning \(policy\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -85,7 +81,6 @@ CMake Warning \(policy\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -105,7 +100,6 @@ CMake Warning \(policy\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -125,7 +119,6 @@ CMake Warning \(policy\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -145,7 +138,6 @@ CMake Warning \(policy\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -165,7 +157,6 @@ CMake Warning \(policy\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4b-stderr.txt index df1017bda7..b389fbd83b 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4b-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4b-stderr.txt @@ -5,7 +5,6 @@ warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -25,7 +24,6 @@ CMake Warning \(policy\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -45,7 +43,6 @@ CMake Warning \(policy\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -65,7 +62,6 @@ CMake Warning \(policy\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -85,7 +81,6 @@ CMake Warning \(policy\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -105,7 +100,6 @@ CMake Warning \(policy\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -125,7 +119,6 @@ CMake Warning \(policy\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -145,7 +138,6 @@ CMake Warning \(policy\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -165,7 +157,6 @@ CMake Warning \(policy\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test5-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test5-stderr.txt index 385ebd1b9a..d11408e55c 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test5-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test5-stderr.txt @@ -11,7 +11,6 @@ CMake Warning \(policy\) at CMP0118-Common-Test5\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -39,7 +38,6 @@ CMake Warning \(policy\) at CMP0118-Common-Test5\.cmake:[0-9]+ \(set_property\): instead\. This will be an error under policy CMP0118\. - Call Stack \(most recent call first\): CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -65,7 +63,6 @@ CMake Warning \(policy\) at CMP0118-Common-Test5\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -93,7 +90,6 @@ CMake Warning \(policy\) at CMP0118-Common-Test5\.cmake:[0-9]+ \(set_property\): instead\. This will be an error under policy CMP0118\. - Call Stack \(most recent call first\): CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -119,7 +115,6 @@ CMake Warning \(policy\) at CMP0118-Common-Test5\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -147,7 +142,6 @@ CMake Warning \(policy\) at CMP0118-Common-Test5\.cmake:[0-9]+ \(set_property\): instead\. This will be an error under policy CMP0118\. - Call Stack \(most recent call first\): CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test7-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test7-stderr.txt index 6c4148e976..5fe4690152 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test7-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test7-stderr.txt @@ -5,7 +5,6 @@ warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - This warning is for project developers\. Use -Wno-author or -Wno-policy to suppress it\. +)+ @@ -16,7 +15,6 @@ suppress it\. warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test7\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9-stderr.txt index a4c360e6b0..7e013ea0fe 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9-stderr.txt @@ -5,7 +5,6 @@ warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - This warning is for project developers\. Use -Wno-author or -Wno-policy to suppress it\. +)+ @@ -16,7 +15,6 @@ suppress it\. warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN-Test9\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-stderr.txt index 54343ddd34..4529c8b2b3 100644 --- a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-stderr.txt @@ -2,6 +2,7 @@ CMake Warning \(policy\) at CMP0121-ERANGE-Common\.cmake:3 \(list\): Policy CMP0121 is not set: The list\(\) command now validates parsing of index arguments\. Run "cmake --help-policy CMP0121" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. + Invalid list index "18446744073709551616"\. Call Stack \(most recent call first\): CMP0121-ERANGE-WARN\.cmake:2 \(include\) diff --git a/Tests/RunCMake/CMP0121/CMP0121-GET-WARN-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-GET-WARN-stderr.txt index 540e2dfeff..06301b3c39 100644 --- a/Tests/RunCMake/CMP0121/CMP0121-GET-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0121/CMP0121-GET-WARN-stderr.txt @@ -2,6 +2,7 @@ CMake Warning \(policy\) at CMP0121-GET-Common\.cmake:3 \(list\): Policy CMP0121 is not set: The list\(\) command now validates parsing of index arguments\. Run "cmake --help-policy CMP0121" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. + Invalid list index "2junk"\. Call Stack \(most recent call first\): CMP0121-GET-WARN\.cmake:2 \(include\) diff --git a/Tests/RunCMake/CMP0121/CMP0121-INSERT-WARN-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-INSERT-WARN-stderr.txt index cb0b50a6c5..8e0bfe46e5 100644 --- a/Tests/RunCMake/CMP0121/CMP0121-INSERT-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0121/CMP0121-INSERT-WARN-stderr.txt @@ -2,6 +2,7 @@ CMake Warning \(policy\) at CMP0121-INSERT-Common\.cmake:3 \(list\): Policy CMP0121 is not set: The list\(\) command now validates parsing of index arguments\. Run "cmake --help-policy CMP0121" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. + Invalid list index "junk2"\. Call Stack \(most recent call first\): CMP0121-INSERT-WARN\.cmake:2 \(include\) diff --git a/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-WARN-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-WARN-stderr.txt index 7234d06f99..2bd9598d43 100644 --- a/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-WARN-stderr.txt @@ -2,6 +2,7 @@ CMake Warning \(policy\) at CMP0121-REMOVE_AT-Common\.cmake:3 \(list\): Policy CMP0121 is not set: The list\(\) command now validates parsing of index arguments\. Run "cmake --help-policy CMP0121" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. + Invalid list index "invalid"\. Call Stack \(most recent call first\): CMP0121-REMOVE_AT-WARN\.cmake:2 \(include\) diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-WARN-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-WARN-stderr.txt index 3963f604b8..b6d9e2b758 100644 --- a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-WARN-stderr.txt @@ -2,6 +2,7 @@ CMake Warning \(policy\) at CMP0121-SUBLIST-length-Common\.cmake:3 \(list\): Policy CMP0121 is not set: The list\(\) command now validates parsing of index arguments\. Run "cmake --help-policy CMP0121" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. + Invalid list index "invalid"\. Call Stack \(most recent call first\): CMP0121-SUBLIST-length-WARN\.cmake:2 \(include\) diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-WARN-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-WARN-stderr.txt index dce62a8e1b..ba4ecb5491 100644 --- a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-WARN-stderr.txt @@ -2,6 +2,7 @@ CMake Warning \(policy\) at CMP0121-SUBLIST-start-Common\.cmake:3 \(list\): Policy CMP0121 is not set: The list\(\) command now validates parsing of index arguments\. Run "cmake --help-policy CMP0121" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. + Invalid list index "invalid"\. Call Stack \(most recent call first\): CMP0121-SUBLIST-start-WARN\.cmake:2 \(include\) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test11-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test11-stderr.txt index 15991b4aa9..5284034938 100644 --- a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test11-stderr.txt +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test11-stderr.txt @@ -5,7 +5,6 @@ warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - This warning is for project developers\. Use -Wno-author or -Wno-policy to suppress it\. +)+ @@ -16,7 +15,6 @@ suppress it\. warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test11\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test13-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test13-stderr.txt index a3254a68cf..7f4fdce467 100644 --- a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test13-stderr.txt +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test13-stderr.txt @@ -14,7 +14,6 @@ CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\ warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - This warning is for project developers\. Use -Wno-author or -Wno-policy to suppress it\. + @@ -25,7 +24,6 @@ suppress it\. warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test13\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test15-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test15-stderr.txt index 936813405e..373a050e80 100644 --- a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test15-stderr.txt +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test15-stderr.txt @@ -5,7 +5,6 @@ warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - This warning is for project developers\. Use -Wno-author or -Wno-policy to suppress it\. +)+ @@ -16,7 +15,6 @@ suppress it\. warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test15\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4-stderr.txt index 500721e527..37ffce9059 100644 --- a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4-stderr.txt +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4-stderr.txt @@ -5,7 +5,6 @@ warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -25,7 +24,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -45,7 +43,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -65,7 +62,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -85,7 +81,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -105,7 +100,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -125,7 +119,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -145,7 +138,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -165,7 +157,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4b-stderr.txt index 143c2f57e1..9fe28e0cbf 100644 --- a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4b-stderr.txt +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4b-stderr.txt @@ -5,7 +5,6 @@ warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -25,7 +24,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -45,7 +43,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -65,7 +62,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -85,7 +81,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -105,7 +100,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -125,7 +119,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -145,7 +138,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -165,7 +157,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test5-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test5-stderr.txt index be5cef76b2..701957f3ae 100644 --- a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test5-stderr.txt +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test5-stderr.txt @@ -11,7 +11,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -39,7 +38,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): instead\. This will be an error under policy CMP0118\. - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -65,7 +63,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -93,7 +90,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): instead\. This will be an error under policy CMP0118\. - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -119,7 +115,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -147,7 +142,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): instead\. This will be an error under policy CMP0118\. - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test7-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test7-stderr.txt index 765b4ae6ac..2364b7851b 100644 --- a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test7-stderr.txt +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test7-stderr.txt @@ -5,7 +5,6 @@ warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - This warning is for project developers\. Use -Wno-author or -Wno-policy to suppress it\. +)+ @@ -16,7 +15,6 @@ suppress it\. warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test7\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9-stderr.txt index bba903a25c..7e6add1a40 100644 --- a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9-stderr.txt +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9-stderr.txt @@ -5,7 +5,6 @@ warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - This warning is for project developers\. Use -Wno-author or -Wno-policy to suppress it\. +)+ @@ -16,7 +15,6 @@ suppress it\. warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-OLD-Test9\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test11-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test11-stderr.txt index 95d70fe0d7..e1081de44d 100644 --- a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test11-stderr.txt +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test11-stderr.txt @@ -5,7 +5,6 @@ warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - This warning is for project developers\. Use -Wno-author or -Wno-policy to suppress it\. +)+ @@ -16,7 +15,6 @@ suppress it\. warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test11\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test13-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test13-stderr.txt index 401b3a220a..0f9fbb669b 100644 --- a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test13-stderr.txt +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test13-stderr.txt @@ -14,7 +14,6 @@ CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\ warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - This warning is for project developers\. Use -Wno-author or -Wno-policy to suppress it\. + @@ -25,7 +24,6 @@ suppress it\. warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test13\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test15-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test15-stderr.txt index 1f4383576c..f635de2707 100644 --- a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test15-stderr.txt +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test15-stderr.txt @@ -5,7 +5,6 @@ warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - This warning is for project developers\. Use -Wno-author or -Wno-policy to suppress it\. +)+ @@ -16,7 +15,6 @@ suppress it\. warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test15\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4-stderr.txt index ec395aef7d..1059f0317a 100644 --- a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4-stderr.txt +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4-stderr.txt @@ -5,7 +5,6 @@ warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -25,7 +24,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -45,7 +43,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -65,7 +62,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -85,7 +81,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -105,7 +100,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -125,7 +119,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -145,7 +138,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -165,7 +157,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4b-stderr.txt index 7cfe014d85..3d12a53d9b 100644 --- a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4b-stderr.txt +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4b-stderr.txt @@ -5,7 +5,6 @@ warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -25,7 +24,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -45,7 +43,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -65,7 +62,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -85,7 +81,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -105,7 +100,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -125,7 +119,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -145,7 +138,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -165,7 +157,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\) warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test5-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test5-stderr.txt index cba5ed2395..9589185339 100644 --- a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test5-stderr.txt +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test5-stderr.txt @@ -11,7 +11,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -39,7 +38,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): instead\. This will be an error under policy CMP0118\. - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -65,7 +63,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -93,7 +90,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): instead\. This will be an error under policy CMP0118\. - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -119,7 +115,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -147,7 +142,6 @@ CMake Warning \(policy\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): instead\. This will be an error under policy CMP0118\. - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test7-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test7-stderr.txt index 6fa83b95b3..ca624f8106 100644 --- a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test7-stderr.txt +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test7-stderr.txt @@ -5,7 +5,6 @@ warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - This warning is for project developers\. Use -Wno-author or -Wno-policy to suppress it\. +)+ @@ -16,7 +15,6 @@ suppress it\. warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test7\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9-stderr.txt index 5d5bddfde4..406f0a0817 100644 --- a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9-stderr.txt +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9-stderr.txt @@ -5,7 +5,6 @@ warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - This warning is for project developers\. Use -Wno-author or -Wno-policy to suppress it\. +)+ @@ -16,7 +15,6 @@ suppress it\. warning\. Unsetting property 'GENERATED' will not be allowed under policy CMP0118! - Call Stack \(most recent call first\): CMP0118-WARN/CMP0163-WARN-Test9\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0173/CMP0173-WARN-stderr.txt b/Tests/RunCMake/CMP0173/CMP0173-WARN-stderr.txt index 4b4bd9477e..9aa15f2cfe 100644 --- a/Tests/RunCMake/CMP0173/CMP0173-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0173/CMP0173-WARN-stderr.txt @@ -2,7 +2,6 @@ CMake Warning \(policy\) at CMP0173-common\.cmake:1 \(include\): Policy CMP0173 is not set: The CMakeFindFrameworks module is removed\. Run "cmake --help-policy CMP0173" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - Call Stack \(most recent call first\): CMP0173-WARN\.cmake:2 \(include\) CMakeLists\.txt:3 \(include\) diff --git a/Tests/RunCMake/CTest/CMP0145-Dart-WARN-stderr.txt b/Tests/RunCMake/CTest/CMP0145-Dart-WARN-stderr.txt index 909331b0de..b8b5f3581a 100644 --- a/Tests/RunCMake/CTest/CMP0145-Dart-WARN-stderr.txt +++ b/Tests/RunCMake/CTest/CMP0145-Dart-WARN-stderr.txt @@ -2,7 +2,6 @@ Policy CMP0145 is not set: The Dart and FindDart modules are removed\. Run "cmake --help-policy CMP0145" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers\. Use -Wno-author or -Wno-policy to diff --git a/Tests/RunCMake/CTest/CMP0145-FindDart-WARN-stderr.txt b/Tests/RunCMake/CTest/CMP0145-FindDart-WARN-stderr.txt index 22522cf585..e56d0b006b 100644 --- a/Tests/RunCMake/CTest/CMP0145-FindDart-WARN-stderr.txt +++ b/Tests/RunCMake/CTest/CMP0145-FindDart-WARN-stderr.txt @@ -2,7 +2,6 @@ Policy CMP0145 is not set: The Dart and FindDart modules are removed\. Run "cmake --help-policy CMP0145" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers\. Use -Wno-author or -Wno-policy to diff --git a/Tests/RunCMake/GeneratorExpression/CMP0199-WARN-stderr.txt b/Tests/RunCMake/GeneratorExpression/CMP0199-WARN-stderr.txt index 377be839ee..ea8688343d 100644 --- a/Tests/RunCMake/GeneratorExpression/CMP0199-WARN-stderr.txt +++ b/Tests/RunCMake/GeneratorExpression/CMP0199-WARN-stderr.txt @@ -6,7 +6,6 @@ CMake Warning \(policy\) at CMP0199-WARN\.cmake:[0-9]+ \(target_link_libraries\) Evaluation of \$ for imported target "lib_test", used by "exe_test", may match multiple configurations\. - Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers\. Use -Wno-author or -Wno-policy to diff --git a/Tests/RunCMake/GeneratorExpression/CMP0200-WARN-stderr.txt b/Tests/RunCMake/GeneratorExpression/CMP0200-WARN-stderr.txt index 129619b8fb..d60f6149b1 100644 --- a/Tests/RunCMake/GeneratorExpression/CMP0200-WARN-stderr.txt +++ b/Tests/RunCMake/GeneratorExpression/CMP0200-WARN-stderr.txt @@ -7,7 +7,6 @@ CMake Warning \(policy\) in CMakeLists\.txt: Configuration selection for imported target "lib_test1" selected configuration "CAT", but would select configuration "DOG" under the NEW policy\. - This warning is for project developers\. Use -Wno-author or -Wno-policy to suppress it\. @@ -20,6 +19,5 @@ CMake Warning \(policy\) in CMakeLists\.txt: Configuration selection for imported target "lib_test2" selected configuration "\(none\)", but would select configuration "[^"]*" under the NEW policy\. - This warning is for project developers\. Use -Wno-author or -Wno-policy to suppress it\. diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/CMP0120-WARN-stderr.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/CMP0120-WARN-stderr.txt index 15966791ca..dfe14c526b 100644 --- a/Tests/RunCMake/WriteCompilerDetectionHeader/CMP0120-WARN-stderr.txt +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/CMP0120-WARN-stderr.txt @@ -2,7 +2,6 @@ Policy CMP0120 is not set: The WriteCompilerDetectionHeader module is removed\. Run "cmake --help-policy CMP0120" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers\. Use -Wno-author or -Wno-policy to diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-stderr.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-stderr.txt index 383a314f27..ec95bccb6f 100644 --- a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-stderr.txt +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-stderr.txt @@ -3,6 +3,5 @@ CMake Warning \(policy\) in CMakeLists\.txt: interleaved with those in caller\. Run "cmake --help-policy CMP0082" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - This warning is for project developers\. Use -Wno-author or -Wno-policy to suppress it\. diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-stderr.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-stderr.txt index 2d246ee8c5..5d356607f2 100644 --- a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-stderr.txt +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-stderr.txt @@ -3,6 +3,5 @@ CMake Warning \(policy\) in CMP0082-NestedSub/CMakeLists\.txt: interleaved with those in caller\. Run "cmake --help-policy CMP0082" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - This warning is for project developers\. Use -Wno-author or -Wno-policy to suppress it\. diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-stderr.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-stderr.txt index 383a314f27..ec95bccb6f 100644 --- a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-stderr.txt +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-stderr.txt @@ -3,6 +3,5 @@ CMake Warning \(policy\) in CMakeLists\.txt: interleaved with those in caller\. Run "cmake --help-policy CMP0082" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - This warning is for project developers\. Use -Wno-author or -Wno-policy to suppress it\. diff --git a/Tests/RunCMake/find_package/CMP0084-WARN-stderr.txt b/Tests/RunCMake/find_package/CMP0084-WARN-stderr.txt index ac1a4fea3d..7e95b27843 100644 --- a/Tests/RunCMake/find_package/CMP0084-WARN-stderr.txt +++ b/Tests/RunCMake/find_package/CMP0084-WARN-stderr.txt @@ -2,7 +2,6 @@ Policy CMP0084 is not set: The FindQt module does not exist for find_package\(\)\. Run "cmake --help-policy CMP0084" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers\. Use -Wno-author or -Wno-policy to diff --git a/Tests/RunCMake/find_package/CMP0145-WARN-stderr.txt b/Tests/RunCMake/find_package/CMP0145-WARN-stderr.txt index a3928e8717..55bd669656 100644 --- a/Tests/RunCMake/find_package/CMP0145-WARN-stderr.txt +++ b/Tests/RunCMake/find_package/CMP0145-WARN-stderr.txt @@ -2,7 +2,6 @@ CMake Warning \(policy\) at CMP0145-WARN\.cmake:[0-9]+ \(find_package\): Policy CMP0145 is not set: The Dart and FindDart modules are removed\. Run "cmake --help-policy CMP0145" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers\. Use -Wno-author or -Wno-policy to diff --git a/Tests/RunCMake/find_package/CMP0146-WARN-stderr.txt b/Tests/RunCMake/find_package/CMP0146-WARN-stderr.txt index fe90ffa38e..8aa156f016 100644 --- a/Tests/RunCMake/find_package/CMP0146-WARN-stderr.txt +++ b/Tests/RunCMake/find_package/CMP0146-WARN-stderr.txt @@ -2,7 +2,6 @@ CMake Warning \(policy\) at CMP0146-WARN\.cmake:[0-9]+ \(find_package\): Policy CMP0146 is not set: The FindCUDA module is removed\. Run "cmake --help-policy CMP0146" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers\. Use -Wno-author or -Wno-policy to diff --git a/Tests/RunCMake/find_package/CMP0148-Interp-WARN-stderr.txt b/Tests/RunCMake/find_package/CMP0148-Interp-WARN-stderr.txt index 17efed47e3..cec2c27249 100644 --- a/Tests/RunCMake/find_package/CMP0148-Interp-WARN-stderr.txt +++ b/Tests/RunCMake/find_package/CMP0148-Interp-WARN-stderr.txt @@ -2,7 +2,6 @@ CMake Warning \(policy\) at CMP0148-Interp-WARN\.cmake:[0-9]+ \(find_package\): Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules are removed\. Run "cmake --help-policy CMP0148" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers\. Use -Wno-author or -Wno-policy to diff --git a/Tests/RunCMake/find_package/CMP0148-Libs-WARN-stderr.txt b/Tests/RunCMake/find_package/CMP0148-Libs-WARN-stderr.txt index 2cf7630c38..68f09ad769 100644 --- a/Tests/RunCMake/find_package/CMP0148-Libs-WARN-stderr.txt +++ b/Tests/RunCMake/find_package/CMP0148-Libs-WARN-stderr.txt @@ -2,7 +2,6 @@ CMake Warning \(policy\) at CMP0148-Libs-WARN\.cmake:[0-9]+ \(find_package\): Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules are removed\. Run "cmake --help-policy CMP0148" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers\. Use -Wno-author or -Wno-policy to diff --git a/Tests/RunCMake/find_package/CMP0167-WARN-stderr.txt b/Tests/RunCMake/find_package/CMP0167-WARN-stderr.txt index 1945eb396f..96311b8c66 100644 --- a/Tests/RunCMake/find_package/CMP0167-WARN-stderr.txt +++ b/Tests/RunCMake/find_package/CMP0167-WARN-stderr.txt @@ -2,7 +2,6 @@ CMake Warning \(policy\) at CMP0167-WARN\.cmake:[0-9]+ \(find_package\): Policy CMP0167 is not set: The FindBoost module is removed\. Run "cmake --help-policy CMP0167" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers\. Use -Wno-author or -Wno-policy to diff --git a/Tests/RunCMake/find_package/CMP0188-WARN-stderr.txt b/Tests/RunCMake/find_package/CMP0188-WARN-stderr.txt index cd625a9dca..dd46455ead 100644 --- a/Tests/RunCMake/find_package/CMP0188-WARN-stderr.txt +++ b/Tests/RunCMake/find_package/CMP0188-WARN-stderr.txt @@ -2,7 +2,6 @@ CMake Warning \(policy\) at CMP0188-WARN\.cmake:[0-9]+ \(find_package\): Policy CMP0188 is not set: The FindGCCXML module is removed\. Run "cmake --help-policy CMP0188" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers\. Use -Wno-author or -Wno-policy to diff --git a/Tests/RunCMake/find_package/CMP0191-WARN-stderr.txt b/Tests/RunCMake/find_package/CMP0191-WARN-stderr.txt index 5a3c4d287a..64f4815512 100644 --- a/Tests/RunCMake/find_package/CMP0191-WARN-stderr.txt +++ b/Tests/RunCMake/find_package/CMP0191-WARN-stderr.txt @@ -2,7 +2,6 @@ CMake Warning \(policy\) at CMP0191-WARN\.cmake:[0-9]+ \(find_package\): Policy CMP0191 is not set: The FindCABLE module is removed\. Run "cmake --help-policy CMP0191" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers\. Use -Wno-author or -Wno-policy to diff --git a/Tests/RunCMake/include/CMP0146-WARN-stderr.txt b/Tests/RunCMake/include/CMP0146-WARN-stderr.txt index 8903609f11..14a399a301 100644 --- a/Tests/RunCMake/include/CMP0146-WARN-stderr.txt +++ b/Tests/RunCMake/include/CMP0146-WARN-stderr.txt @@ -2,7 +2,6 @@ Policy CMP0146 is not set: The FindCUDA module is removed\. Run "cmake --help-policy CMP0146" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers\. Use -Wno-author or -Wno-policy to diff --git a/Tests/RunCMake/include/CMP0148-Interp-WARN-stderr.txt b/Tests/RunCMake/include/CMP0148-Interp-WARN-stderr.txt index 32d2926081..5459fb60ec 100644 --- a/Tests/RunCMake/include/CMP0148-Interp-WARN-stderr.txt +++ b/Tests/RunCMake/include/CMP0148-Interp-WARN-stderr.txt @@ -2,7 +2,6 @@ Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules are removed\. Run "cmake --help-policy CMP0148" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers\. Use -Wno-author or -Wno-policy to diff --git a/Tests/RunCMake/include/CMP0148-Libs-WARN-stderr.txt b/Tests/RunCMake/include/CMP0148-Libs-WARN-stderr.txt index add0fd7dd4..d053726f5f 100644 --- a/Tests/RunCMake/include/CMP0148-Libs-WARN-stderr.txt +++ b/Tests/RunCMake/include/CMP0148-Libs-WARN-stderr.txt @@ -2,7 +2,6 @@ Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules are removed\. Run "cmake --help-policy CMP0148" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers\. Use -Wno-author or -Wno-policy to diff --git a/Tests/RunCMake/include/CMP0167-WARN-stderr.txt b/Tests/RunCMake/include/CMP0167-WARN-stderr.txt index 19da1b17cc..d2ad59d767 100644 --- a/Tests/RunCMake/include/CMP0167-WARN-stderr.txt +++ b/Tests/RunCMake/include/CMP0167-WARN-stderr.txt @@ -2,7 +2,6 @@ Policy CMP0167 is not set: The FindBoost module is removed\. Run "cmake --help-policy CMP0167" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers\. Use -Wno-author or -Wno-policy to diff --git a/Tests/RunCMake/include/CMP0188-WARN-stderr.txt b/Tests/RunCMake/include/CMP0188-WARN-stderr.txt index 93ec0a0a8a..0db95e0ad4 100644 --- a/Tests/RunCMake/include/CMP0188-WARN-stderr.txt +++ b/Tests/RunCMake/include/CMP0188-WARN-stderr.txt @@ -2,7 +2,6 @@ Policy CMP0188 is not set: The FindGCCXML module is removed\. Run "cmake --help-policy CMP0188" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers\. Use -Wno-author or -Wno-policy to diff --git a/Tests/RunCMake/include/CMP0191-WARN-stderr.txt b/Tests/RunCMake/include/CMP0191-WARN-stderr.txt index 0d3c3f71ac..61f2b44dac 100644 --- a/Tests/RunCMake/include/CMP0191-WARN-stderr.txt +++ b/Tests/RunCMake/include/CMP0191-WARN-stderr.txt @@ -2,7 +2,6 @@ Policy CMP0191 is not set: The FindCABLE module is removed\. Run "cmake --help-policy CMP0191" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers\. Use -Wno-author or -Wno-policy to diff --git a/Tests/RunCMake/include/CMP0196-WARN-stderr.txt b/Tests/RunCMake/include/CMP0196-WARN-stderr.txt index 3baf85dd63..5bf3a9a40c 100644 --- a/Tests/RunCMake/include/CMP0196-WARN-stderr.txt +++ b/Tests/RunCMake/include/CMP0196-WARN-stderr.txt @@ -2,7 +2,6 @@ Policy CMP0196 is not set: The CMakeDetermineVSServicePack module is removed\. Run "cmake --help-policy CMP0196" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. - Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers\. Use -Wno-author or -Wno-policy to