88eb5824da
Copy CMAKE_EXE_LINKER_FLAGS into the test project generated by try_compile, just like we already copy CMAKE_<LANG>_FLAGS. Add CMake Policy CMP0056 to activate this behavior in a compatible way, but do not warn by default when the policy is not set since it will affect all try_compile calls. Extend the RunCMake.try_compile test with a case covering this behavior for each policy setting.
20 lines
812 B
ReStructuredText
20 lines
812 B
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`.
|
|
|
|
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``
|
|
or ``--trace`` option will also enable the warning.
|