From 2b5a53c880709433909547c38e04553f8421e23e Mon Sep 17 00:00:00 2001 From: Sergiu Deitsch Date: Tue, 9 Jan 2024 20:05:22 +0100 Subject: [PATCH] cmake: replace check_function_exists by check_cxx_symbol_exists (#1054) --- CMakeLists.txt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8248b0d..be281cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,6 @@ list (APPEND CMAKE_MODULE_PATH ${glog_SOURCE_DIR}/cmake) include (CheckCXXSourceCompiles) include (CheckCXXSourceRuns) include (CheckCXXSymbolExists) -include (CheckFunctionExists) include (CheckIncludeFileCXX) include (CheckStructHasMember) include (CheckTypeSize) @@ -141,12 +140,12 @@ check_include_file_cxx (unistd.h HAVE_UNISTD_H) check_type_size (mode_t HAVE_MODE_T LANGUAGE CXX) check_type_size (ssize_t HAVE_SSIZE_T LANGUAGE CXX) -check_function_exists (dladdr HAVE_DLADDR) -check_function_exists (fcntl HAVE_FCNTL) -check_function_exists (pread HAVE_PREAD) -check_function_exists (pwrite HAVE_PWRITE) -check_function_exists (sigaction HAVE_SIGACTION) -check_function_exists (sigaltstack HAVE_SIGALTSTACK) +check_cxx_symbol_exists (dladdr dlfcn.h HAVE_DLADDR) +check_cxx_symbol_exists (fcntl fcntl.h HAVE_FCNTL) +check_cxx_symbol_exists (pread unistd.h HAVE_PREAD) +check_cxx_symbol_exists (pwrite unistd.h HAVE_PWRITE) +check_cxx_symbol_exists (sigaction csignal HAVE_SIGACTION) +check_cxx_symbol_exists (sigaltstack csignal HAVE_SIGALTSTACK) check_cxx_symbol_exists (backtrace execinfo.h HAVE_EXECINFO_BACKTRACE) check_cxx_symbol_exists (backtrace_symbols execinfo.h