diff --git a/Modules/CheckStructHasMember.cmake b/Modules/CheckStructHasMember.cmake index a088202b6c..4ced2482af 100644 --- a/Modules/CheckStructHasMember.cmake +++ b/Modules/CheckStructHasMember.cmake @@ -7,21 +7,25 @@ CheckStructHasMember Check if the given struct or class has the specified member variable -.. command:: CHECK_STRUCT_HAS_MEMBER +.. command:: check_struct_has_member .. code-block:: cmake - CHECK_STRUCT_HAS_MEMBER(
+ check_struct_has_member( [LANGUAGE ]) - :: + Check that the struct or class ```` has the specified ```` + after including the given header(s) ```` where the prototype should + be declared. Specify the list of header files in one argument as a + semicolon-separated list. The result is stored in an internal cache variable + ````. - - the name of the struct or class you are interested in - - the member which existence you want to check -
- the header(s) where the prototype should be declared - - variable to store the result - - the compiler to use (C or CXX) + The options are: + ``LANGUAGE `` + Use the ```` compiler to perform the check. + Acceptable values are ``C`` and ``CXX``. + If not specified, it defaults to ``C``. The following variables may be set before calling this macro to modify the way the check is run: @@ -40,12 +44,14 @@ the way the check is run: .. include:: /module/CMAKE_REQUIRED_QUIET.txt - -Example: +Example +^^^^^^^ .. code-block:: cmake - CHECK_STRUCT_HAS_MEMBER("struct timeval" tv_sec sys/select.h + include(CheckStructHasMember) + + check_struct_has_member("struct timeval" tv_sec sys/select.h HAVE_TIMEVAL_TV_SEC LANGUAGE C) #]=======================================================================]