cmake check_cxx_symbol_exists() examples

apache/arrow cpp/cmake_modules/ThirdpartyToolchain.cmake :1240

check_cxx_symbol_exists("_M_ARM64" "" WIN32_ARM64_TARGET)

apache/arrow cpp/cmake_modules/ThirdpartyToolchain.cmake :1245

check_cxx_symbol_exists("__SIZEOF_INT128__" "" ARROW_USE_NATIVE_INT128)

OpenChemistry/avogadrolibs cmake/CheckCXXSymbolExists.cmake :2

# CHECK_CXX_SYMBOL_EXISTS(<symbol> <files> <variable>)

OpenChemistry/avogadrolibs cmake/CheckCXXSymbolExists.cmake :7

# CHECK_CXX_SYMBOL_EXISTS() can be used to check in C++ files, as opposed

OpenChemistry/avogadrolibs cmake/CheckSymbolExists.cmake :14

# If the check needs to be done in C++, consider using CHECK_CXX_SYMBOL_EXISTS(),

OpenChemistry/avogadrolibs tests/CMakeLists.txt :17

check_cxx_symbol_exists(GTEST_HAS_PTHREAD "gtest/gtest.h" GTEST_HAS_PTHREAD)

OpenChemistry/avogadrolibs tests/CMakeLists.txt :18

check_cxx_symbol_exists(GTEST_IS_THREADSAFE "gtest/gtest.h" GTEST_IS_THREADSAFE)

mono/corert src/Native/Runtime/unix/configure.cmake :41

check_cxx_symbol_exists(_SC_PHYS_PAGES unistd.h HAVE__SC_PHYS_PAGES)

mono/corert src/Native/Runtime/unix/configure.cmake :42

check_cxx_symbol_exists(_SC_AVPHYS_PAGES unistd.h HAVE__SC_AVPHYS_PAGES)

cpputest/cpputest CMakeLists.txt :85

check_cxx_symbol_exists(fopen_s "stdio.h" CPPUTEST_HAVE_SECURE_STDLIB)

cpputest/cpputest CMakeLists.txt :114

check_cxx_symbol_exists(kill "signal.h" CPPUTEST_HAVE_KILL)

cpputest/cpputest CMakeLists.txt :115

check_cxx_symbol_exists(fork "unistd.h" CPPUTEST_HAVE_FORK)

cpputest/cpputest CMakeLists.txt :116

check_cxx_symbol_exists(waitpid "sys/wait.h" CPPUTEST_HAVE_WAITPID)

cpputest/cpputest CMakeLists.txt :117

check_cxx_symbol_exists(gettimeofday "sys/time.h" CPPUTEST_HAVE_GETTIMEOFDAY)

cpputest/cpputest CMakeLists.txt :118

check_cxx_symbol_exists(pthread_mutex_lock "pthread.h" CPPUTEST_HAVE_PTHREAD_MUTEX_LOCK)

cpputest/cpputest CMakeLists.txt :121

check_cxx_symbol_exists(strdup "string.h" CPPUTEST_HAVE_STRDUP)

Exiv2/exiv2 cmake/generateConfigFile.cmake :28

check_cxx_symbol_exists(strerror_r  string.h       EXV_HAVE_STRERROR_R )

Exiv2/exiv2 cmake/mainSetup.cmake :36

check_cxx_symbol_exists(_UCRT "ctime" USES_UCRT)

google/flatbuffers CMakeLists.txt :102

check_cxx_symbol_exists(_strtof_l stdlib.h FLATBUFFERS_HAS_STRTOF_L)

google/flatbuffers CMakeLists.txt :103

check_cxx_symbol_exists(_strtoui64_l stdlib.h FLATBUFFERS_HAS_STRTOULL_L)

google/flatbuffers CMakeLists.txt :105

check_cxx_symbol_exists(strtof_l stdlib.h FLATBUFFERS_HAS_STRTOF_L)

google/flatbuffers CMakeLists.txt :106

check_cxx_symbol_exists(strtoull_l stdlib.h FLATBUFFERS_HAS_STRTOULL_L)

facebook/folly CMake/folly-deps.cmake :170

check_cxx_symbol_exists(swapcontext ucontext.h FOLLY_HAVE_SWAPCONTEXT)

emcrisostomo/fswatch CMakeLists.txt :56

check_cxx_symbol_exists(getopt_long getopt.h HAVE_GETOPT_LONG)

emcrisostomo/fswatch libfswatch/CMakeLists.txt :113

check_cxx_symbol_exists(FindFirstChangeNotification windows.h HAVE_WINDOWS_HEADER)

KDAB/GammaRay CMakeLists.txt :532

check_cxx_symbol_exists(QT_NO_OPENGL "QOpenGLContext" QT_NO_OPENGL)

KDAB/GammaRay CMakeLists.txt :606

check_cxx_symbol_exists(abi::__cxa_demangle cxxabi.h HAVE_CXA_DEMANGLE)

gflags/gflags CMakeLists.txt :314

check_cxx_symbol_exists (strtoll stdlib.h HAVE_STRTOLL)

gflags/gflags CMakeLists.txt :316

check_cxx_symbol_exists (strtoq stdlib.h HAVE_STRTOQ)

google/glog CMakeLists.txt :96

check_cxx_symbol_exists (_Unwind_Backtrace unwind.h HAVE__UNWIND_BACKTRACE)

google/glog CMakeLists.txt :97

check_cxx_symbol_exists (_Unwind_GetIP unwind.h HAVE__UNWIND_GETIP)

google/glog CMakeLists.txt :99

check_cxx_symbol_exists (unw_get_reg libunwind.h HAVE_UNW_GET_REG)

google/glog CMakeLists.txt :100

check_cxx_symbol_exists (unw_getcontext libunwind.h HAVE_UNW_GETCONTEXT)

google/glog CMakeLists.txt :101

check_cxx_symbol_exists (unw_init_local libunwind.h HAVE_UNW_INIT_LOCAL)

google/glog CMakeLists.txt :102

check_cxx_symbol_exists (unw_step libunwind.h HAVE_UNW_STEP)

google/glog CMakeLists.txt :147

check_cxx_symbol_exists (dladdr dlfcn.h HAVE_DLADDR)

google/glog CMakeLists.txt :148

check_cxx_symbol_exists (fcntl fcntl.h HAVE_FCNTL)

google/glog CMakeLists.txt :149

check_cxx_symbol_exists (posix_fadvise fcntl.h HAVE_POSIX_FADVISE)

google/glog CMakeLists.txt :150

check_cxx_symbol_exists (pread unistd.h HAVE_PREAD)

google/glog CMakeLists.txt :151

check_cxx_symbol_exists (pwrite unistd.h HAVE_PWRITE)

google/glog CMakeLists.txt :152

check_cxx_symbol_exists (sigaction csignal HAVE_SIGACTION)

google/glog CMakeLists.txt :153

check_cxx_symbol_exists (sigaltstack csignal HAVE_SIGALTSTACK)

google/glog CMakeLists.txt :155

check_cxx_symbol_exists (backtrace execinfo.h HAVE_EXECINFO_BACKTRACE)

google/glog CMakeLists.txt :156

check_cxx_symbol_exists (backtrace_symbols execinfo.h
  HAVE_EXECINFO_BACKTRACE_SYMBOLS)

google/glog CMakeLists.txt :158

check_cxx_symbol_exists (_chsize_s io.h HAVE__CHSIZE_S)

google/glog CMakeLists.txt :162

check_cxx_symbol_exists (UnDecorateSymbolName "windows.h;dbghelp.h" HAVE_DBGHELP)

google/glog CMakeLists.txt :168

check_cxx_symbol_exists (abi::__cxa_demangle cxxabi.h HAVE___CXA_DEMANGLE)

google/glog CMakeLists.txt :171

check_cxx_symbol_exists (__argv cstdlib HAVE___ARGV)

google/glog CMakeLists.txt :172

check_cxx_symbol_exists (getprogname cstdlib HAVE_GETPROGNAME)

google/glog CMakeLists.txt :173

check_cxx_symbol_exists (program_invocation_short_name cerrno HAVE_PROGRAM_INVOCATION_SHORT_NAME)

google/glog CMakeLists.txt :294

check_cxx_symbol_exists (gmtime_r "cstdlib;ctime" HAVE_GMTIME_R)

google/glog CMakeLists.txt :295

check_cxx_symbol_exists (localtime_r "cstdlib;ctime" HAVE_LOCALTIME_R)

igraph/igraph etc/cmake/pkgconfig_helpers.cmake :32

check_cxx_symbol_exists(_LIBCPP_VERSION "vector" USING_LIBCXX)

igraph/igraph etc/cmake/pkgconfig_helpers.cmake :33

check_cxx_symbol_exists(__GLIBCXX__ "vector" USING_LIBSTDCXX)

dscharrer/innoextract cmake/BuildType.cmake :6

check_cxx_symbol_exists(_LIBCPP_VERSION "cstddef" IS_LIBCXX)

dscharrer/innoextract cmake/BuildType.cmake :8

check_cxx_symbol_exists(_LIBCPP_HARDENING_MODE "version" ARX_HAVE_LIBCPP_HARDENING_MODE)

dscharrer/innoextract cmake/BuildType.cmake :10

check_cxx_symbol_exists(_LIBCPP_ENABLE_HARDENED_MODE "version" ARX_HAVE_LIBCPP_ENABLE_HARDENED_MODE)

dscharrer/innoextract cmake/BuildType.cmake :12

check_cxx_symbol_exists(_LIBCPP_ENABLE_ASSERTIONS "version" ARX_HAVE_LIBCPP_ENABLE_ASSERTIONS)

InsightSoftwareConsortium/ITK Modules/ThirdParty/VNL/src/vxl/config/cmake/config/VXLIntrospectionConfig.cmake :376

CHECK_CXX_SYMBOL_EXISTS(${SYMBOL} ${PLFM_TEST_FILE} ${VARIABLE})

lammps/lammps lib/kokkos/cmake/kokkos_arch.cmake :656

check_cxx_symbol_exists(__AVX512F__ "" KOKKOS_COMPILER_HAS_AVX512)

lammps/lammps lib/kokkos/cmake/kokkos_arch.cmake :658

check_cxx_symbol_exists(__AVX2__ "" KOKKOS_COMPILER_HAS_AVX2)

lammps/lammps lib/kokkos/cmake/kokkos_arch.cmake :660

check_cxx_symbol_exists(__ARM_NEON "" KOKKOS_COMPILER_HAS_ARM_NEON)

lammps/lammps lib/kokkos/cmake/kokkos_arch.cmake :662

check_cxx_symbol_exists(__AVX__ "" KOKKOS_COMPILER_HAS_AVX)

lammps/lammps lib/kokkos/cmake/kokkos_arch.cmake :749

check_cxx_symbol_exists(SYCL_EXT_ONEAPI_DEVICE_GLOBAL "sycl/sycl.hpp" KOKKOS_IMPL_HAVE_SYCL_EXT_ONEAPI_DEVICE_GLOBAL)

lammps/lammps lib/kokkos/cmake/kokkos_arch.cmake :781

check_cxx_symbol_exists(SYCL_EXT_ONEAPI_GRAPH "sycl/sycl.hpp" KOKKOS_IMPL_HAVE_SYCL_EXT_ONEAPI_GRAPH)

google/leveldb CMakeLists.txt :47

# Using check_cxx_symbol_exists() instead of check_c_symbol_exists() because

google/leveldb CMakeLists.txt :52

check_cxx_symbol_exists(fdatasync "unistd.h" HAVE_FDATASYNC)

google/leveldb CMakeLists.txt :53

check_cxx_symbol_exists(F_FULLFSYNC "fcntl.h" HAVE_FULLFSYNC)

google/leveldb CMakeLists.txt :54

check_cxx_symbol_exists(O_CLOEXEC "fcntl.h" HAVE_O_CLOEXEC)

strukturag/libheif CMakeLists.txt :483

check_cxx_symbol_exists(_LIBCPP_VERSION cstdlib HAVE_LIBCPP)

libjxl/libjxl lib/CMakeLists.txt :173

check_cxx_symbol_exists(__GLIBCXX__ iostream LIBSTDCXX)

libjxl/libjxl lib/CMakeLists.txt :174

check_cxx_symbol_exists(_LIBCPP_VERSION iostream LIBCXX)

rui314/mold third-party/blake3/c/CMakeLists.txt :246

check_cxx_symbol_exists(_LIBCPP_VERSION "version" BLAKE3_HAVE_LIBCPP)

rui314/mold third-party/blake3/c/CMakeLists.txt :247

check_cxx_symbol_exists(__GLIBCXX__ "version" BLAKE3_HAVE_GLIBCXX)

munt/munt mt32emu_qt/CMakeLists.txt :116

CHECK_CXX_SYMBOL_EXISTS(clock_nanosleep time.h CLOCK_NANOSLEEP_FOUND)

ngtcp2/ngtcp2 CMakeLists.txt :199

check_cxx_symbol_exists(SSL_set_quic_early_data_context "openssl/ssl.h" HAVE_SSL_SET_QUIC_EARLY_DATA_CONTEXT)

qtwebkit/qtwebkit Source/cmake/OptionsQt.cmake :546

check_cxx_symbol_exists(QT_OPENGL_DYNAMIC qopenglcontext.h HAVE_QT_OPENGL_DYNAMIC)

qtwebkit/qtwebkit Source/ThirdParty/libwebrtc/Source/third_party/gflags/src/CMakeLists.txt :181

check_cxx_symbol_exists (strtoll stdlib.h HAVE_STRTOLL)

qtwebkit/qtwebkit Source/ThirdParty/libwebrtc/Source/third_party/gflags/src/CMakeLists.txt :183

check_cxx_symbol_exists (strtoq stdlib.h HAVE_STRTOQ)

qtwebkit/qtwebkit Source/ThirdParty/libwebrtc/Source/third_party/jsoncpp/source/src/lib_json/CMakeLists.txt :18

check_cxx_symbol_exists(localeconv clocale HAVE_LOCALECONV)

facebook/rocksdb CMakeLists.txt :558

check_cxx_symbol_exists(malloc_usable_size malloc_np.h HAVE_MALLOC_USABLE_SIZE)

facebook/rocksdb CMakeLists.txt :560

check_cxx_symbol_exists(malloc_usable_size malloc.h HAVE_MALLOC_USABLE_SIZE)

facebook/rocksdb CMakeLists.txt :566

check_cxx_symbol_exists(sched_getcpu sched.h HAVE_SCHED_GETCPU)

facebook/rocksdb CMakeLists.txt :571

check_cxx_symbol_exists(getauxval "sys/auxv.h" HAVE_AUXV_GETAUXVAL)

facebook/rocksdb CMakeLists.txt :576

check_cxx_symbol_exists(F_FULLFSYNC "fcntl.h" HAVE_FULLFSYNC)

ossia/score cmake/ScoreConfiguration.cmake :83

check_cxx_symbol_exists(_LIBCPP_VERSION version LLVM_LIBCXX)

ossia/score cmake/ScoreConfiguration.cmake :84

check_cxx_symbol_exists(__GLIBCXX__ version GNU_LIBSTDCXX)

transmission/transmission cmake/FindUTP.cmake :56

check_cxx_symbol_exists(${_UTP_FUNC} libutp/utp.h ${_UTP_FUNC_VAR})

trilinos/Trilinos packages/kokkos/cmake/kokkos_arch.cmake :658

check_cxx_symbol_exists(__AVX512F__ "" KOKKOS_COMPILER_HAS_AVX512)

trilinos/Trilinos packages/kokkos/cmake/kokkos_arch.cmake :660

check_cxx_symbol_exists(__AVX2__ "" KOKKOS_COMPILER_HAS_AVX2)

trilinos/Trilinos packages/kokkos/cmake/kokkos_arch.cmake :662

check_cxx_symbol_exists(__ARM_NEON "" KOKKOS_COMPILER_HAS_ARM_NEON)

trilinos/Trilinos packages/kokkos/cmake/kokkos_arch.cmake :664

check_cxx_symbol_exists(__AVX__ "" KOKKOS_COMPILER_HAS_AVX)

trilinos/Trilinos packages/kokkos/cmake/kokkos_arch.cmake :751

check_cxx_symbol_exists(SYCL_EXT_ONEAPI_DEVICE_GLOBAL "sycl/sycl.hpp" KOKKOS_IMPL_HAVE_SYCL_EXT_ONEAPI_DEVICE_GLOBAL)

trilinos/Trilinos packages/kokkos/cmake/kokkos_arch.cmake :783

check_cxx_symbol_exists(SYCL_EXT_ONEAPI_GRAPH "sycl/sycl.hpp" KOKKOS_IMPL_HAVE_SYCL_EXT_ONEAPI_GRAPH)

uncrustify/uncrustify CMakeLists.txt :126

check_cxx_symbol_exists("${symbol}" "${avail_headers}" ${symbol_var})

uncrustify/uncrustify emscripten/CMakeLists.txt :90

check_cxx_symbol_exists("${symbol}" "${avail_headers}" ${symbol_var})

movableink/webkit Source/cmake/OptionsQt.cmake :546

check_cxx_symbol_exists(QT_OPENGL_DYNAMIC qopenglcontext.h HAVE_QT_OPENGL_DYNAMIC)

movableink/webkit Source/ThirdParty/libwebrtc/Source/third_party/gflags/src/CMakeLists.txt :181

check_cxx_symbol_exists (strtoll stdlib.h HAVE_STRTOLL)

movableink/webkit Source/ThirdParty/libwebrtc/Source/third_party/gflags/src/CMakeLists.txt :183

check_cxx_symbol_exists (strtoq stdlib.h HAVE_STRTOQ)

movableink/webkit Source/ThirdParty/libwebrtc/Source/third_party/jsoncpp/source/src/lib_json/CMakeLists.txt :18

check_cxx_symbol_exists(localeconv clocale HAVE_LOCALECONV)