mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-27 03:08:35 -06:00
Merge topic 'cmake_automoc_relaxed_mode_deprecation'
df6adb02c0Autogen: Deprecation release notes for CMAKE_AUTOMOC_RELAXED_MODE5bf07b9cfcHelp: Mark CMAKE_AUTOMOC_RELAXED_MODE as deprecatedb5ad572ac1Autogen: Deprecation message for CMAKE_AUTOMOC_RELAXED_MODE Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3381
This commit is contained in:
5
Help/release/dev/cmake_automoc_relaxed_mode.rst
Normal file
5
Help/release/dev/cmake_automoc_relaxed_mode.rst
Normal file
@@ -0,0 +1,5 @@
|
||||
cmake_automoc_relaxed_mode
|
||||
--------------------------
|
||||
|
||||
* The variable :variable:`CMAKE_AUTOMOC_RELAXED_MODE` is considered
|
||||
deprecated. Support still exists but will be removed in future versions.
|
||||
@@ -1,6 +1,8 @@
|
||||
CMAKE_AUTOMOC_RELAXED_MODE
|
||||
--------------------------
|
||||
|
||||
.. deprecated:: 3.15
|
||||
|
||||
Switch between strict and relaxed automoc mode.
|
||||
|
||||
By default, :prop_tgt:`AUTOMOC` behaves exactly as described in the
|
||||
|
||||
@@ -407,6 +407,19 @@ bool cmQtAutoGenInitializer::InitCustomTargets()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// CMAKE_AUTOMOC_RELAXED_MODE deprecation warning
|
||||
if (this->Moc.Enabled) {
|
||||
if (cmSystemTools::IsOn(
|
||||
makefile->GetDefinition("CMAKE_AUTOMOC_RELAXED_MODE"))) {
|
||||
std::string msg = "AUTOMOC: CMAKE_AUTOMOC_RELAXED_MODE is "
|
||||
"deprecated an will be removed in the future. ";
|
||||
msg += "Consider disabling it and converting the target ";
|
||||
msg += this->Target->GetName();
|
||||
msg += " to regular mode.";
|
||||
makefile->IssueMessage(MessageType::AUTHOR_WARNING, msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Init rcc specific settings
|
||||
|
||||
@@ -708,7 +708,7 @@ bool cmQtAutoMocUic::JobEvaluateT::MocEvalSource(
|
||||
msg += Quoted(sourceFile.FileName);
|
||||
msg += "!\nBetter include ";
|
||||
msg += Quoted(sourceBase + ".moc");
|
||||
msg += " for compatibility with strict mode.\n";
|
||||
msg += " for compatibility with regular mode.\n";
|
||||
msg += "This is a CMAKE_AUTOMOC_RELAXED_MODE warning.\n";
|
||||
Log().WarningFile(GenT::MOC, sourceFile.FileName, msg);
|
||||
}
|
||||
@@ -770,7 +770,7 @@ bool cmQtAutoMocUic::JobEvaluateT::MocEvalSource(
|
||||
msg += Quoted(header->FileName);
|
||||
msg += "!\nBetter include ";
|
||||
msg += Quoted("moc_" + incKey.Base + ".cpp");
|
||||
msg += " for a compatibility with strict mode.\n";
|
||||
msg += " for a compatibility with regular mode.\n";
|
||||
msg += "This is a CMAKE_AUTOMOC_RELAXED_MODE warning.\n";
|
||||
Log().WarningFile(GenT::MOC, sourceFile.FileName, msg);
|
||||
} else {
|
||||
@@ -782,7 +782,7 @@ bool cmQtAutoMocUic::JobEvaluateT::MocEvalSource(
|
||||
msg += Quoted(header->FileName);
|
||||
msg += "!\nBetter include ";
|
||||
msg += Quoted("moc_" + incKey.Base + ".cpp");
|
||||
msg += " for compatibility with strict mode.\n";
|
||||
msg += " for compatibility with regular mode.\n";
|
||||
msg += "This is a CMAKE_AUTOMOC_RELAXED_MODE warning.\n";
|
||||
Log().WarningFile(GenT::MOC, sourceFile.FileName, msg);
|
||||
}
|
||||
@@ -797,7 +797,7 @@ bool cmQtAutoMocUic::JobEvaluateT::MocEvalSource(
|
||||
// Check if this is the sources own .moc file
|
||||
bool const ownMoc = (incKey.Base == sourceBase);
|
||||
if (!ownMoc) {
|
||||
// Don't allow <BASE>.moc include other than own in strict mode
|
||||
// Don't allow <BASE>.moc include other than own in regular mode
|
||||
std::string msg = "The file includes the moc file ";
|
||||
msg += Quoted(incKey.Key);
|
||||
msg += ",\nwhich seems to be the moc file from a different "
|
||||
|
||||
Reference in New Issue
Block a user