diff options
author | David Cole <david.cole@kitware.com> | 2012-08-20 19:38:33 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-08-20 19:38:33 (GMT) |
commit | 5cf828c028daa6f6f22ba2ce4a480a7714eda4cf (patch) | |
tree | 2cc63ab2c1c7febbcd27fc744af96484afd90742 /Modules | |
parent | 686eb4e8150cbfc30f981c13b255be9ad2a24050 (diff) | |
parent | c6fed68ef87303aa9db32cdd7d830fe42659d769 (diff) | |
download | CMake-5cf828c028daa6f6f22ba2ce4a480a7714eda4cf.zip CMake-5cf828c028daa6f6f22ba2ce4a480a7714eda4cf.tar.gz CMake-5cf828c028daa6f6f22ba2ce4a480a7714eda4cf.tar.bz2 |
Merge topic 'CheckTypeSize-doc-10579'
c6fed68 CheckTypeSize: add a test for size of struct members
48783b7 CheckTypeSize: show in documentation how to get struct member size (#10579)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CheckTypeSize.cmake | 5 |
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: # |