mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-03 05:08:47 -06:00
CMP0047: Remove support for OLD behavior
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
CMP0047
|
||||
-------
|
||||
|
||||
.. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
|
||||
.. include:: REMOVED_PROLOGUE.txt
|
||||
|
||||
Use ``QCC`` compiler id for the qcc drivers on QNX.
|
||||
|
||||
CMake 3.0 and above recognize that the QNX qcc compiler driver is
|
||||
@@ -20,11 +23,9 @@ for the qcc and QCC compiler drivers. The ``NEW`` behavior for this policy
|
||||
is to use the ``QCC`` compiler id for those drivers.
|
||||
|
||||
.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0
|
||||
.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn by default
|
||||
.. include:: STANDARD_ADVICE.txt
|
||||
.. |WARNED_OR_DID_NOT_WARN| replace:: did *not* warn by default
|
||||
.. include:: REMOVED_EPILOGUE.txt
|
||||
|
||||
See documentation of the
|
||||
:variable:`CMAKE_POLICY_WARNING_CMP0047 <CMAKE_POLICY_WARNING_CMP<NNNN>>`
|
||||
variable to control the warning.
|
||||
|
||||
.. include:: DEPRECATED.txt
|
||||
variable to control the warning in CMake versions before 4.0.
|
||||
|
||||
@@ -8,8 +8,8 @@ only for the policies that do not warn by default:
|
||||
|
||||
* ``CMAKE_POLICY_WARNING_CMP0025`` controlled the warning for
|
||||
policy :policy:`CMP0025` in CMake versions before 4.0.
|
||||
* ``CMAKE_POLICY_WARNING_CMP0047`` controls the warning for
|
||||
policy :policy:`CMP0047`.
|
||||
* ``CMAKE_POLICY_WARNING_CMP0047`` controlled the warning for
|
||||
policy :policy:`CMP0047` in CMake versions before 4.0.
|
||||
* ``CMAKE_POLICY_WARNING_CMP0056`` controls the warning for
|
||||
policy :policy:`CMP0056`.
|
||||
* ``CMAKE_POLICY_WARNING_CMP0060`` controls the warning for
|
||||
|
||||
@@ -1010,36 +1010,6 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility(
|
||||
std::string compilerIdVar = cmStrCat("CMAKE_", lang, "_COMPILER_ID");
|
||||
std::string const compilerId = mf->GetSafeDefinition(compilerIdVar);
|
||||
|
||||
if (compilerId == "QCC") {
|
||||
switch (mf->GetPolicyStatus(cmPolicies::CMP0047)) {
|
||||
case cmPolicies::WARN:
|
||||
if (!this->CMakeInstance->GetIsInTryCompile() &&
|
||||
mf->PolicyOptionalWarningEnabled("CMAKE_POLICY_WARNING_CMP0047")) {
|
||||
std::ostringstream w;
|
||||
/* clang-format off */
|
||||
w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0047) << "\n"
|
||||
"Converting " << lang <<
|
||||
R"( compiler id "QCC" to "GNU" for compatibility.)"
|
||||
;
|
||||
/* clang-format on */
|
||||
mf->IssueMessage(MessageType::AUTHOR_WARNING, w.str());
|
||||
}
|
||||
CM_FALLTHROUGH;
|
||||
case cmPolicies::OLD:
|
||||
// OLD behavior is to convert QCC to GNU.
|
||||
mf->AddDefinition(compilerIdVar, "GNU");
|
||||
if (lang == "C") {
|
||||
mf->AddDefinition("CMAKE_COMPILER_IS_GNUCC", "1");
|
||||
} else if (lang == "CXX") {
|
||||
mf->AddDefinition("CMAKE_COMPILER_IS_GNUCXX", "1");
|
||||
}
|
||||
break;
|
||||
case cmPolicies::NEW:
|
||||
// NEW behavior is to keep QCC.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (compilerId == "XLClang") {
|
||||
switch (mf->GetPolicyStatus(cmPolicies::CMP0089)) {
|
||||
case cmPolicies::WARN:
|
||||
|
||||
@@ -143,7 +143,7 @@ class cmMakefile;
|
||||
"Error on non-existent dependency in add_dependencies.", 3, 0, 0, \
|
||||
NEW) \
|
||||
SELECT(POLICY, CMP0047, "Use QCC compiler id for the qcc drivers on QNX.", \
|
||||
3, 0, 0, WARN) \
|
||||
3, 0, 0, NEW) \
|
||||
SELECT(POLICY, CMP0048, "project() command manages VERSION variables.", 3, \
|
||||
0, 0, WARN) \
|
||||
SELECT(POLICY, CMP0049, \
|
||||
|
||||
Reference in New Issue
Block a user