mirror of https://github.com/getdnsapi/getdns.git
Add option to build Stubby from subproject, and remove Stubby-only items from getdns config.
This requires the latest version of the Stubby CMake build to work.
This commit is contained in:
parent
2fa1a184e4
commit
d9e5f405e7
|
@ -49,20 +49,6 @@ include(CTest)
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
include(TestBigEndian)
|
include(TestBigEndian)
|
||||||
|
|
||||||
# Directories
|
|
||||||
if (DEFINED CMAKE_INSTALL_FULL_RUNSTATEDIR)
|
|
||||||
set(RUNSTATEDIR "${CMAKE_INSTALL_FULL_RUNSTATEDIR}")
|
|
||||||
else ()
|
|
||||||
set(RUNSTATEDIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/run")
|
|
||||||
endif ()
|
|
||||||
install(DIRECTORY
|
|
||||||
DESTINATION ${RUNSTATEDIR}
|
|
||||||
DIRECTORY_PERMISSIONS
|
|
||||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
|
||||||
GROUP_READ GROUP_EXECUTE
|
|
||||||
WORLD_READ WORLD_EXECUTE
|
|
||||||
)
|
|
||||||
|
|
||||||
# Target Platform
|
# Target Platform
|
||||||
if (WIN32 OR MINGW OR MSYS OR CYGWIN)
|
if (WIN32 OR MINGW OR MSYS OR CYGWIN)
|
||||||
set(HOSTOS "windows")
|
set(HOSTOS "windows")
|
||||||
|
@ -117,6 +103,8 @@ option(ENABLE_NATIVE_STUB_DNSSEC "Enable/disable native stub DNSSEC support." ON
|
||||||
option(ENABLE_STUB_ONLY "Restricts resolution modes to STUB." ON)
|
option(ENABLE_STUB_ONLY "Restricts resolution modes to STUB." ON)
|
||||||
option(ENABLE_UNBOUND_EVENT_API "Enable usage of libunbound's event API." ON)
|
option(ENABLE_UNBOUND_EVENT_API "Enable usage of libunbound's event API." ON)
|
||||||
|
|
||||||
|
option(BUILD_STUBBY "Compile and install stubby, the (stub) resolver daemon." OFF)
|
||||||
|
|
||||||
# Above names chosen for user consistency. Now define substituted names.
|
# Above names chosen for user consistency. Now define substituted names.
|
||||||
set(REQ_DEBUG ${ENABLE_DEBUG_REQ})
|
set(REQ_DEBUG ${ENABLE_DEBUG_REQ})
|
||||||
set(SCHED_DEBUG ${ENABLE_DEBUG_SCHED})
|
set(SCHED_DEBUG ${ENABLE_DEBUG_SCHED})
|
||||||
|
@ -174,17 +162,6 @@ set(MAXIMUM_UPSTREAM_OPTION_SPACE 3000)
|
||||||
# Values derived from options.
|
# Values derived from options.
|
||||||
set(GETDNS_COMPILATION_COMMENT "${PACKAGE_NAME} ${GETDNS_VERSION} configured on ${CURRENT_DATE} for the ${API_VERSION} version of the API")
|
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?
|
|
||||||
try_compile(HAVE_ATTR_FORMAT
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/tests/test_format_attr.c
|
|
||||||
)
|
|
||||||
# Does the compiler accept the "unused" attribute?
|
|
||||||
try_compile(HAVE_ATTR_UNUSED
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/tests/test_unused_attr.c
|
|
||||||
)
|
|
||||||
|
|
||||||
# Compiler flags
|
# Compiler flags
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
# The Visual Studio C compiler is C90 with some of C99 and C11.
|
# The Visual Studio C compiler is C90 with some of C99 and C11.
|
||||||
|
@ -760,3 +737,7 @@ install(CODE "message(\"\
|
||||||
*** on the default location when there is no active external\n\
|
*** on the default location when there is no active external\n\
|
||||||
*** trust anchor management keeping it up-to-date.\n\
|
*** trust anchor management keeping it up-to-date.\n\
|
||||||
***\")")
|
***\")")
|
||||||
|
|
||||||
|
if (BUILD_STUBBY)
|
||||||
|
add_subdirectory(stubby)
|
||||||
|
endif ()
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
void f(char *format, ...) __attribute__ ((format (printf, 1, 2)));
|
|
||||||
|
|
||||||
void f(char *format, ...)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
int main (int ac, char *av[])
|
|
||||||
{
|
|
||||||
f("%s", "str");
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
void f (char *u __attribute__((unused)));
|
|
||||||
|
|
||||||
void f(char *u)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
int main (int ac, char *av[])
|
|
||||||
{
|
|
||||||
f("str");
|
|
||||||
return 0;
|
|
||||||
}
|
|
2
stubby
2
stubby
|
@ -1 +1 @@
|
||||||
Subproject commit b0d3154af61e1b46a30b56d239dc074273642217
|
Subproject commit 42a37b0125b5a4d0985c86608a62d76e804c10ca
|
Loading…
Reference in New Issue