summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-08-27 13:40:24 (GMT)
committerKitware Robot <kwrobot@kitware.com>2024-08-27 13:41:03 (GMT)
commit74c29b44a9fab0a06a7455037d89f5c6049dc5cb (patch)
tree8a04e1972538edcd2979e806ac6d22a40e260127 /Modules
parent881e43411a39108d3030d791d89a04c8a61ae2ac (diff)
parent7a39cfb012d96a344722a25d6f524f60ff58289b (diff)
downloadCMake-74c29b44a9fab0a06a7455037d89f5c6049dc5cb.zip
CMake-74c29b44a9fab0a06a7455037d89f5c6049dc5cb.tar.gz
CMake-74c29b44a9fab0a06a7455037d89f5c6049dc5cb.tar.bz2
Merge topic 'doc-libfun'
7a39cfb012 Help Check{Function,Library}Exists refer to CheckSourceCompiles Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9773
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CheckFunctionExists.cmake9
-rw-r--r--Modules/CheckLibraryExists.cmake9
2 files changed, 9 insertions, 9 deletions
diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake
index e7c47a4..76fa76a 100644
--- a/Modules/CheckFunctionExists.cmake
+++ b/Modules/CheckFunctionExists.cmake
@@ -5,7 +5,7 @@
CheckFunctionExists
-------------------
-Check if a C function can be linked
+Check once if a C function can be linked from system libraries.
.. command:: check_function_exists
@@ -14,8 +14,7 @@ Check if a C function can be linked
check_function_exists(<function> <variable>)
Checks that the ``<function>`` is provided by libraries on the system and store
- the result in a ``<variable>``, which will be created as an internal
- cache variable.
+ the result in internal cache variable ``<variable>``.
The following variables may be set before calling this macro to modify the
way the check is run:
@@ -34,8 +33,8 @@ way the check is run:
.. note::
- Prefer using :Module:`CheckSymbolExists` instead of this module,
- for the following reasons:
+ Prefer using :module:`CheckSymbolExists` or :module:`CheckSourceCompiles`
+ instead of this module, for the following reasons:
* ``check_function_exists()`` can't detect functions that are inlined
in headers or specified as a macro.
diff --git a/Modules/CheckLibraryExists.cmake b/Modules/CheckLibraryExists.cmake
index 8340500..d48d7ec 100644
--- a/Modules/CheckLibraryExists.cmake
+++ b/Modules/CheckLibraryExists.cmake
@@ -5,7 +5,7 @@
CheckLibraryExists
------------------
-Check if the function exists.
+Check once if the function exists in system or specified library.
.. command:: CHECK_LIBRARY_EXISTS
@@ -18,10 +18,11 @@ Check if the function exists.
LIBRARY - the name of the library you are looking for
FUNCTION - the name of the function
LOCATION - location where the library should be found
- VARIABLE - variable to store the result
- Will be created as an internal cache variable.
-
+ VARIABLE - internal cache variable to store the result
+Prefer using :module:`CheckSymbolExists` or :module:`CheckSourceCompiles`
+instead of this module for more robust detection if a function is available in
+a library.
The following variables may be set before calling this macro to modify
the way the check is run: