From 3c368408fb04980daba6f68b7a064a0d90d7a706 Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Sat, 1 Aug 2020 11:39:12 +0200 Subject: [PATCH] CMake: use dedicated function to check function availability --- build/cmake/setup.cmake | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/build/cmake/setup.cmake b/build/cmake/setup.cmake index 1272e3de49..37c6af78d2 100644 --- a/build/cmake/setup.cmake +++ b/build/cmake/setup.cmake @@ -587,14 +587,11 @@ foreach(func endforeach() # Check various functions -foreach(func - fsync - snprintf vsnprintf strnlen strtoull - setpriority - ) - string(TOUPPER ${func} func_upper) - check_function_exists(${func} HAVE_${func_upper}) -endforeach() +wx_check_funcs(fsync + snprintf vsnprintf strnlen strtoull + setpriority + gettimeofday + ) if(MSVC) check_symbol_exists(vsscanf stdio.h HAVE_VSSCANF) @@ -643,7 +640,6 @@ cmake_pop_check_state() if(HAVE_DLOPEN) check_symbol_exists(dladdr dlfcn.h HAVE_DLADDR) endif() -check_function_exists(gettimeofday HAVE_GETTIMEOFDAY) if(APPLE) set(wxUSE_EPOLL_DISPATCHER OFF)