← Commit list

e25e497c5e

Viktor Szakats
Viktor Szakats
2026-05-13
SUCCESS Duration: 281s

Subject

cmake: merge `if` blocks (tidy-up)

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

CMakeLists.txt+9 -12
@@ -1653,7 +1653,9 @@ check_function_exists("getrlimit" HAVE_GETRLIMIT)
check_function_exists("setlocale" HAVE_SETLOCALE)
check_function_exists("setrlimit" HAVE_SETRLIMIT)
-if(NOT APPLE)
+if(APPLE)
+ check_function_exists("mach_absolute_time" HAVE_MACH_ABSOLUTE_TIME)
+else()
# Apple platforms do not offer pipe2(), but the iPhone Simulator-specific
# /usr/lib/system/libsystem_sim_kernel.dylib exports it. To avoid false
# detection, omit this feature check for Apple targets.
@@ -1664,9 +1666,12 @@ if(NOT WIN32)
check_function_exists("if_nametoindex" HAVE_IF_NAMETOINDEX) # net/if.h
check_function_exists("realpath" HAVE_REALPATH)
check_function_exists("sched_yield" HAVE_SCHED_YIELD)
- check_symbol_exists("strcasecmp" "string.h" HAVE_STRCASECMP)
- check_symbol_exists("stricmp" "string.h" HAVE_STRICMP)
- check_symbol_exists("strcmpi" "string.h" HAVE_STRCMPI)
+
+ check_symbol_exists("inet_ntop" "${CURL_INCLUDES};stdlib.h;string.h" HAVE_INET_NTOP) # arpa/inet.h netinet/in.h sys/socket.h
+ check_symbol_exists("inet_pton" "${CURL_INCLUDES};stdlib.h;string.h" HAVE_INET_PTON) # arpa/inet.h netinet/in.h sys/socket.h
+ check_symbol_exists("strcasecmp" "string.h" HAVE_STRCASECMP)
+ check_symbol_exists("stricmp" "string.h" HAVE_STRICMP)
+ check_symbol_exists("strcmpi" "string.h" HAVE_STRCMPI)
endif()
if(AMIGA)
@@ -1677,14 +1682,6 @@ if(NOT _ssl_enabled)
check_symbol_exists("arc4random" "${CURL_INCLUDES};stdlib.h" HAVE_ARC4RANDOM)
endif()
-if(APPLE)
- check_function_exists("mach_absolute_time" HAVE_MACH_ABSOLUTE_TIME)
-endif()
-if(NOT WIN32)
- check_symbol_exists("inet_ntop" "${CURL_INCLUDES};stdlib.h;string.h" HAVE_INET_NTOP) # arpa/inet.h netinet/in.h sys/socket.h
- check_symbol_exists("inet_pton" "${CURL_INCLUDES};stdlib.h;string.h" HAVE_INET_PTON) # arpa/inet.h netinet/in.h sys/socket.h
-endif()
-
check_symbol_exists("fsetxattr" "sys/xattr.h" HAVE_FSETXATTR)
if(HAVE_FSETXATTR)
curl_internal_test(HAVE_FSETXATTR_5)