summaryrefslogtreecommitdiffstats
path: root/Modules/CheckSymbolExists.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-01-12 13:58:19 (GMT)
committerBrad King <brad.king@kitware.com>2011-01-12 13:58:19 (GMT)
commit840f9c055cba5f587e42b9118d0b9924d396275e (patch)
tree55fba25f56e178ea9f8df9d95c4503e3bd8fa27f /Modules/CheckSymbolExists.cmake
parent90e9b65f10f7e96284d2c75907326faef64c669a (diff)
downloadCMake-840f9c055cba5f587e42b9118d0b9924d396275e.zip
CMake-840f9c055cba5f587e42b9118d0b9924d396275e.tar.gz
CMake-840f9c055cba5f587e42b9118d0b9924d396275e.tar.bz2
Document CheckSymbolExists more clearly (#11685)
The check works for macros, functions, and variables, but not for types or enumeration values. Clearly describe the behavior of the check with respect to each symbol type.
Diffstat (limited to 'Modules/CheckSymbolExists.cmake')
-rw-r--r--Modules/CheckSymbolExists.cmake17
1 files changed, 12 insertions, 5 deletions
diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake
index 40910f2..2237f35 100644
--- a/Modules/CheckSymbolExists.cmake
+++ b/Modules/CheckSymbolExists.cmake
@@ -1,9 +1,16 @@
-# - Check if the symbol exists in include files
-# CHECK_SYMBOL_EXISTS(SYMBOL FILES VARIABLE)
+# - Check if a symbol exists as a function, variable, or macro
+# CHECK_SYMBOL_EXISTS(<symbol> <files> <variable>)
#
-# SYMBOL - symbol
-# FILES - include files to check
-# VARIABLE - variable to return result
+# Check that the <symbol> is available after including given header
+# <files> and store the result in a <variable>. Specify the list
+# of files in one argument as a semicolon-separated list.
+#
+# If the header files define the symbol as a macro it is considered
+# available and assumed to work. If the header files declare the
+# symbol as a function or variable then the symbol must also be
+# available for linking. If the symbol is a type or enum value
+# it will not be recognized (consider using CheckTypeSize or
+# CheckCSourceCompiles).
#
# The following variables may be set before calling this macro to
# modify the way the check is run: