summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2012-08-13 16:58:30 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2012-08-14 19:14:33 (GMT)
commit48783b71fb127f46860ed5bed605c85eda1303a2 (patch)
tree938ddcac40d420f5a7a801ae2f2b0bda7f1d343b /Modules
parentcd3bd23266a4a6c00595134a17a8bdaea9e28af5 (diff)
downloadCMake-48783b71fb127f46860ed5bed605c85eda1303a2.zip
CMake-48783b71fb127f46860ed5bed605c85eda1303a2.tar.gz
CMake-48783b71fb127f46860ed5bed605c85eda1303a2.tar.bz2
CheckTypeSize: show in documentation how to get struct member size (#10579)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CheckTypeSize.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake
index 1b9dc9f..7285b8a 100644
--- a/Modules/CheckTypeSize.cmake
+++ b/Modules/CheckTypeSize.cmake
@@ -24,6 +24,11 @@
# size check automatically includes the available headers, thus
# supporting checks of types defined in the headers.
#
+# Despite the name of the macro you may use it to check the size of
+# more complex expressions, too. To check e.g. for the size of a struct
+# member you can do something like this:
+# check_type_size("((struct something*)0)->member" SIZEOF_MEMBER)
+#
# The following variables may be set before calling this macro to
# modify the way the check is run:
#