CMP0075.rst 1.0 KB

12345678910111213141516171819202122232425262728
  1. CMP0075
  2. -------
  3. .. versionadded:: 3.12
  4. Include file check macros honor ``CMAKE_REQUIRED_LIBRARIES``.
  5. In CMake 3.12 and above, the
  6. * ``check_include_file`` macro in the :module:`CheckIncludeFile` module, the
  7. * ``check_include_file_cxx`` macro in the
  8. :module:`CheckIncludeFileCXX` module, and the
  9. * ``check_include_files`` macro in the :module:`CheckIncludeFiles` module
  10. now prefer to link the check executable to the libraries listed in the
  11. ``CMAKE_REQUIRED_LIBRARIES`` variable. This policy provides compatibility
  12. with projects that have not been updated to expect this behavior.
  13. The ``OLD`` behavior for this policy is to ignore ``CMAKE_REQUIRED_LIBRARIES``
  14. in the include file check macros. The ``NEW`` behavior of this policy is to
  15. honor ``CMAKE_REQUIRED_LIBRARIES`` in the include file check macros.
  16. This policy was introduced in CMake version 3.12. CMake version
  17. |release| warns when the policy is not set and uses ``OLD`` behavior.
  18. Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW``
  19. explicitly.
  20. .. include:: DEPRECATED.txt