From: Viktor Szakats Date: Thu, 28 Sep 2023 11:50:43 +0000 (+0000) Subject: cmake: pre-cache `HAVE_BASENAME` for mingw-w64 and MSVC X-Git-Tag: curl-8_4_0~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14b745608b96a73b4afa5794519727c34485e965;p=thirdparty%2Fcurl.git cmake: pre-cache `HAVE_BASENAME` for mingw-w64 and MSVC `basename` is present in mingw-w64, missing from MSVC. Pre-cache accordingly to make configure faster. Notice that `basename` has a bug so we later disable it even with mingw-w64: https://github.com/curl/curl/blob/781242ffa44a9f9b95b6da5ac5a1bf6372ec6257/lib/curl_setup.h#L820-L825 Closes #11974 --- diff --git a/CMake/Platforms/WindowsCache.cmake b/CMake/Platforms/WindowsCache.cmake index 77c27c124e..a616bf0c11 100644 --- a/CMake/Platforms/WindowsCache.cmake +++ b/CMake/Platforms/WindowsCache.cmake @@ -33,6 +33,7 @@ if(NOT UNIX) set(HAVE_UNISTD_H 1) set(HAVE_INTTYPES_H 1) set(HAVE_STRTOLL 1) + set(HAVE_BASENAME 1) elseif(MSVC) if(NOT MSVC_VERSION LESS 1800) set(HAVE_INTTYPES_H 1) @@ -46,6 +47,7 @@ if(NOT UNIX) else() set(HAVE_SNPRINTF 0) endif() + set(HAVE_BASENAME 0) endif() set(HAVE_LIBSOCKET 0)