[CMake] Check symbol in header files with dependencies

Rolf Eike Beer eike at sf-mail.de
Thu Feb 5 15:58:38 EST 2015


Am Donnerstag, 5. Februar 2015, 21:12:36 schrieb Alexander Koeppe:
> Hi Cmake user list,
> 
> I have a problem that I need to check the presence of a certain symbol
> in a header file using CHECK_SYMBOL_EXISTS which has several dependencies.
> 
> The check fails because the header file also contains data types that
> require an additional header file to be included by the test program. It
> looks like CHECK_SYMBOL_EXISTS is not capable doing that.

set(CMAKE_REQUIRED_INCLUDES some_header.h other/header.h)
check_symbol_exists(...)

Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150205/a58cac96/attachment.sig>


More information about the CMake mailing list