cmake: use the BSD variable
- use `BSD` in addition to backwards-compatible method. - add `BSD` to the configuration log and `buildinfo.txt` if detected. - add `BSD` tag to `buildinfo.txt` also via `./configure`. The `BSD` variable is supported by CMake 3.25.0 and upper. Ref: https://cmake.org/cmake/help/latest/variable/BSD.html Closes #15367
This commit is contained in:
parent
9126eb5a8a
commit
825a800e0e
@ -90,7 +90,7 @@ elseif(APPLE OR
|
||||
CMAKE_SYSTEM_NAME STREQUAL "NetBSD" OR
|
||||
CMAKE_SYSTEM_NAME STREQUAL "SunOS")
|
||||
set(HAVE_GETADDRINFO_THREADSAFE TRUE)
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES "BSD")
|
||||
elseif(BSD OR CMAKE_SYSTEM_NAME MATCHES "BSD")
|
||||
set(HAVE_GETADDRINFO_THREADSAFE FALSE)
|
||||
endif()
|
||||
|
||||
|
||||
@ -99,6 +99,9 @@ endif()
|
||||
if(UNIX)
|
||||
set(_target_flags "${_target_flags} UNIX")
|
||||
endif()
|
||||
if(BSD)
|
||||
set(_target_flags "${_target_flags} BSD")
|
||||
endif()
|
||||
if(WIN32)
|
||||
set(_target_flags "${_target_flags} WIN32")
|
||||
endif()
|
||||
|
||||
@ -1552,6 +1552,10 @@ AC_DEFUN([CURL_PREPARE_BUILDINFO], [
|
||||
*-*-*bsd*|*-*-aix*|*-*-hpux*|*-*-interix*|*-*-irix*|*-*-linux*|*-*-solaris*|*-*-sunos*|*-apple-*|*-*-cygwin*|*-*-msys*)
|
||||
curl_pflags="${curl_pflags} UNIX";;
|
||||
esac
|
||||
case $host in
|
||||
*-*-*bsd*)
|
||||
curl_pflags="${curl_pflags} BSD";;
|
||||
esac
|
||||
fi
|
||||
if test "$curl_cv_cygwin" = 'yes'; then
|
||||
curl_pflags="${curl_pflags} CYGWIN"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user