[CMake] CheckSymbolExists / CheckCXXSymbolExists

Thompson, KT kgt at lanl.gov
Fri Sep 7 10:03:01 EDT 2018


Kevin,

I use something like this:

# Is HOST_NAME_MAX available?
include( CheckSymbolExists )
check_symbol_exists( HOST_NAME_MAX “unistd.h winsock2.h” HAVE_HOST_NAME_MAX )

-kt

From: CMake <cmake-bounces at cmake.org> On Behalf Of K. Ebrahimp.
Sent: Friday, September 7, 2018 6:07 AM
To: cmake at cmake.org
Subject: [CMake] CheckSymbolExists / CheckCXXSymbolExists

hi all

can anybody help me with a working example of

CheckSymbolExists / CheckCXXSymbolExists

I want to check if a some define exists in my  header file  example1.h of  clib1  and/or c++lib2

depending on the result I want to add/remove some tests

thanks in advance
Kevin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180907/f8047d20/attachment.html>


More information about the CMake mailing list