mirror of
https://github.com/reactos/CMake.git
synced 2025-02-12 23:19:13 +00:00
![Brad King](/assets/img/avatar_default.png)
Projects use `try_compile` to check if they will be able to compile some particular source code. When a language standard variable like `CMAKE_CXX_STANDARD` is set, then the project intends to compile source code using a compiler mode for that standard. Therefore it makes sense for `try_compile` to use that standard in the test project too. Unfortunately this was not done when support for the `CMAKE_CXX_STANDARD` variable was first implemented. Add a policy to introduce the improved behavior in a compatible way. Closes: #16456
28 lines
1.2 KiB
ReStructuredText
28 lines
1.2 KiB
ReStructuredText
CMAKE_POLICY_WARNING_CMP<NNNN>
|
|
------------------------------
|
|
|
|
Explicitly enable or disable the warning when CMake Policy ``CMP<NNNN>``
|
|
is not set. This is meaningful only for the few policies that do not
|
|
warn by default:
|
|
|
|
* ``CMAKE_POLICY_WARNING_CMP0025`` controls the warning for
|
|
policy :policy:`CMP0025`.
|
|
* ``CMAKE_POLICY_WARNING_CMP0047`` controls the warning for
|
|
policy :policy:`CMP0047`.
|
|
* ``CMAKE_POLICY_WARNING_CMP0056`` controls the warning for
|
|
policy :policy:`CMP0056`.
|
|
* ``CMAKE_POLICY_WARNING_CMP0060`` controls the warning for
|
|
policy :policy:`CMP0060`.
|
|
* ``CMAKE_POLICY_WARNING_CMP0065`` controls the warning for
|
|
policy :policy:`CMP0065`.
|
|
* ``CMAKE_POLICY_WARNING_CMP0066`` controls the warning for
|
|
policy :policy:`CMP0066`.
|
|
* ``CMAKE_POLICY_WARNING_CMP0067`` controls the warning for
|
|
policy :policy:`CMP0067`.
|
|
|
|
This variable should not be set by a project in CMake code. Project
|
|
developers running CMake may set this variable in their cache to
|
|
enable the warning (e.g. ``-DCMAKE_POLICY_WARNING_CMP<NNNN>=ON``).
|
|
Alternatively, running :manual:`cmake(1)` with the ``--debug-output``,
|
|
``--trace``, or ``--trace-expand`` option will also enable the warning.
|