CMP0075.rst 969 B

123456789101112131415161718192021222324252627
  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. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.12
  17. .. |WARNS_OR_DOES_NOT_WARN| replace:: warns
  18. .. include:: STANDARD_ADVICE.txt
  19. .. include:: DEPRECATED.txt