cmake check_symbol_exists() examples

ambrop72/badvpn CMakeLists.txt :155

check_symbol_exists(WSAID_WSARECVMSG "winsock2.h;mswsock.h" HAVE_MSW_2)

ambrop72/badvpn CMakeLists.txt :156

check_symbol_exists(WSAID_ACCEPTEX "winsock2.h;mswsock.h" HAVE_MSW_3)

HEASARC/cfitsio CMakeLists.txt :168

CHECK_SYMBOL_EXISTS(ftruncate "unistd.h" HAVE_FTRUNCATE)

CGNS/CGNS CMakeLists.txt :113

check_symbol_exists(_lseeki64 "io.h" HAVE_LSEEK64)

drowe67/codec2 CMakeLists.txt :152

check_symbol_exists(ceil   math.h   HAVE_CEIL)

drowe67/codec2 CMakeLists.txt :156

check_symbol_exists(cos    math.h   HAVE_COS)

coin3d/coin CMakeLists.txt :646

check_symbol_exists(QueryPerformanceCounter windows.h HAVE_QUERYPERFORMANCECOUNTER)

coin3d/coin CMakeLists.txt :770

check_symbol_exists(va_copy stdarg.h HAVE_VA_COPY_MACRO)

coin3d/coin CMakeLists.txt :788

check_symbol_exists(isinf math.h HAVE_ISINF)

coin3d/coin CMakeLists.txt :808

check_symbol_exists(__func__ "" FUNC)

curl/curl CMakeLists.txt :770

check_symbol_exists("OPENSSL_IS_BORINGSSL" "openssl/base.h" HAVE_BORINGSSL)

curl/curl CMakeLists.txt :773

check_symbol_exists("OPENSSL_IS_AWSLC" "openssl/base.h" HAVE_AWSLC)

curl/curl CMakeLists.txt :900

check_symbol_exists("rustls_supported_hpke" "rustls.h" HAVE_RUSTLS_SUPPORTED_HPKE)

curl/curl CMakeLists.txt :1743

check_symbol_exists("opendir"         "dirent.h" HAVE_OPENDIR)

curl/curl CMakeLists.txt :1745

check_symbol_exists("socket"          "${CURL_INCLUDES}" HAVE_SOCKET)  # winsock2.h sys/socket.h

curl/curl CMakeLists.txt :1773

check_symbol_exists("strerror_r"      "stdlib.h;string.h" HAVE_STRERROR_R)

curl/curl CMakeLists.txt :1776

check_symbol_exists("getaddrinfo"     "${CURL_INCLUDES};stdlib.h;string.h" HAVE_GETADDRINFO)  # ws2tcpip.h sys/socket.h netdb.h

curl/curl CMakeLists.txt :1783

check_symbol_exists("getpeername"     "${CURL_INCLUDES}" HAVE_GETPEERNAME)  # winsock2.h unistd.h proto/bsdsocket.h

curl/curl CMakeLists.txt :1823

check_symbol_exists("inet_pton" "${CURL_INCLUDES};stdlib.h;string.h" HAVE_INET_PTON)  # arpa/inet.h netinet/in.h sys/socket.h

ValveSoftware/ffts CMakeLists.txt :115

check_symbol_exists(_mm_malloc     malloc.h HAVE_DECL__MM_MALLOC)

fltk/fltk CMake/resources.cmake :264

check_symbol_exists(png_get_valid          "png.h"   HAVE_PNG_GET_VALID)

fltk/fltk CMake/resources.cmake :290

check_symbol_exists(trunc        "math.h"        HAVE_TRUNC)

FluidSynth/fluidsynth CMakeLists.txt :805

CHECK_SYMBOL_EXISTS ( fabsf "math.h" HAVE_FABSF )

FluidSynth/fluidsynth CMakeLists.txt :817

CHECK_SYMBOL_EXISTS ( sqrtf "math.h" HAVE_SQRTF )

FluidSynth/fluidsynth CMakeLists.txt :831

CHECK_SYMBOL_EXISTS ( inet_ntop "ws2tcpip.h" HAVE_INETNTOP )

facebook/folly CMake/FollyConfigChecks.cmake :93

check_symbol_exists(accept4 sys/socket.h FOLLY_HAVE_ACCEPT4)

FreeRDP/FreeRDP winpr/CMakeLists.txt :195

check_symbol_exists(backtrace_symbols_fd execinfo.h WINPR_HAVE_EXECINFO_BACKTRACE_SYMBOLS_FD)

KDAB/GammaRay 3rdparty/backward-cpp/BackwardConfig.cmake :66

check_symbol_exists(UNW_INIT_SIGNAL_FRAME libunwind.h HAVE_UNW_INIT_SIGNAL_FRAME)

OSGeo/gdal cmake/helpers/configure.cmake :170

check_symbol_exists(getrandom "sys/random.h" HAVE_GETRANDOM)

OSGeo/gdal ogr/ogrsf_frmts/geojson/libjson/CMakeLists.txt :31

check_symbol_exists(INFINITY    "math.h" HAVE_DECL_INFINITY)

OSGeo/gdal ogr/ogrsf_frmts/geojson/libjson/CMakeLists.txt :32

check_symbol_exists(isinf       "math.h" HAVE_DECL_ISINF)

OSGeo/gdal ogr/ogrsf_frmts/geojson/libjson/CMakeLists.txt :33

check_symbol_exists(isnan       "math.h" HAVE_DECL_ISNAN)

malaterre/GDCM Source/Common/CMakeLists.txt :37

CHECK_SYMBOL_EXISTS(nl_langinfo "langinfo.h" GDCM_HAVE_NL_LANGINFO)

HDFGroup/hdf5 config/ConfigureChecks.cmake :391

CHECK_SYMBOL_EXISTS (TIOCGWINSZ "sys/ioctl.h" ${HDF_PREFIX}_HAVE_TIOCGWINSZ)

HDFGroup/hdf5 config/ConfigureChecks.cmake :973

CHECK_SYMBOL_EXISTS (FLT16_MIN "float.h" h5_have_flt16_min)

igraph/igraph CMakeLists.txt :106

check_symbol_exists(strncasecmp strings.h HAVE_STRNCASECMP)

igraph/igraph CMakeLists.txt :108

check_symbol_exists(_strnicmp string.h HAVE__STRNICMP)

igraph/igraph CMakeLists.txt :118

check_symbol_exists(uselocale locale.h HAVE_USELOCALE)

dscharrer/innoextract CMakeLists.txt :287

check_symbol_exists(ioctl "sys/ioctl.h" INNOEXTRACT_HAVE_IOCTL)

dscharrer/innoextract CMakeLists.txt :313

check_symbol_exists(environ "unistd.h" INNOEXTRACT_HAVE_UNISTD_ENVIRON)

dscharrer/innoextract CMakeLists.txt :337

check_symbol_exists(bswap_32 "byteswap.h" INNOEXTRACT_HAVE_BSWAP_32)

InsightSoftwareConsortium/ITK Modules/ThirdParty/Expat/src/expat/ConfigureChecks.cmake :23

check_symbol_exists("getrandom" "sys/random.h" HAVE_GETRANDOM)

InsightSoftwareConsortium/ITK Modules/ThirdParty/Expat/src/expat/ConfigureChecks.cmake :33

check_symbol_exists("arc4random" "${_bsd}stdlib.h" HAVE_ARC4RANDOM)

InsightSoftwareConsortium/ITK Modules/ThirdParty/GDCM/src/gdcm/Source/Common/CMakeLists.txt :42

CHECK_SYMBOL_EXISTS(strncasecmp "strings.h" GDCM_HAVE_STRNCASECMP)

InsightSoftwareConsortium/ITK Modules/ThirdParty/GDCM/src/gdcm/Source/Common/CMakeLists.txt :57

CHECK_SYMBOL_EXISTS(json_object_object_get_ex "json.h" GDCM_HAVE_JSON_OBJECT_OBJECT_GET_EX)

InsightSoftwareConsortium/ITK Modules/ThirdParty/HDF5/src/itkhdf5/CMakeLists.txt :801

CHECK_SYMBOL_EXISTS (MPI_Comm_split_type "mpi.h" H5_HAVE_MPI_Comm_split_type)

InsightSoftwareConsortium/ITK Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/ConfigureChecks.cmake :606

CHECK_SYMBOL_EXISTS (O_DIRECT "fcntl.h" HAVE_O_DIRECT)

InsightSoftwareConsortium/ITK Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/ConfigureChecks.cmake :915

CHECK_SYMBOL_EXISTS (FLT16_EPSILON "float.h" h5_have_flt16_epsilon)

InsightSoftwareConsortium/ITK Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/ConfigureChecks.cmake :917

CHECK_SYMBOL_EXISTS (FLT16_MAX "float.h" h5_have_flt16_max)

InsightSoftwareConsortium/ITK Modules/ThirdParty/MINC/src/libminc/CMakeLists.txt :150

CHECK_SYMBOL_EXISTS(fabsf    "math.h" HAVE_FABSF)

InsightSoftwareConsortium/ITK Modules/ThirdParty/TIFF/src/itktiff/cmake/FindCMath.cmake :33

check_symbol_exists(pow "math.h" CMath_HAVE_LIBC_POW)

InsightSoftwareConsortium/ITK Modules/ThirdParty/TIFF/src/itktiff/cmake/FindCMath.cmake :40

check_symbol_exists(pow "math.h" CMath_HAVE_LIBM_POW)

3MFConsortium/lib3mf Libraries/libressl/CMakeLists.txt :267

check_symbol_exists(getpagesize unistd.h HAVE_GETPAGESIZE)

ebiggers/libdeflate programs/CMakeLists.txt :14

check_symbol_exists(futimens "fcntl.h;sys/stat.h" HAVE_FUTIMENS)

libevent/libevent CMakeLists.txt :579

CHECK_SYMBOL_EXISTS("__func__"     "" EVENT__HAVE___func__)

libsndfile/libsndfile cmake/SndFileChecks.cmake :167

check_symbol_exists (S_IRGRP sys/stat.h HAVE_DECL_S_IRGRP)

rui314/mold third-party/tbb/cmake/resumable_tasks.cmake :23

check_symbol_exists("getcontext" "ucontext.h" _tbb_have_ucontext)

neovim/neovim config/CMakeLists.txt :75

check_symbol_exists(FD_CLOEXEC "fcntl.h" HAVE_FD_CLOEXEC)

neovim/neovim config/CMakeLists.txt :77

check_symbol_exists(CODESET "langinfo.h" HAVE_NL_LANGINFO_CODESET)

nghttp2/nghttp2 CMakeLists.txt :376

check_symbol_exists(initgroups grp.h HAVE_DECL_INITGROUPS)

nghttp2/nghttp2 CMakeLists.txt :385

check_symbol_exists(CLOCK_MONOTONIC "time.h" HAVE_DECL_CLOCK_MONOTONIC)

ngtcp2/nghttp3 CMakeLists.txt :91

check_symbol_exists(be64toh "endian.h" HAVE_DECL_BE64TOH)

nanomsg/nng cmake/FindMbedTLS.cmake :78

check_symbol_exists(mbedtls_ssl_init "mbedtls/ssl.h" _MBEDTLS_V2_OR_NEWER)

openbabel/openbabel CMakeLists.txt :226

check_symbol_exists(strncasecmp      "string.h"   HAVE_STRNCASECMP)

opencv/opencv CMakeLists.txt :759

CHECK_SYMBOL_EXISTS(memalign malloc.h HAVE_MEMALIGN)

opencv/opencv CMakeLists.txt :765

CHECK_SYMBOL_EXISTS(getauxval sys/auxv.h HAVE_GETAUXVAL)

opencv/opencv 3rdparty/openjpeg/CMakeLists.txt :153

check_symbol_exists(posix_memalign stdlib.h OPJ_HAVE_POSIX_MEMALIGN)

uclouvain/openjpeg CMakeLists.txt :206

check_symbol_exists(_aligned_malloc malloc.h OPJ_HAVE__ALIGNED_MALLOC)

uclouvain/openjpeg CMakeLists.txt :209

check_symbol_exists(posix_memalign stdlib.h OPJ_HAVE_POSIX_MEMALIGN)

uclouvain/openjpeg thirdparty/libtiff/CMakeLists.txt :164

CHECK_SYMBOL_EXISTS(sqrt "math.h" HAVE_SQRT)

uclouvain/openjpeg thirdparty/libtiff/CMakeLists.txt :165

CHECK_SYMBOL_EXISTS(pow "math.h" HAVE_POW)

ICLDisco/parsec CMakeLists.txt :526

check_symbol_exists(RUSAGE_THREAD sys/resource.h PARSEC_HAVE_RUSAGE_THREAD)

ICLDisco/parsec cmake_modules/CheckAtomicIntrinsic.cmake :386

check_symbol_exists(InterlockedCompareExchange64 "windows.h" PARSEC_HAVE_COMPARE_AND_SWAP_64)

libressl/portable CMakeLists.txt :229

check_symbol_exists(getdelim "stdio.h" HAVE_GETDELIM)

libressl/portable CMakeLists.txt :288

check_symbol_exists(strtonum "stdlib.h" HAVE_STRTONUM)

libressl/portable CMakeLists.txt :293

check_symbol_exists(arc4random_buf "stdlib.h" HAVE_ARC4RANDOM_BUF)

libressl/portable CMakeLists.txt :308

check_symbol_exists(getauxval "sys/auxv.h" HAVE_GETAUXVAL)

libressl/portable CMakeLists.txt :324

check_symbol_exists(getprogname "stdlib.h" HAVE_GETPROGNAME)

qhull/qhull build/CMakeModules/CheckLFS.cmake :34

check_symbol_exists("PRIdMAX" "inttypes.h" HAVE_PRIDMAX)

qpdf/qpdf libqpdf/CMakeLists.txt :321

check_symbol_exists(localtime_r "time.h" HAVE_LOCALTIME_R)

ossia/score src/app/CMakeLists.txt :190

check_symbol_exists(fftw_make_planner_thread_safe ${FFTW_LIBRARY} FFTW_HAS_THREADS)

coin3d/simvoleon CMakeLists.txt :199

check_symbol_exists(LoadLibrary windows.h HAVE_WIN32_LOADLIBRARY)

coin3d/soqt CMakeLists.txt :280

check_symbol_exists(__func__ "" FUNC)

gabime/spdlog CMakeLists.txt :247

check_symbol_exists(_fwrite_nolock "stdio.h" HAVE_FWRITE_UNLOCKED)

Haivision/srt scripts/FindPThreadGetSetName.cmake :43

check_symbol_exists(
   pthread_getname_np "pthread_np.h" HAVE_PTHREAD_GETNAME_NP_IN_PTHREAD_NP_H)

Haivision/srt scripts/FindPThreadGetSetName.cmake :55

check_symbol_exists(pthread_getname_np "pthread.h" HAVE_PTHREAD_GETNAME_NP)

Haivision/srt scripts/FindPThreadGetSetName.cmake :59

check_symbol_exists(pthread_setname_np "pthread.h" HAVE_PTHREAD_SETNAME_NP)

DrTimothyAldenDavis/SuiteSparse GraphBLAS/CMakeLists.txt :415

check_symbol_exists ( getauxval "sys/auxv.h" HAVE_STRONG_GETAUXVAL )

DrTimothyAldenDavis/SuiteSparse GraphBLAS/CMakeLists.txt :435

check_symbol_exists ( fmax "math.h" NO_LIBM )

DrTimothyAldenDavis/SuiteSparse GraphBLAS/GraphBLAS/CMakeLists.txt :305

check_symbol_exists ( getauxval "sys/auxv.h" HAVE_STRONG_GETAUXVAL )

apple/swift CMakeLists.txt :1462

check_symbol_exists(el_wgets "histedit.h" HAVE_EL_WGETS)

apple/swift tools/SourceKit/CMakeLists.txt :27

check_symbol_exists(dispatch_block_create "dispatch/dispatch.h" HAVE_DISPATCH_BLOCK_CREATE)

kisli/vmime CMakeLists.txt :857

CHECK_SYMBOL_EXISTS(SO_NOSIGPIPE sys/socket.h VMIME_HAVE_SO_NOSIGPIPE)

kisli/vmime CMakeLists.txt :861

CHECK_SYMBOL_EXISTS(strerror_r string.h VMIME_HAVE_STRERROR_R)

WebAssembly/wabt CMakeLists.txt :203

check_symbol_exists(__SSE2_MATH__ "" HAVE_SSE2_MATH)

wxWidgets/wxWidgets build/cmake/setup.cmake :320

check_symbol_exists(usleep unistd.h HAVE_USLEEP)

wxWidgets/wxWidgets build/cmake/setup.cmake :354

check_symbol_exists(getgrgid_r grp.h HAVE_GETGRGID_R)

wxWidgets/wxWidgets build/cmake/setup.cmake :369

check_symbol_exists(gethostbyname_r netdb.h HAVE_GETHOSTBYNAME_R)

wxWidgets/wxWidgets build/cmake/setup.cmake :521

check_symbol_exists(${func} wchar.h HAVE_${func_upper})

wxWidgets/wxWidgets build/cmake/modules/FindGTK3.cmake :49

check_symbol_exists(GDK_WINDOWING_X11 "gdk/gdk.h" wxHAVE_GDK_X11)