Add current date option.

This commit is contained in:
Jim Hague 2019-10-24 12:19:51 +01:00
parent 74bbfc02fa
commit 7fd7bda000
1 changed files with 5 additions and 1 deletions

View File

@ -32,7 +32,6 @@ set(GETDNS_VERSION "${PACKAGE_VERSION}${RELEASE_CANDIDATE}")
set(GETDNS_NUMERIC_VERSION 0x01050200) set(GETDNS_NUMERIC_VERSION 0x01050200)
set(API_VERSION "December 2015") set(API_VERSION "December 2015")
set(API_NUMERIC_VERSION 0x07df0c00) set(API_NUMERIC_VERSION 0x07df0c00)
set(GETDNS_COMPILATION_COMMENT "${PACKAGE_NAME} ${GETDNS_VERSION} configured on <date> for the ${API_VERSION} of the API")
# Version 11:2:1 in libtool-speak. # Version 11:2:1 in libtool-speak.
set(GETDNS_VERSION_CURRENT 11) set(GETDNS_VERSION_CURRENT 11)
@ -106,6 +105,8 @@ if ((NOT ENABLE_SHARED) AND (NOT ENABLE_STATIC))
endif () endif ()
# Options variables. # Options variables.
string(TIMESTAMP timestamp "%Y-%m-%dT%H:%M:%SZ")
set(CURRENT_DATE "${timestamp}" CACHE STRING "Current date of the compilation, set to fixed date for reproducible builds.")
set(DNSSEC_ROADBLOCK_AVOIDANCE ON CACHE BOOL "Enable/disable DNSSEC roadblock avoidance.") set(DNSSEC_ROADBLOCK_AVOIDANCE ON CACHE BOOL "Enable/disable DNSSEC roadblock avoidance.")
set(FD_SETSIZE "" CACHE STRING "Set maximum file descriptor number that can be used by select.") set(FD_SETSIZE "" CACHE STRING "Set maximum file descriptor number that can be used by select.")
set(MAX_UDP_BACKOFF 1000 CACHE STRING "Set the maximum number of messages that can be sent to other upstreams before the upstream which has previously timed out will be tried again.") set(MAX_UDP_BACKOFF 1000 CACHE STRING "Set the maximum number of messages that can be sent to other upstreams before the upstream which has previously timed out will be tried again.")
@ -128,6 +129,9 @@ set(EDNS_PADDING_OPCODE 12)
set(MAX_CNAME_REFERRALS 100) set(MAX_CNAME_REFERRALS 100)
set(MAXIMUM_UPSTREAM_OPTION_SPACE 3000) set(MAXIMUM_UPSTREAM_OPTION_SPACE 3000)
# Values derived from options.
set(GETDNS_COMPILATION_COMMENT "${PACKAGE_NAME} ${GETDNS_VERSION} configured on ${CURRENT_DATE} for the ${API_VERSION} version of the API")
# Does the compiler accept the "format" attribute? # Does the compiler accept the "format" attribute?
try_compile(HAVE_ATTR_FORMAT try_compile(HAVE_ATTR_FORMAT
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}