The most likely documentation page a project author will read in
response to a policy warning is the page for the policy itself.
Add to every policy documentation page a note explicitly stating
that the OLD behavior is deprecated. Also mention this in the
cmake_policy() command documentation that explains how to set a
policy to OLD.
Suggested-by: Fraser Hutchison <fraser.hutchison@gmail.com>
These policies are triggered by the use of a particular compiler rather
than outdated CMake code in a project. Avoid warning in every project
that enables a language by not displaying the policy warning by default.
Add variable CMAKE_POLICY_WARNING_CMP<NNNN> to control the warning
explicitly; otherwise enable the warning with --debug-output or --trace.
This breaks with strict policy convention because it does not provide
developers with any warning about the behavior change by default.
Existing projects will continue to build without a warning or change in
behavior. When a developer changes the minimum required version of
CMake in a project to a sufficiently high value (3.0), the project will
suddenly get the new compiler id and may break, but at least the
breakage comes with a change to the project rather than the version of
CMake used to build it.
Breaking strict policy convention is worthwhile in this case because
very few projects will be affected by the behavior change but every
project would have to see the warning if it were enabled by default.
Add inline reST markup as appropriate. Word CMP0047 docs more like
those of CMP0025. State explicitly that the policies must be set
before the project or enable_language command calls.
Starting with 3.0 we will use only two components for the feature level,
and policies are only ever introduced with a bump to the feature level
version.
Introduce policy CMP0047 to control resetting the id for
compatibility.
De-duplicate content in the QNX platform file by including the GNU
one. QNX is a form of GNU platform.
Do not clear CMAKE_SHARED_LIBRARY_${lang}_FLAGS variables. They
are populated again later by the Compiler/GNU.cmake file anyway.
Modify the CMAKE_CXX_COMPILE_OBJECT variable only when the QCC
compiler id is in use, and the language is CXX. Use the QNX
recommended flag for QCC instead of the gcc compatible -x flag.
Populate new module files to handle system includes and depfiles
when using the QCC compiler.
Remove code which unsets the system include and depfiles related
variables. When a GNU driver is used instead of the QCC one, the
appropriate flags will be used. These variables were previously
cleared for lowest-common-denominator compatibility with both
drivers.