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-boun...@cmake.org> On Behalf Of K. Ebrahimp.
Sent: Friday, September 7, 2018 6:07 AM
To: cmake@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

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to