"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "CMakeLists.txt" between
c-ares-1.17.1.tar.gz and c-ares-1.17.2.tar.gz

About: c-ares is a C library for asynchronous DNS requests (including name resolves).

CMakeLists.txt  (c-ares-1.17.1):CMakeLists.txt  (c-ares-1.17.2)
CMAKE_MINIMUM_REQUIRED (VERSION 3.1.0) CMAKE_MINIMUM_REQUIRED (VERSION 3.1.0)
INCLUDE (CheckIncludeFiles) INCLUDE (CheckIncludeFiles)
INCLUDE (CheckTypeSize) INCLUDE (CheckTypeSize)
INCLUDE (CheckFunctionExists) INCLUDE (CheckFunctionExists)
INCLUDE (CheckSymbolExists) INCLUDE (CheckSymbolExists)
INCLUDE (CheckCSourceCompiles) INCLUDE (CheckCSourceCompiles)
INCLUDE (CheckStructHasMember) INCLUDE (CheckStructHasMember)
INCLUDE (CheckLibraryExists) INCLUDE (CheckLibraryExists)
PROJECT (c-ares LANGUAGES C VERSION "1.17.0" ) PROJECT (c-ares LANGUAGES C VERSION "1.17.2" )
# Set this version before release # Set this version before release
SET (CARES_VERSION "1.17.1") SET (CARES_VERSION "1.17.2")
INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are w rong. INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are w rong.
# This is for libtool compatibility, and specified in a form that is easily # This is for libtool compatibility, and specified in a form that is easily
# translatable from libtool (even if the actual form doesn't make sense). # translatable from libtool (even if the actual form doesn't make sense).
# For instance, in an autotools project, in Makefile.am there is a line that # For instance, in an autotools project, in Makefile.am there is a line that
# contains something like: # contains something like:
# -version-info 4:0:2 # -version-info 4:0:2
# This breaks down into sections of current:revision:age # This breaks down into sections of current:revision:age
# This then generates a version of "(current-age).age.revision" with an # This then generates a version of "(current-age).age.revision" with an
# interface version of "(current-age)" # interface version of "(current-age)"
# For example, a version of 4:0:2 would generate output such as: # For example, a version of 4:0:2 would generate output such as:
# libname.so -> libname.so.2 # libname.so -> libname.so.2
# libname.so.2 -> libname.so.2.2.0 # libname.so.2 -> libname.so.2.2.0
SET (CARES_LIB_VERSIONINFO "6:2:4") SET (CARES_LIB_VERSIONINFO "6:3:4")
OPTION (CARES_STATIC "Build as a static library" OFF) OPTION (CARES_STATIC "Build as a static library" OFF)
OPTION (CARES_SHARED "Build as a shared library" ON) OPTION (CARES_SHARED "Build as a shared library" ON)
OPTION (CARES_INSTALL "Create installation targets (chain builders may want t o disable this)" ON) OPTION (CARES_INSTALL "Create installation targets (chain builders may want t o disable this)" ON)
OPTION (CARES_STATIC_PIC "Build the static library as PIC (position independent) " OFF) OPTION (CARES_STATIC_PIC "Build the static library as PIC (position independent) " OFF)
OPTION (CARES_BUILD_TESTS "Build and run tests" OFF) OPTION (CARES_BUILD_TESTS "Build and run tests" OFF)
OPTION (CARES_BUILD_CONTAINER_TESTS "Build and run container tests (implies CARE S_BUILD_TESTS, Linux only)" OFF) OPTION (CARES_BUILD_CONTAINER_TESTS "Build and run container tests (implies CARE S_BUILD_TESTS, Linux only)" OFF)
OPTION (CARES_BUILD_TOOLS "Build tools" ON) OPTION (CARES_BUILD_TOOLS "Build tools" ON)
# Tests require static to be enabled # Tests require static to be enabled on Windows to be able to access otherwise h
IF (CARES_BUILD_TESTS) idden symbols
IF (CARES_BUILD_TESTS AND (NOT CARES_STATIC) AND WIN32)
SET (CARES_STATIC ON) SET (CARES_STATIC ON)
SET (CARES_STATIC_PIC ON) SET (CARES_STATIC_PIC ON)
MESSAGE (WARNING "Static building was requested be disabled, but reenable d to support tests")
ENDIF () ENDIF ()
# allow linking against the static runtime library in msvc # allow linking against the static runtime library in msvc
IF (MSVC) IF (MSVC)
OPTION (CARES_MSVC_STATIC_RUNTIME "Link against the static runtime librar y" OFF) OPTION (CARES_MSVC_STATIC_RUNTIME "Link against the static runtime librar y" OFF)
IF (CARES_MSVC_STATIC_RUNTIME) IF (CARES_MSVC_STATIC_RUNTIME)
# CMAKE_CONFIGURATION_TYPES is empty on non-IDE generators (Ninja , NMake) # CMAKE_CONFIGURATION_TYPES is empty on non-IDE generators (Ninja , NMake)
# and that's why we also use CMAKE_BUILD_TYPE to cover for those generators. # and that's why we also use CMAKE_BUILD_TYPE to cover for those generators.
# For IDE generators, CMAKE_BUILD_TYPE is usually empty # For IDE generators, CMAKE_BUILD_TYPE is usually empty
FOREACH (config_type ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_T YPE}) FOREACH (config_type ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_T YPE})
skipping to change at line 76 skipping to change at line 77
# Keep build organized. # Keep build organized.
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDI R}") SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDI R}")
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDI R}") SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDI R}")
SET (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDI R}") SET (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDI R}")
SET (PACKAGE_DIRECTORY ${PROJECT_BINARY_DIR}/package) SET (PACKAGE_DIRECTORY ${PROJECT_BINARY_DIR}/package)
# Destinations for installing different kinds of targets (pass to install comman d). # Destinations for installing different kinds of targets (pass to install comman d).
SET (TARGETS_INST_DEST SET (TARGETS_INST_DEST
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
) )
# Function in Library # Function in Library
# CHECK_LIBRARY_EXISTS can't be used as it will return true if the function # CHECK_LIBRARY_EXISTS can't be used as it will return true if the function
# is found in a different dependent library. # is found in a different dependent library.
MACRO (CARES_FUNCTION_IN_LIBRARY func lib var) MACRO (CARES_FUNCTION_IN_LIBRARY func lib var)
CHECK_FUNCTION_EXISTS ("${func}" "_CARES_FUNC_IN_LIB_GLOBAL_${func}") CHECK_FUNCTION_EXISTS ("${func}" "_CARES_FUNC_IN_LIB_GLOBAL_${func}")
IF ("${_CARES_FUNC_IN_LIB_GLOBAL_${func}}") IF ("${_CARES_FUNC_IN_LIB_GLOBAL_${func}}")
skipping to change at line 139 skipping to change at line 141
int main() { int main() {
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12 #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12
# error Not MacOSX 10.12 or higher # error Not MacOSX 10.12 or higher
#endif #endif
return 0; return 0;
} }
" "
MACOS_V1012) MACOS_V1012)
ENDIF () ENDIF ()
IF ((IOS OR APPLE) AND HAVE_LIBRESOLV) IF ((IOS OR APPLE OR ZOS) AND HAVE_LIBRESOLV)
SET (CARES_USE_LIBRESOLV 1) SET (CARES_USE_LIBRESOLV 1)
ENDIF() ENDIF()
CARES_FUNCTION_IN_LIBRARY (gethostbyname nsl HAVE_LIBNSL) CARES_FUNCTION_IN_LIBRARY (gethostbyname nsl HAVE_LIBNSL)
CARES_FUNCTION_IN_LIBRARY (gethostbyname socket HAVE_GHBN_LIBSOCKET) CARES_FUNCTION_IN_LIBRARY (gethostbyname socket HAVE_GHBN_LIBSOCKET)
CARES_FUNCTION_IN_LIBRARY (socket socket HAVE_SOCKET_LIBSOCKET) CARES_FUNCTION_IN_LIBRARY (socket socket HAVE_SOCKET_LIBSOCKET)
IF (HAVE_GHBN_LIBSOCKET OR HAVE_SOCKET_LIBSOCKET) IF (HAVE_GHBN_LIBSOCKET OR HAVE_SOCKET_LIBSOCKET)
SET(HAVE_LIBSOCKET TRUE) SET(HAVE_LIBSOCKET TRUE)
ENDIF () ENDIF ()
CARES_FUNCTION_IN_LIBRARY (clock_gettime rt HAVE_LIBRT) CARES_FUNCTION_IN_LIBRARY (clock_gettime rt HAVE_LIBRT)
skipping to change at line 166 skipping to change at line 168
CHECK_INCLUDE_FILES (arpa/nameser.h HAVE_ARPA_NAMESER_H) CHECK_INCLUDE_FILES (arpa/nameser.h HAVE_ARPA_NAMESER_H)
CHECK_INCLUDE_FILES (assert.h HAVE_ASSERT_H) CHECK_INCLUDE_FILES (assert.h HAVE_ASSERT_H)
CHECK_INCLUDE_FILES (errno.h HAVE_ERRNO_H) CHECK_INCLUDE_FILES (errno.h HAVE_ERRNO_H)
CHECK_INCLUDE_FILES (fcntl.h HAVE_FCNTL_H) CHECK_INCLUDE_FILES (fcntl.h HAVE_FCNTL_H)
CHECK_INCLUDE_FILES (inttypes.h HAVE_INTTYPES_H) CHECK_INCLUDE_FILES (inttypes.h HAVE_INTTYPES_H)
CHECK_INCLUDE_FILES (limits.h HAVE_LIMITS_H) CHECK_INCLUDE_FILES (limits.h HAVE_LIMITS_H)
CHECK_INCLUDE_FILES (malloc.h HAVE_MALLOC_H) CHECK_INCLUDE_FILES (malloc.h HAVE_MALLOC_H)
CHECK_INCLUDE_FILES (memory.h HAVE_MEMORY_H) CHECK_INCLUDE_FILES (memory.h HAVE_MEMORY_H)
CHECK_INCLUDE_FILES (netdb.h HAVE_NETDB_H) CHECK_INCLUDE_FILES (netdb.h HAVE_NETDB_H)
CHECK_INCLUDE_FILES (netinet/in.h HAVE_NETINET_IN_H) CHECK_INCLUDE_FILES (netinet/in.h HAVE_NETINET_IN_H)
CHECK_INCLUDE_FILES (netinet/tcp.h HAVE_NETINET_TCP_H)
CHECK_INCLUDE_FILES (net/if.h HAVE_NET_IF_H) CHECK_INCLUDE_FILES (net/if.h HAVE_NET_IF_H)
CHECK_INCLUDE_FILES (signal.h HAVE_SIGNAL_H) CHECK_INCLUDE_FILES (signal.h HAVE_SIGNAL_H)
CHECK_INCLUDE_FILES (socket.h HAVE_SOCKET_H) CHECK_INCLUDE_FILES (socket.h HAVE_SOCKET_H)
CHECK_INCLUDE_FILES (stdbool.h HAVE_STDBOOL_H) CHECK_INCLUDE_FILES (stdbool.h HAVE_STDBOOL_H)
CHECK_INCLUDE_FILES (stdint.h HAVE_STDINT_H) CHECK_INCLUDE_FILES (stdint.h HAVE_STDINT_H)
CHECK_INCLUDE_FILES (stdlib.h HAVE_STDLIB_H) CHECK_INCLUDE_FILES (stdlib.h HAVE_STDLIB_H)
CHECK_INCLUDE_FILES (strings.h HAVE_STRINGS_H) CHECK_INCLUDE_FILES (strings.h HAVE_STRINGS_H)
CHECK_INCLUDE_FILES (string.h HAVE_STRING_H) CHECK_INCLUDE_FILES (string.h HAVE_STRING_H)
CHECK_INCLUDE_FILES (stropts.h HAVE_STROPTS_H) CHECK_INCLUDE_FILES (stropts.h HAVE_STROPTS_H)
CHECK_INCLUDE_FILES (sys/ioctl.h HAVE_SYS_IOCTL_H) CHECK_INCLUDE_FILES (sys/ioctl.h HAVE_SYS_IOCTL_H)
CHECK_INCLUDE_FILES (sys/param.h HAVE_SYS_PARAM_H) CHECK_INCLUDE_FILES (sys/param.h HAVE_SYS_PARAM_H)
CHECK_INCLUDE_FILES (sys/select.h HAVE_SYS_SELECT_H) CHECK_INCLUDE_FILES (sys/select.h HAVE_SYS_SELECT_H)
CHECK_INCLUDE_FILES (sys/socket.h HAVE_SYS_SOCKET_H)
CHECK_INCLUDE_FILES (sys/stat.h HAVE_SYS_STAT_H) CHECK_INCLUDE_FILES (sys/stat.h HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILES (sys/time.h HAVE_SYS_TIME_H) CHECK_INCLUDE_FILES (sys/time.h HAVE_SYS_TIME_H)
CHECK_INCLUDE_FILES (sys/types.h HAVE_SYS_TYPES_H)
CHECK_INCLUDE_FILES (sys/uio.h HAVE_SYS_UIO_H) CHECK_INCLUDE_FILES (sys/uio.h HAVE_SYS_UIO_H)
CHECK_INCLUDE_FILES (time.h HAVE_TIME_H) CHECK_INCLUDE_FILES (time.h HAVE_TIME_H)
CHECK_INCLUDE_FILES (dlfcn.h HAVE_DLFCN_H) CHECK_INCLUDE_FILES (dlfcn.h HAVE_DLFCN_H)
CHECK_INCLUDE_FILES (unistd.h HAVE_UNISTD_H) CHECK_INCLUDE_FILES (unistd.h HAVE_UNISTD_H)
# On OpenBSD, you must include sys/types.h before netinet/tcp.h
IF (HAVE_SYS_TYPES_H)
CHECK_INCLUDE_FILES ("sys/types.h;netinet/tcp.h" HAVE_NETINET_TCP_H)
ELSE ()
CHECK_INCLUDE_FILES (netinet/tcp.h HAVE_NETINET_TCP_H)
ENDIF ()
# Include order matters for these windows files. # Include order matters for these windows files.
CHECK_INCLUDE_FILES ("winsock2.h;windows.h" HAVE_WINSOCK2_H) CHECK_INCLUDE_FILES ("winsock2.h;windows.h" HAVE_WINSOCK2_H)
CHECK_INCLUDE_FILES ("winsock2.h;ws2tcpip.h;windows.h" HAVE_WS2TCPIP_H) CHECK_INCLUDE_FILES ("winsock2.h;ws2tcpip.h;windows.h" HAVE_WS2TCPIP_H)
CHECK_INCLUDE_FILES ("winsock.h;windows.h" HAVE_WINSOCK_H) CHECK_INCLUDE_FILES ("winsock.h;windows.h" HAVE_WINSOCK_H)
CHECK_INCLUDE_FILES (windows.h HAVE_WINDOWS_H) CHECK_INCLUDE_FILES (windows.h HAVE_WINDOWS_H)
# Set system-specific compiler flags # Set system-specific compiler flags
IF (CMAKE_SYSTEM_NAME STREQUAL "Darwin") IF (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
LIST (APPEND SYSFLAGS -D_DARWIN_C_SOURCE) LIST (APPEND SYSFLAGS -D_DARWIN_C_SOURCE)
ELSEIF (CMAKE_SYSTEM_NAME STREQUAL "Linux") ELSEIF (CMAKE_SYSTEM_NAME STREQUAL "Linux")
skipping to change at line 374 skipping to change at line 380
# On Android, the system headers may define __system_property_get(), but exclude d # On Android, the system headers may define __system_property_get(), but exclude d
# from libc. We need to perform a link test instead of a header/symbol test. # from libc. We need to perform a link test instead of a header/symbol test.
CHECK_FUNCTION_EXISTS (__system_property_get HAVE___SYSTEM_PROPERTY_GET) CHECK_FUNCTION_EXISTS (__system_property_get HAVE___SYSTEM_PROPERTY_GET)
# Unset temporary data # Unset temporary data
SET (CMAKE_EXTRA_INCLUDE_FILES) SET (CMAKE_EXTRA_INCLUDE_FILES)
SET (CMAKE_REQUIRED_DEFINITIONS) SET (CMAKE_REQUIRED_DEFINITIONS)
SET (CMAKE_REQUIRED_LIBRARIES) SET (CMAKE_REQUIRED_LIBRARIES)
find_file(CARES_RANDOM_FILE urandom /dev)
mark_as_advanced(CARES_RANDOM_FILE)
################################################################################ ################################################################################
# recv, recvfrom, send, getnameinfo, gethostname # recv, recvfrom, send, getnameinfo, gethostname
# ARGUMENTS AND RETURN VALUES # ARGUMENTS AND RETURN VALUES
# #
# The AutoTools build tries to be really thorough here. So much so that it # The AutoTools build tries to be really thorough here. So much so that it
# takes forever. We really don't want to do that. Lets make some educated # takes forever. We really don't want to do that. Lets make some educated
# guesses based on datatypes we have available, and for others, use some 'sane' # guesses based on datatypes we have available, and for others, use some 'sane'
# defaults. This should be much quicker and nearly as accurate ... and even # defaults. This should be much quicker and nearly as accurate ... and even
# if not, it probably won't matter in the least. # if not, it probably won't matter in the least.
 End of changes. 12 change blocks. 
9 lines changed or deleted 19 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)