diff options
author | Hong Xu <hong@topbug.net> | 2019-07-07 22:59:47 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-07-10 13:51:38 (GMT) |
commit | bf2244681b2cbbd2684187e628e00c0600ae4122 (patch) | |
tree | 029b79f114d82bf69da6bc4864665eff7679a1f8 /Modules/CheckSymbolExists.cmake | |
parent | cafaa5883a0ef4371a1435de5e56a7825679bb2b (diff) | |
download | CMake-bf2244681b2cbbd2684187e628e00c0600ae4122.zip CMake-bf2244681b2cbbd2684187e628e00c0600ae4122.tar.gz CMake-bf2244681b2cbbd2684187e628e00c0600ae4122.tar.bz2 |
CheckSymbolExists: Add examples for check_symbol_exists
Add examples in `CheckCXXSymbolExists` too.
Co-Author: Brad King <brad.king@kitware.com>
Diffstat (limited to 'Modules/CheckSymbolExists.cmake')
-rw-r--r-- | Modules/CheckSymbolExists.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake index b9ef808..c2f488a 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) |