summaryrefslogtreecommitdiff
path: root/Modules/CheckSymbolExists.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/CheckSymbolExists.cmake')
-rw-r--r--Modules/CheckSymbolExists.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake
index b9ef8088f1..c2f488aee2 100644
--- a/Modules/CheckSymbolExists.cmake
+++ b/Modules/CheckSymbolExists.cmake
@@ -45,6 +45,17 @@ the way the check is run:
command. See policy :policy:`CMP0075`.
``CMAKE_REQUIRED_QUIET``
execute quietly without messages.
+
+For example:
+
+.. code-block:: cmake
+
+ include(CheckSymbolExists)
+
+ # Check for macro SEEK_SET
+ check_symbol_exists(SEEK_SET "stdio.h" HAVE_SEEK_SET)
+ # Check for function fopen
+ check_symbol_exists(fopen "stdio.h" HAVE_FOPEN)
#]=======================================================================]
include_guard(GLOBAL)