Warning, /frameworks/kdelibs4support/cmake/modules/CheckPointerMember.cmake is written in an unsupported language. File is not indexed.
0001 # - Check if the given struct or class has the specified member variable 0002 # CHECK_POINTER_MEMBER (POINTER MEMBER HEADER VARIABLE) 0003 # 0004 # POINTER - the name of the struct or class you are interested in 0005 # MEMBER - the member which existence you want to check 0006 # HEADER - the header(s) where the prototype should be declared 0007 # VARIABLE - variable to store the result 0008 # 0009 # The following variables may be set before calling this macro to 0010 # modify the way the check is run: 0011 # 0012 # CMAKE_REQUIRED_FLAGS = string of compile command line flags 0013 # CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) 0014 # CMAKE_REQUIRED_INCLUDES = list of include directories 0015 0016 # Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> 0017 # 0018 # Redistribution and use is allowed according to the terms of the BSD license. 0019 # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 0020 0021 0022 INCLUDE(CheckCXXSourceCompiles) 0023 0024 MACRO (CHECK_POINTER_MEMBER _STRUCT _MEMBER _HEADER _RESULT) 0025 SET(_INCLUDE_FILES) 0026 FOREACH (it ${_HEADER}) 0027 SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n") 0028 ENDFOREACH (it) 0029 0030 SET(_CHECK_POINTER_MEMBER_SOURCE_CODE " 0031 ${_INCLUDE_FILES} 0032 int main() 0033 { 0034 ${_STRUCT} tmp; 0035 tmp->${_MEMBER}; 0036 return 0; 0037 } 0038 ") 0039 CHECK_CXX_SOURCE_COMPILES("${_CHECK_POINTER_MEMBER_SOURCE_CODE}" ${_RESULT}) 0040 0041 ENDMACRO (CHECK_POINTER_MEMBER) 0042