diff options
author | Brad King <brad.king@kitware.com> | 2018-04-19 12:23:05 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-04-19 12:23:08 (GMT) |
commit | 3c6388553aef091556b64daf9bcb6f64fbdcdba2 (patch) | |
tree | 66c10261df25155548db1db3d4568ad29157c80c /Help | |
parent | 6c13ddd6cb0c51afd2789db34b41416b5706336b (diff) | |
parent | a61ae3fb8017a297bd3f3efc447a1f1f29619bdf (diff) | |
download | CMake-3c6388553aef091556b64daf9bcb6f64fbdcdba2.zip CMake-3c6388553aef091556b64daf9bcb6f64fbdcdba2.tar.gz CMake-3c6388553aef091556b64daf9bcb6f64fbdcdba2.tar.bz2 |
Merge topic 'CheckIncludeFile-required-libs'
a61ae3fb80 CheckIncludeFiles: Honor CMAKE_REQUIRED_LIBRARIES
391a5837ee cmake_policy: Add undocumented PARENT_SCOPE option to GET
3c47ac5b25 OpenWatcom: Add workaround for lack of error on missing library
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1978
Diffstat (limited to 'Help')
-rw-r--r-- | Help/manual/cmake-policies.7.rst | 1 | ||||
-rw-r--r-- | Help/policy/CMP0075.rst | 26 | ||||
-rw-r--r-- | Help/release/dev/CheckIncludeFile-required-libs.rst | 14 |
3 files changed, 41 insertions, 0 deletions
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index 7e2255d..631f75b 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -57,6 +57,7 @@ Policies Introduced by CMake 3.12 .. toctree:: :maxdepth: 1 + CMP0075: Include file check macros honor CMAKE_REQUIRED_LIBRARIES. </policy/CMP0075> CMP0074: find_package uses PackageName_ROOT variables. </policy/CMP0074> CMP0073: Do not produce legacy _LIB_DEPENDS cache entries. </policy/CMP0073> diff --git a/Help/policy/CMP0075.rst b/Help/policy/CMP0075.rst new file mode 100644 index 0000000..aa5c3f7 --- /dev/null +++ b/Help/policy/CMP0075.rst @@ -0,0 +1,26 @@ +CMP0075 +------- + +Include file check macros honor ``CMAKE_REQUIRED_LIBRARIES``. + +In CMake 3.12 and above, the + +* ``check_include_file`` macro in the :module:`CheckIncludeFile` module, the +* ``check_include_file_cxx`` macro in the + :module:`CheckIncludeFileCXX` module, and the +* ``check_include_files`` macro in the :module:`CheckIncludeFiles` module + +now prefer to link the check executable to the libraries listed in the +``CMAKE_REQUIRED_LIBRARIES`` variable. This policy provides compatibility +with projects that have not been updated to expect this behavior. + +The ``OLD`` behavior for this policy is to ignore ``CMAKE_REQUIRED_LIBRARIES`` +in the include file check macros. The ``NEW`` behavior of this policy is to +honor ``CMAKE_REQUIRED_LIBRARIES`` in the include file check macros. + +This policy was introduced in CMake version 3.12. CMake version +|release| warns when the policy is not set and uses ``OLD`` behavior. +Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` +explicitly. + +.. include:: DEPRECATED.txt diff --git a/Help/release/dev/CheckIncludeFile-required-libs.rst b/Help/release/dev/CheckIncludeFile-required-libs.rst new file mode 100644 index 0000000..6fb5c40 --- /dev/null +++ b/Help/release/dev/CheckIncludeFile-required-libs.rst @@ -0,0 +1,14 @@ +CheckIncludeFile-required-libs +------------------------------ + +* The :module:`CheckIncludeFile` module ``check_include_file`` macro + learned to honor the ``CMAKE_REQUIRED_LIBRARIES`` variable. + See policy :policy:`CMP0075`. + +* The :module:`CheckIncludeFileCXX` module ``check_include_file_cxx`` macro + learned to honor the ``CMAKE_REQUIRED_LIBRARIES`` variable. + See policy :policy:`CMP0075`. + +* The :module:`CheckIncludeFiles` module ``check_include_files`` macro + learned to honor the ``CMAKE_REQUIRED_LIBRARIES`` variable. + See policy :policy:`CMP0075`. |