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