CMake: use dedicated function to check function availability
This commit is contained in:
@@ -587,14 +587,11 @@ foreach(func
|
|||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# Check various functions
|
# Check various functions
|
||||||
foreach(func
|
wx_check_funcs(fsync
|
||||||
fsync
|
|
||||||
snprintf vsnprintf strnlen strtoull
|
snprintf vsnprintf strnlen strtoull
|
||||||
setpriority
|
setpriority
|
||||||
|
gettimeofday
|
||||||
)
|
)
|
||||||
string(TOUPPER ${func} func_upper)
|
|
||||||
check_function_exists(${func} HAVE_${func_upper})
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
check_symbol_exists(vsscanf stdio.h HAVE_VSSCANF)
|
check_symbol_exists(vsscanf stdio.h HAVE_VSSCANF)
|
||||||
@@ -643,7 +640,6 @@ cmake_pop_check_state()
|
|||||||
if(HAVE_DLOPEN)
|
if(HAVE_DLOPEN)
|
||||||
check_symbol_exists(dladdr dlfcn.h HAVE_DLADDR)
|
check_symbol_exists(dladdr dlfcn.h HAVE_DLADDR)
|
||||||
endif()
|
endif()
|
||||||
check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
|
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(wxUSE_EPOLL_DISPATCHER OFF)
|
set(wxUSE_EPOLL_DISPATCHER OFF)
|
||||||
|
Reference in New Issue
Block a user