Spec-Zone.ru › CMake 3.10

CheckStructHasMember

Проверка наличия указанного члена переменной в структуре или классе.

CHECK_STRUCT_HAS_MEMBER(<struct> <member> <header> <variable>
                        [LANGUAGE <language>])
<struct> - the name of the struct or class you are interested in
<member> - the member which existence you want to check
<header> - the header(s) where the prototype should be declared
<variable> - variable to store the result
<language> - the compiler to use (C or CXX)

Следующие переменные можно установить перед вызовом этой макрокоманды, чтобы изменить способ выполнения проверки:

CMAKE_REQUIRED_FLAGS = string of compile command line flags
CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
CMAKE_REQUIRED_INCLUDES = list of include directories
CMAKE_REQUIRED_LIBRARIES = list of libraries to link
CMAKE_REQUIRED_QUIET = execute quietly without messages

Пример: CHECK_STRUCT_HAS_MEMBER(“struct timeval” tv_sec sys/select.h HAVE_TIMEVAL_TV_SEC LANGUAGE C)

© 2000–2019 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/v3.10/module/CheckStructHasMember.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API