mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-22 01:49:48 +00:00
[#3443] Additions to the initial meson Proof of Concept
This commit is contained in:
parent
e04a37a762
commit
a846e64be4
8
compiler-checks/chrono-same-duration.cc
Normal file
8
compiler-checks/chrono-same-duration.cc
Normal file
@ -0,0 +1,8 @@
|
||||
#include <chrono>
|
||||
#include <type_traits>
|
||||
|
||||
int main() {
|
||||
static_assert(std::is_same<std::chrono::system_clock::duration,
|
||||
std::chrono::steady_clock::duration>::value,
|
||||
"");
|
||||
}
|
5
compiler-checks/have-generic-tls-method.cc
Normal file
5
compiler-checks/have-generic-tls-method.cc
Normal file
@ -0,0 +1,5 @@
|
||||
#include <boost/asio/ssl.hpp>
|
||||
|
||||
int main() {
|
||||
auto _(boost::asio::ssl::context::tls);
|
||||
}
|
7
compiler-checks/have-sa-len.cc
Normal file
7
compiler-checks/have-sa-len.cc
Normal file
@ -0,0 +1,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
int main() {
|
||||
struct sockaddr sa;
|
||||
sa.sa_len = 0;
|
||||
}
|
@ -1712,7 +1712,6 @@ AC_CONFIG_FILES([src/lib/log/tests/logger_lock_test.sh],
|
||||
[chmod +x src/lib/log/tests/logger_lock_test.sh])
|
||||
AC_CONFIG_FILES([src/lib/log/tests/severity_test.sh],
|
||||
[chmod +x src/lib/log/tests/severity_test.sh])
|
||||
AC_CONFIG_FILES([src/lib/log/tests/tempdir.h])
|
||||
AC_CONFIG_FILES([src/lib/mysql/Makefile])
|
||||
AC_CONFIG_FILES([src/lib/mysql/testutils/Makefile])
|
||||
AC_CONFIG_FILES([src/lib/mysql/tests/Makefile])
|
||||
|
@ -1,3 +1,3 @@
|
||||
#mesondefine EXTENDED_VERSION
|
||||
#mesondefine PACKAGE_VERSION_TYPE
|
||||
#mesondefine PREMIUM_EXTENDED_VERSION
|
||||
#define EXTENDED_VERSION "@KEA_SRCID@"
|
||||
#define PREMIUM_EXTENDED_VERSION "@PREMIUM@"
|
||||
#define PACKAGE_VERSION_TYPE "@PACKAGE_VERSION_TYPE@"
|
||||
|
@ -71,7 +71,7 @@
|
||||
#mesondefine HAVE_BOTAN_BUILD_H
|
||||
|
||||
/* Whether getsockopt(IPV6_USE_MIN_MTU) does not work */
|
||||
#mesondefine HAVE_BROKEN_GET_IPV
|
||||
#mesondefine HAVE_BROKEN_GET_IPV6_USE_MIN_MTU
|
||||
|
||||
/* Whether gtest defines edit_distance::CreateUnifiedDiff */
|
||||
#mesondefine HAVE_CREATE_UNIFIED_DIFF
|
||||
@ -104,7 +104,7 @@
|
||||
#mesondefine HAVE_GSSAPI_GSSAPI_H
|
||||
|
||||
/* Whether you have the <gssapi/gssapi_krb5.h> header file. */
|
||||
#mesondefine HAVE_GSSAPI_GSSAPI_KRB
|
||||
#mesondefine HAVE_GSSAPI_GSSAPI_KRB5_H
|
||||
|
||||
/* gss_str_to_oid is available */
|
||||
#mesondefine HAVE_GSS_STR_TO_OID
|
||||
@ -116,13 +116,13 @@
|
||||
#mesondefine HAVE_IS_BASE_OF
|
||||
|
||||
/* Whether you have the <krb5.h> header file. */
|
||||
#mesondefine HAVE_KRB
|
||||
#mesondefine HAVE_KRB5_H
|
||||
|
||||
/* Whether you have the <krb5/krb5.h> header file. */
|
||||
#mesondefine HAVE_KRB
|
||||
#mesondefine HAVE_KRB5_KRB5_H
|
||||
|
||||
/* Whether you have the <log4cplus/logger.h> header file. */
|
||||
#mesondefine HAVE_LOG
|
||||
#mesondefine HAVE_LOG4CPLUS_LOGGER_H
|
||||
|
||||
/* MySQL is present */
|
||||
#mesondefine HAVE_MYSQL
|
||||
@ -191,7 +191,7 @@
|
||||
#mesondefine HAVE_SYS_TYPES_H
|
||||
|
||||
/* Whether boost::asio::ssl::context::tlsv12 is available */
|
||||
#mesondefine HAVE_TLS_
|
||||
#mesondefine HAVE_TLS_1_2_METHOD
|
||||
|
||||
/* Whether you have the <unistd.h> header file. */
|
||||
#mesondefine HAVE_UNISTD_H
|
||||
@ -212,7 +212,7 @@
|
||||
#mesondefine LIBC_MUSL
|
||||
|
||||
/* Explicit initialization of log4cplus possible */
|
||||
#mesondefine LOG
|
||||
#mesondefine LOG4CPLUS_INITIALIZER_H
|
||||
|
||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||
#mesondefine LT_OBJDIR
|
3
meson-kea_version.h.in
Normal file
3
meson-kea_version.h.in
Normal file
@ -0,0 +1,3 @@
|
||||
#mesondefine EXTENDED_VERSION
|
||||
#mesondefine PACKAGE_VERSION_TYPE
|
||||
#mesondefine PREMIUM_EXTENDED_VERSION
|
283
meson.build
283
meson.build
@ -1,15 +1,32 @@
|
||||
project('kea', 'cpp', version: '2.7.6-git', default_options : ['default_library=shared'])
|
||||
project(
|
||||
'kea',
|
||||
'cpp',
|
||||
version: '2.7.7-git',
|
||||
default_options: ['default_library=shared'],
|
||||
)
|
||||
|
||||
cpp = meson.get_compiler('cpp')
|
||||
project_version = meson.project_version()
|
||||
|
||||
#### Imports
|
||||
|
||||
fs = import('fs')
|
||||
|
||||
conf_data = configuration_data({
|
||||
# 'CHRONO_SAME_DURATION': true,
|
||||
#### Variables
|
||||
|
||||
TOP_BUILD_DIR = meson.current_build_dir()
|
||||
TOP_SOURCE_DIR = meson.current_source_dir()
|
||||
KEA_ADMIN = f'@TOP_BUILD_DIR@/src/bin/admin/kea-admin'
|
||||
KEA_LFC = f'@TOP_BUILD_DIR@/src/bin/lfc/kea-lfc'
|
||||
|
||||
#### Configuration Data
|
||||
|
||||
conf_data = configuration_data(
|
||||
{
|
||||
# 'CONFIG_H_WAS_INCLUDED': true,
|
||||
# 'ENABLE_DEBUG': false,
|
||||
# 'ENABLE_LOGGER_CHECKS': false,
|
||||
'EXTENDED_VERSION': '"@0@"'.format(meson.project_version()),
|
||||
'EXTENDED_VERSION': f'"@project_version@"',
|
||||
# 'FUZZING': false,
|
||||
# 'FUZZING_IN_CI': false,
|
||||
# 'HAS_UNDEFINED_PTHREAD_BEHAVIOR': false,
|
||||
@ -39,7 +56,6 @@ conf_data = configuration_data({
|
||||
# 'HAVE_EVP_MD_CTX_NEW': false,
|
||||
# 'HAVE_EVP_PKEY_NEW_MAC_KEY': false,
|
||||
# 'HAVE_EVP_PKEY_NEW_RAW_PRIVATE_KEY': false,
|
||||
'HAVE_GENERIC_TLS_METHOD': true,
|
||||
# 'HAVE_GSSAPI_GSSAPI_H': false,
|
||||
# 'HAVE_GSSAPI_GSSAPI_KRB': false,
|
||||
# 'HAVE_GSS_STR_TO_OID': false,
|
||||
@ -47,22 +63,17 @@ conf_data = configuration_data({
|
||||
# 'HAVE_IS_BASE_OF': false,
|
||||
# 'HAVE_KRB': false,
|
||||
# 'HAVE_LOG': false,
|
||||
# 'HAVE_MYSQL': false,
|
||||
# 'HAVE_MYSQL_GET_OPTION': false,
|
||||
# 'HAVE_MYSQL_MY_BOOL': false,
|
||||
# 'HAVE_MYSQL_OPT_RECONNECT': false,
|
||||
# 'HAVE_NETCONF': false,
|
||||
# 'HAVE_OPTRESET': false,
|
||||
# 'HAVE_PGSQL': false,
|
||||
# 'HAVE_PGSQL_SSL': false,
|
||||
# 'HAVE_PGSQL_TCP_USER_TIMEOUT': false,
|
||||
# 'HAVE_PSELECT': false,
|
||||
# 'HAVE_SA_LEN': false,
|
||||
# 'HAVE_STDBOOL_H': false,
|
||||
# 'HAVE_STDINT_H': false,
|
||||
# 'HAVE_STDIO_H': false,
|
||||
# 'HAVE_STDLIB_H': false,
|
||||
# 'HAVE_STREAM_TRUNCATED_ERROR': false,
|
||||
# 'HAVE_STRINGS_H': false,
|
||||
# 'HAVE_STRING_H': false,
|
||||
# 'HAVE_SYS_DEVPOLL_H': false,
|
||||
@ -78,164 +89,256 @@ conf_data = configuration_data({
|
||||
# 'LIBC_MUSL': false,
|
||||
# 'LOG': false,
|
||||
# 'LT_OBJDIR': false,
|
||||
# 'OS_BSD': false,
|
||||
# 'OS_FREEBSD': false,
|
||||
# 'OS_LINUX': false,
|
||||
# 'OS_NETBSD': false,
|
||||
# 'OS_OPENBSD': false,
|
||||
# 'OS_OSX': false,
|
||||
# 'OS_SOLARIS': false,
|
||||
# 'PACKAGE': 'kea',
|
||||
# 'PACKAGE_BUGREPORT': 'kea-dev@lists.isc.org',
|
||||
# 'PACKAGE_NAME': 'kea',
|
||||
# 'PACKAGE_STRING': 'kea @0@'.format(meson.project_version()),
|
||||
# 'PACKAGE_STRING': f'kea "@project_version@"',
|
||||
# 'PACKAGE_TARNAME': 'kea',
|
||||
# 'PACKAGE_URL': '',
|
||||
# 'PACKAGE_VERSION': meson.project_version(),
|
||||
'PACKAGE_VERSION_TYPE': '"tarball"',
|
||||
# 'PREMIUM': false,
|
||||
'PREMIUM_EXTENDED_VERSION': '"@0@"'.format(meson.project_version()),
|
||||
'PREMIUM_EXTENDED_VERSION': f'"@project_version@"',
|
||||
# 'STDC_HEADERS': false,
|
||||
# 'TOP_BUILDDIR': false,
|
||||
# 'USE_STATIC_LINK': false,
|
||||
'VERSION': '"@0@"'.format(meson.project_version()),
|
||||
# 'WITH_BOTAN': false,
|
||||
'VERSION': f'"@project_version@"',
|
||||
# 'WITH_HEIMDAL': false,
|
||||
# 'WITH_OPENSSL': false,
|
||||
# 'YYTEXT_POINTER': false,
|
||||
# 'SIZE_T': 'size_t',
|
||||
# 'SSIZE_T': 'ssize_t',
|
||||
})
|
||||
},
|
||||
)
|
||||
|
||||
#### Dependencies
|
||||
|
||||
boost = dependency('boost', version: '>=1.66')
|
||||
botan = dependency('botan', required: false)
|
||||
gtest = dependency('gtest', required: false)
|
||||
log4cplus = dependency('log4cplus')
|
||||
|
||||
# Cryptography
|
||||
crypto = disabler()
|
||||
botan = disabler()
|
||||
foreach dep : ['botan-2', 'botan', 'botan-3']
|
||||
botan = dependency(dep, required: false)
|
||||
if botan.found()
|
||||
break
|
||||
endif
|
||||
endforeach
|
||||
openssl = dependency('openssl', required: false)
|
||||
if botan.found() and false # remove "or flase" when botan+mariadb gets fixes
|
||||
crypto = botan
|
||||
conf_data.set('WITH_BOTAN', true)
|
||||
message('Using Botan.')
|
||||
elif openssl.found()
|
||||
crypto = openssl
|
||||
conf_data.set('WITH_OPENSSL', true)
|
||||
message('Using OpenSSL.')
|
||||
endif
|
||||
if not crypto.found()
|
||||
error('Build failed: Could not find neither botan nor openssl libraries.')
|
||||
endif
|
||||
|
||||
# Kerberos
|
||||
krb5 = dependency('krb5', required: false)
|
||||
if not krb5.found()
|
||||
krb5_config = find_program('krb5-config', required: false)
|
||||
cflags = run_command([krb5_config, '--cflags'], check: false)
|
||||
libs = run_command([krb5_config, '--libs'], check: false)
|
||||
if cflags.returncode() == 0 and libs.returncode() == 0
|
||||
krb5 = declare_dependency(
|
||||
compile_args: cflags.stdout().split(),
|
||||
link_args: libs.stdout().split(),
|
||||
)
|
||||
endif
|
||||
endif
|
||||
|
||||
# MySQL
|
||||
mysql = dependency('mariadb', required: false)
|
||||
if not mysql.found()
|
||||
mysql = dependency('mysql', required: false)
|
||||
endif
|
||||
if not mysql.found()
|
||||
mysql_config = find_program('mariadb_config', required: false)
|
||||
if mysql_config.found()
|
||||
mysql = declare_dependency(compile_args: run_command([mysql_config, '--cflags']).stdout().split(),
|
||||
link_args: run_command([mysql_config, '--libs']).stdout().split())
|
||||
foreach mysql_config : ['mariadb_config', 'mysql_config']
|
||||
if mysql.found()
|
||||
continue
|
||||
endif
|
||||
mysql_config = find_program(mysql_config, required: false)
|
||||
if not mysql_config.found()
|
||||
continue
|
||||
endif
|
||||
if not mysql.found()
|
||||
mysql_config = find_program('mysql_config')
|
||||
if mysql_config.found()
|
||||
mysql = declare_dependency(compile_args: run_command([mysql_config, '--cflags']).stdout().split(),
|
||||
link_args: run_command([mysql_config, '--libs']).stdout().split())
|
||||
cflags = run_command([mysql_config, '--cflags'], check: false)
|
||||
libs = run_command([mysql_config, '--libs'], check: false)
|
||||
if cflags.returncode() == 0 and libs.returncode() == 0
|
||||
mysql = declare_dependency(
|
||||
compile_args: cflags.stdout().split(),
|
||||
link_args: libs.stdout().split(),
|
||||
)
|
||||
break
|
||||
endif
|
||||
endforeach
|
||||
if mysql.found()
|
||||
conf_data.set('HAVE_MYSQL', true)
|
||||
endif
|
||||
postgresql = dependency('libpq', required: false)
|
||||
openssl = dependency('openssl', required: false)
|
||||
|
||||
# PostgreSQL
|
||||
postgresql = dependency('libpq', required: false)
|
||||
if not postgresql.found()
|
||||
pg_config = find_program('pg_config', required: false)
|
||||
cflags = run_command([pg_config, '--cflags'], check: false)
|
||||
libs = run_command([pg_config, '--libs'], check: false)
|
||||
if cflags.returncode() == 0 and libs.returncode() == 0
|
||||
krb5 = declare_dependency(
|
||||
compile_args: cflags.stdout().split(),
|
||||
link_args: libs.stdout().split(),
|
||||
)
|
||||
endif
|
||||
endif
|
||||
postgresql_server_header = disabler()
|
||||
foreach dir : ['/usr/include/pgsql/server', '/usr/include/postgresql/server']
|
||||
if not fs.is_dir(dir)
|
||||
continue
|
||||
endif
|
||||
exists = cpp.has_header(
|
||||
'utils/errcodes.h',
|
||||
include_directories: [include_directories(dir)],
|
||||
required: false,
|
||||
)
|
||||
if exists
|
||||
postgresql_server_header = declare_dependency(include_directories: dir)
|
||||
break
|
||||
endif
|
||||
endforeach
|
||||
if postgresql.found()
|
||||
conf_data.set('HAVE_PGSQL', true)
|
||||
endif
|
||||
|
||||
# NETCONF
|
||||
netconf_deps = {}
|
||||
netconf_deps_array = []
|
||||
netconf_deps_found = true
|
||||
foreach dep : ['yang', 'yang-cpp', 'sysrepo', 'sysrepo-cpp']
|
||||
netconf_deps = netconf_deps + {dep: cpp.find_library(dep, dirs: [f'/opt/@dep@/lib'], required: false)}
|
||||
netconf_deps = netconf_deps + {dep: dependency(dep, required: false)}
|
||||
if not netconf_deps[dep].found()
|
||||
lib = cpp.find_library(dep, dirs: [f'/opt/@dep@/lib'], required: false)
|
||||
if lib.found()
|
||||
netconf_deps = netconf_deps + {
|
||||
dep: declare_dependency(
|
||||
dependencies: lib,
|
||||
include_directories: include_directories(
|
||||
f'/opt/@dep@/include',
|
||||
),
|
||||
),
|
||||
}
|
||||
endif
|
||||
endif
|
||||
if netconf_deps[dep].found()
|
||||
netconf_deps = netconf_deps + {dep: declare_dependency(
|
||||
dependencies: netconf_deps[dep],
|
||||
include_directories: include_directories(f'/opt/@dep@/include'),
|
||||
)}
|
||||
netconf_deps_array += netconf_deps[dep]
|
||||
else
|
||||
netconf_deps_found = false
|
||||
break
|
||||
endif
|
||||
endforeach
|
||||
if netconf_deps_found
|
||||
add_project_arguments('-std=c++20', language: 'cpp')
|
||||
endif
|
||||
|
||||
if openssl.found()
|
||||
crypto = openssl
|
||||
conf_data.set('WITH_OPENSSL', true)
|
||||
message('Using OpenSSL.')
|
||||
elif botan.found()
|
||||
crypto = botan
|
||||
conf_data.set('WITH_BOTAN', true)
|
||||
message('Using Botan.')
|
||||
else
|
||||
error('Build failed: Could not find neither botan nor openssl libraries.')
|
||||
endif
|
||||
#### Compiler Checks
|
||||
|
||||
result = cpp.run(fs.read('compiler-checks/stream-truncated-error.cc'), name: 'HAVE_STREAM_TRUNCATED_ERROR', dependencies: [crypto])
|
||||
if result.compiled() and result.returncode() == 0
|
||||
conf_data.set('HAVE_STREAM_TRUNCATED_ERROR', true)
|
||||
endif
|
||||
result = cpp.run(
|
||||
fs.read('compiler-checks/chrono-same-duration.cc'),
|
||||
name: 'CHRONO_SAME_DURATION',
|
||||
dependencies: [boost],
|
||||
)
|
||||
conf_data.set('CHRONO_SAME_DURATION', result.returncode() == 0)
|
||||
|
||||
result = cpp.run(
|
||||
fs.read('compiler-checks/have-generic-tls-method.cc'),
|
||||
name: 'HAVE_GENERIC_TLS_METHOD',
|
||||
dependencies: [crypto],
|
||||
)
|
||||
conf_data.set('HAVE_GENERIC_TLS_METHOD', result.returncode() == 0)
|
||||
|
||||
result = cpp.run(fs.read('compiler-checks/have-sa-len.cc'), name: 'HAVE_SA_LEN')
|
||||
conf_data.set('HAVE_SA_LEN', result.returncode() == 0)
|
||||
|
||||
if mysql.found()
|
||||
result = cpp.run(fs.read('compiler-checks/mysql-my-bool.cc'), name: 'HAVE_MYSQL_MY_BOOL', dependencies: [mysql])
|
||||
if result.compiled() and result.returncode() == 0
|
||||
conf_data.set('HAVE_MYSQL_MY_BOOL', true)
|
||||
endif
|
||||
result = cpp.run(
|
||||
fs.read('compiler-checks/mysql-my-bool.cc'),
|
||||
name: 'HAVE_MYSQL_MY_BOOL',
|
||||
dependencies: [mysql],
|
||||
)
|
||||
conf_data.set('HAVE_MYSQL_MY_BOOL', result.returncode() == 0)
|
||||
endif
|
||||
|
||||
system = build_machine.system()
|
||||
if system == 'linux'
|
||||
result = cpp.run(
|
||||
fs.read('compiler-checks/stream-truncated-error.cc'),
|
||||
name: 'HAVE_STREAM_TRUNCATED_ERROR',
|
||||
dependencies: [crypto],
|
||||
)
|
||||
conf_data.set('HAVE_STREAM_TRUNCATED_ERROR', result.returncode() == 0)
|
||||
|
||||
#### System-specific Variables
|
||||
|
||||
SYSTEM = build_machine.system()
|
||||
if SYSTEM == 'linux'
|
||||
conf_data.set('OS_LINUX', true)
|
||||
elif system == 'freebsd'
|
||||
elif SYSTEM == 'freebsd'
|
||||
conf_data.set('OS_BSD', true)
|
||||
conf_data.set('OS_FREEBSD', true)
|
||||
conf_data.set('HAVE_SA_LEN', true)
|
||||
elif system == 'netbsd'
|
||||
elif SYSTEM == 'netbsd'
|
||||
conf_data.set('OS_BSD', true)
|
||||
conf_data.set('OS_NETBSD', true)
|
||||
conf_data.set('HAVE_SA_LEN', true)
|
||||
elif system == 'openbsd'
|
||||
elif SYSTEM == 'openbsd'
|
||||
conf_data.set('OS_BSD', true)
|
||||
conf_data.set('OS_OPENBSD', true)
|
||||
conf_data.set('HAVE_SA_LEN', true)
|
||||
elif system == 'sun'
|
||||
elif SYSTEM == 'sun'
|
||||
conf_data.set('OS_SOLARIS', true)
|
||||
elif system == 'darwin'
|
||||
elif SYSTEM == 'darwin'
|
||||
conf_data.set('OS_BSD', true)
|
||||
conf_data.set('OS_OSX', true)
|
||||
conf_data.set('HAVE_SA_LEN', true)
|
||||
else
|
||||
error(f'Build failed: Unsupported system "@system@".')
|
||||
error(f'Build failed: Unsupported system "@SYSTEM@".')
|
||||
endif
|
||||
message(f'Detected system "@system@".')
|
||||
message(f'Detected system "@SYSTEM@".')
|
||||
|
||||
#### System-specific Compiler Flags
|
||||
|
||||
prefix = get_option('prefix')
|
||||
if system == 'darwin'
|
||||
if SYSTEM == 'darwin'
|
||||
add_project_arguments('-D__APPLE_USE_RFC_3542', language: 'cpp')
|
||||
add_project_link_arguments(f'-Wl,-rpath,@prefix@/lib', language: 'cpp')
|
||||
else
|
||||
conf_data.set('CHRONO_SAME_DURATION', true)
|
||||
add_project_link_arguments(f'-Wl,-rpath=@prefix@/lib', language: 'cpp')
|
||||
endif
|
||||
|
||||
have_premium = false
|
||||
if fs.is_dir('premium')
|
||||
have_premium = true
|
||||
have_premium = fs.is_dir('premium')
|
||||
if have_premium
|
||||
conf_data.set('PREMIUM', true)
|
||||
endif
|
||||
|
||||
configure_file(input : 'config.h.in',
|
||||
#### Configuration Files
|
||||
|
||||
# TODO: Change to config.h.in when autotools are removed.
|
||||
configure_file(
|
||||
input: 'meson-config.h.in',
|
||||
output: 'config.h',
|
||||
configuration : conf_data)
|
||||
configuration: conf_data,
|
||||
)
|
||||
|
||||
configure_file(input : 'kea_version.h.in',
|
||||
# TODO: Change to kea_version.h.in when autotools are removed.
|
||||
configure_file(
|
||||
input: 'meson-kea_version.h.in',
|
||||
output: 'kea_version.h',
|
||||
configuration : conf_data)
|
||||
configuration: conf_data,
|
||||
)
|
||||
|
||||
includes = [
|
||||
#### Default Includes
|
||||
|
||||
INCLUDES = [
|
||||
include_directories('.'),
|
||||
include_directories('src/bin'),
|
||||
include_directories('src/lib'),
|
||||
]
|
||||
|
||||
kea_admin = '@0@/src/bin/admin/kea-admin'.format(meson.current_build_dir())
|
||||
kea_lfc = '@0@/src/bin/lfc/kea-lfc'.format(meson.current_build_dir())
|
||||
#### Build Starts Here
|
||||
|
||||
libs_built_so_far = []
|
||||
LIBS_BUILT_SO_FAR = []
|
||||
subdir('src')
|
||||
if have_premium
|
||||
subdir('premium')
|
||||
|
@ -1,4 +1,5 @@
|
||||
dhcp4_lib = static_library('dhcp4',
|
||||
dhcp4_lib = static_library(
|
||||
'dhcp4',
|
||||
'client_handler.cc',
|
||||
'ctrl_dhcp4_srv.cc',
|
||||
'dhcp4to6_ipc.cc',
|
||||
@ -9,14 +10,16 @@ dhcp4_lib = static_library('dhcp4',
|
||||
'dhcp4_srv.cc',
|
||||
'json_config_parser.cc',
|
||||
'parser_context.cc',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
link_with: libs_built_so_far,
|
||||
dependencies: [crypto],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
kea_dhcp4_exe = executable('kea-dhcp4',
|
||||
executable(
|
||||
'kea-dhcp4',
|
||||
'main.cc',
|
||||
dependencies: [crypto],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'sbin',
|
||||
link_with: libs_built_so_far + [dhcp4_lib],
|
||||
link_with: LIBS_BUILT_SO_FAR + [dhcp4_lib],
|
||||
)
|
||||
|
@ -1,4 +1,5 @@
|
||||
dhcp6_lib = static_library('dhcp6',
|
||||
dhcp6_lib = static_library(
|
||||
'dhcp6',
|
||||
'client_handler.cc',
|
||||
'client_handler.h',
|
||||
'ctrl_dhcp6_srv.cc',
|
||||
@ -20,13 +21,16 @@ dhcp6_lib = static_library('dhcp6',
|
||||
'parser_context.cc',
|
||||
'parser_context.h',
|
||||
'parser_context_decl.h',
|
||||
include_directories: includes
|
||||
dependencies: [crypto],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
kea_dhcp6_exe = executable('kea-dhcp6',
|
||||
executable(
|
||||
'kea-dhcp6',
|
||||
'main.cc',
|
||||
dependencies: [crypto],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'sbin',
|
||||
link_with: libs_built_so_far + [dhcp6_lib],
|
||||
link_with: LIBS_BUILT_SO_FAR + [dhcp6_lib],
|
||||
)
|
||||
|
@ -1,17 +1,19 @@
|
||||
lfc_lib = static_library('lfc',
|
||||
lfc_lib = static_library(
|
||||
'lfc',
|
||||
'lfc_controller.cc',
|
||||
'lfc_controller.h',
|
||||
'lfc_log.cc',
|
||||
'lfc_log.h',
|
||||
'lfc_messages.cc',
|
||||
'lfc_messages.h',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
link_with: libs_built_so_far,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
kea_lfc_exe = executable('kea-lfc',
|
||||
executable(
|
||||
'kea-lfc',
|
||||
'main.cc',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'sbin',
|
||||
link_with: libs_built_so_far + [lfc_lib],
|
||||
link_with: LIBS_BUILT_SO_FAR + [lfc_lib],
|
||||
)
|
||||
|
@ -1,4 +1,5 @@
|
||||
perfdhcplib_lib = static_library('perfdhcplib',
|
||||
perfdhcplib_lib = static_library(
|
||||
'perfdhcplib',
|
||||
'abstract_scen.h',
|
||||
'avalanche_scen.cc',
|
||||
'avalanche_scen.h',
|
||||
@ -24,13 +25,14 @@ perfdhcplib_lib = static_library('perfdhcplib',
|
||||
'stats_mgr.h',
|
||||
'test_control.cc',
|
||||
'test_control.h',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
link_with: libs_built_so_far,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
perfdhcp_exe = executable('perfdhcp',
|
||||
executable(
|
||||
'perfdhcp',
|
||||
'main.cc',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'sbin',
|
||||
link_with: libs_built_so_far + [perfdhcplib_lib],
|
||||
link_with: LIBS_BUILT_SO_FAR + [perfdhcplib_lib],
|
||||
)
|
||||
|
@ -1,12 +1,13 @@
|
||||
dhcp_bootp_lib = library('dhcp_bootp',
|
||||
dhcp_bootp_lib = library(
|
||||
'dhcp_bootp',
|
||||
'bootp_callouts.cc',
|
||||
'bootp_log.cc',
|
||||
'bootp_log.h',
|
||||
'bootp_messages.cc',
|
||||
'bootp_messages.h',
|
||||
'version.cc',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib/kea/hooks',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
|
@ -1,4 +1,5 @@
|
||||
dhcp_flex_option_lib = library('dhcp_flex_option',
|
||||
dhcp_flex_option_lib = library(
|
||||
'dhcp_flex_option',
|
||||
'flex_option.cc',
|
||||
'flex_option.h',
|
||||
'flex_option_callouts.cc',
|
||||
@ -7,8 +8,9 @@ dhcp_flex_option_lib = library('dhcp_flex_option',
|
||||
'flex_option_messages.cc',
|
||||
'flex_option_messages.h',
|
||||
'version.cc',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
dependencies: [crypto],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib/kea/hooks',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
|
@ -1,4 +1,5 @@
|
||||
dhcp_high_availability_lib = library('dhcp_high_availability',
|
||||
dhcp_high_availability_lib = library(
|
||||
'dhcp_high_availability',
|
||||
'command_creator.cc',
|
||||
'command_creator.h',
|
||||
'communication_state.cc',
|
||||
@ -28,8 +29,8 @@ dhcp_high_availability_lib = library('dhcp_high_availability',
|
||||
'query_filter.h',
|
||||
'version.cc',
|
||||
dependencies: [crypto],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib/kea/hooks',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
|
@ -1,4 +1,5 @@
|
||||
dhcp_lease_cmds_lib = library('dhcp_lease_cmds',
|
||||
dhcp_lease_cmds_lib = library(
|
||||
'dhcp_lease_cmds',
|
||||
'lease_cmds.cc',
|
||||
'lease_cmds.h',
|
||||
'lease_cmds_callouts.cc',
|
||||
@ -10,8 +11,9 @@ dhcp_lease_cmds_lib = library('dhcp_lease_cmds',
|
||||
'lease_parser.cc',
|
||||
'lease_parser.h',
|
||||
'version.cc',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
dependencies: [crypto],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib/kea/hooks',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
|
@ -2,7 +2,8 @@ if not mysql.found()
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
dhcp_mysql_lib = library('dhcp_mysql',
|
||||
dhcp_mysql_lib = library(
|
||||
'dhcp_mysql',
|
||||
'mysql_callouts.cc',
|
||||
'mysql_cb_dhcp4.cc',
|
||||
'mysql_cb_dhcp4.h',
|
||||
@ -28,9 +29,9 @@ dhcp_mysql_lib = library('dhcp_mysql',
|
||||
'mysql_lease_mgr.h',
|
||||
'mysql_query_macros_dhcp.h',
|
||||
'version.cc',
|
||||
dependencies: [mysql],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
dependencies: [crypto, mysql],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib/kea/hooks',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
|
@ -1,4 +1,5 @@
|
||||
dhcp_perfmon_lib = library('dhcp_perfmon',
|
||||
dhcp_perfmon_lib = library(
|
||||
'dhcp_perfmon',
|
||||
'alarm.cc',
|
||||
'alarm.h',
|
||||
'alarm_store.cc',
|
||||
@ -17,8 +18,9 @@ dhcp_perfmon_lib = library('dhcp_perfmon',
|
||||
'perfmon_mgr.cc',
|
||||
'perfmon_mgr.h',
|
||||
'version.cc',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
dependencies: [crypto],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib/kea/hooks',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
|
@ -1,8 +1,9 @@
|
||||
if not postgresql.found()
|
||||
if not postgresql.found() or not postgresql_server_header.found()
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
dhcp_pgsql_lib = library('dhcp_pgsql',
|
||||
dhcp_pgsql_lib = library(
|
||||
'dhcp_pgsql',
|
||||
'pgsql_callouts.cc',
|
||||
'pgsql_cb_dhcp4.cc',
|
||||
'pgsql_cb_dhcp4.h',
|
||||
@ -28,9 +29,9 @@ dhcp_pgsql_lib = library('dhcp_pgsql',
|
||||
'pgsql_lease_mgr.h',
|
||||
'pgsql_query_macros_dhcp.h',
|
||||
'version.cc',
|
||||
dependencies: [postgresql],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
dependencies: [crypto, postgresql],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib/kea/hooks',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
|
@ -1,4 +1,5 @@
|
||||
dhcp_run_script_lib = library('dhcp_run_script',
|
||||
dhcp_run_script_lib = library(
|
||||
'dhcp_run_script',
|
||||
'run_script.cc',
|
||||
'run_script.h',
|
||||
'run_script_callouts.cc',
|
||||
@ -7,8 +8,9 @@ dhcp_run_script_lib = library('dhcp_run_script',
|
||||
'run_script_messages.cc',
|
||||
'run_script_messages.h',
|
||||
'version.cc',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
dependencies: [crypto],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib/kea/hooks',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
|
@ -1,4 +1,5 @@
|
||||
dhcp_stat_cmds_lib = library('dhcp_stat_cmds',
|
||||
dhcp_stat_cmds_lib = library(
|
||||
'dhcp_stat_cmds',
|
||||
'stat_cmds.cc',
|
||||
'stat_cmds.h',
|
||||
'stat_cmds_callouts.cc',
|
||||
@ -7,8 +8,9 @@ dhcp_stat_cmds_lib = library('dhcp_stat_cmds',
|
||||
'stat_cmds_messages.cc',
|
||||
'stat_cmds_messages.h',
|
||||
'version.cc',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
dependencies: [crypto],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib/kea/hooks',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
|
@ -1,4 +1,5 @@
|
||||
dhcp_user_chk_lib = library('dhcp_user_chk',
|
||||
dhcp_user_chk_lib = library(
|
||||
'dhcp_user_chk',
|
||||
'load_unload.cc',
|
||||
'pkt_receive_co.cc',
|
||||
'pkt_send_co.cc',
|
||||
@ -16,8 +17,8 @@ dhcp_user_chk_lib = library('dhcp_user_chk',
|
||||
'user_registry.cc',
|
||||
'user_registry.h',
|
||||
'version.cc',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib/kea/hooks',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
|
@ -1,14 +1,15 @@
|
||||
kea_asiodns_lib = library('kea-asiodns',
|
||||
kea_asiodns_lib = library(
|
||||
'kea-asiodns',
|
||||
'asiodns_messages.cc',
|
||||
'asiodns_messages.h',
|
||||
'io_fetch.cc',
|
||||
'io_fetch.h',
|
||||
'logger.cc',
|
||||
'logger.h',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far = [kea_asiodns_lib] + libs_built_so_far
|
||||
LIBS_BUILT_SO_FAR = [kea_asiodns_lib] + LIBS_BUILT_SO_FAR
|
||||
subdir('tests')
|
||||
|
@ -1,8 +1,9 @@
|
||||
kea_asiodns_tests_exe = executable('kea-asiodns-tests',
|
||||
kea_asiodns_tests = executable(
|
||||
'kea-asiodns-tests',
|
||||
'io_fetch_unittest.cc',
|
||||
'run_unittests.cc',
|
||||
dependencies: [gtest],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
link_with: libs_built_so_far + [kea_testutils_lib, kea_util_unittests_lib],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
link_with: LIBS_BUILT_SO_FAR + [kea_testutils_lib, kea_util_unittests_lib],
|
||||
)
|
||||
test('kea_asiodns_tests_exe', kea_asiodns_tests_exe)
|
||||
test('kea_asiodns_tests', kea_asiodns_tests, protocol: 'gtest')
|
||||
|
@ -1,4 +1,5 @@
|
||||
kea_asiolink_lib = library('kea-asiolink',
|
||||
kea_asiolink_lib = library(
|
||||
'kea-asiolink',
|
||||
'addr_utilities.cc',
|
||||
'addr_utilities.h',
|
||||
'asiolink.h',
|
||||
@ -45,9 +46,9 @@ kea_asiolink_lib = library('kea-asiolink',
|
||||
'unix_domain_socket_acceptor.h',
|
||||
'unix_domain_socket_endpoint.h',
|
||||
dependencies: crypto,
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far += [kea_asiolink_lib]
|
||||
LIBS_BUILT_SO_FAR = [kea_asiolink_lib] + LIBS_BUILT_SO_FAR
|
||||
|
@ -1,4 +1,5 @@
|
||||
kea_cc_lib = library('kea-cc',
|
||||
kea_cc_lib = library(
|
||||
'kea-cc',
|
||||
'base_stamped_element.cc',
|
||||
'base_stamped_element.h',
|
||||
'cfg_to_element.h',
|
||||
@ -6,6 +7,8 @@ kea_cc_lib = library('kea-cc',
|
||||
'command_interpreter.h',
|
||||
'data.cc',
|
||||
'data.h',
|
||||
'default_credentials.cc',
|
||||
'default_credentials.h',
|
||||
'dhcp_config_error.h',
|
||||
'element_value.h',
|
||||
'json_feed.cc',
|
||||
@ -20,10 +23,10 @@ kea_cc_lib = library('kea-cc',
|
||||
'stamped_value.h',
|
||||
'user_context.cc',
|
||||
'user_context.h',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far = [kea_cc_lib] + libs_built_so_far
|
||||
LIBS_BUILT_SO_FAR = [kea_cc_lib] + LIBS_BUILT_SO_FAR
|
||||
subdir('tests')
|
||||
|
@ -1,4 +1,5 @@
|
||||
kea_cc_tests_exe = executable('kea-cc-tests',
|
||||
kea_cc_tests = executable(
|
||||
'kea-cc-tests',
|
||||
'command_interpreter_unittests.cc',
|
||||
'data_file_unittests.cc',
|
||||
'data_unittests.cc',
|
||||
@ -11,7 +12,7 @@ kea_cc_tests_exe = executable('kea-cc-tests',
|
||||
'stamped_value_unittest.cc',
|
||||
'user_context_unittests.cc',
|
||||
dependencies: [gtest],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
link_with: libs_built_so_far + [kea_util_unittests_lib],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
link_with: LIBS_BUILT_SO_FAR + [kea_util_unittests_lib],
|
||||
)
|
||||
test('kea_cc_tests_exe', kea_cc_tests_exe)
|
||||
test('kea_cc_tests', kea_cc_tests, protocol: 'gtest')
|
||||
|
@ -1,4 +1,5 @@
|
||||
kea_config_lib = library('kea-config',
|
||||
kea_config_lib = library(
|
||||
'kea-config',
|
||||
'base_command_mgr.cc',
|
||||
'base_command_mgr.h',
|
||||
'client_connection.cc',
|
||||
@ -25,12 +26,14 @@ kea_config_lib = library('kea-config',
|
||||
'http_command_response_creator.h',
|
||||
'http_command_response_creator_factory.h',
|
||||
'timeouts.h',
|
||||
'unix_command_config.cc',
|
||||
'unix_command_config.h',
|
||||
'unix_command_mgr.cc',
|
||||
'unix_command_mgr.h',
|
||||
dependencies: [crypto],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far += [kea_config_lib]
|
||||
LIBS_BUILT_SO_FAR = [kea_config_lib] + LIBS_BUILT_SO_FAR
|
||||
|
@ -1,12 +1,13 @@
|
||||
kea_config_backend_lib = library('kea-config_backend',
|
||||
kea_config_backend_lib = library(
|
||||
'kea-config_backend',
|
||||
'base_config_backend.h',
|
||||
'base_config_backend_mgr.h',
|
||||
'base_config_backend_pool.h',
|
||||
'constants.h',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far = [kea_config_backend_lib] + libs_built_so_far
|
||||
LIBS_BUILT_SO_FAR = [kea_config_backend_lib] + LIBS_BUILT_SO_FAR
|
||||
subdir('tests')
|
||||
|
@ -1,8 +1,9 @@
|
||||
kea_config_backend_tests_exe = executable('kea-config_backend-tests',
|
||||
kea_config_backend_tests = executable(
|
||||
'kea-config_backend-tests',
|
||||
'config_backend_mgr_unittest.cc',
|
||||
'run_unittests.cc',
|
||||
dependencies: [gtest],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
link_with: libs_built_so_far + [kea_testutils_lib, kea_util_unittests_lib],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
link_with: LIBS_BUILT_SO_FAR + [kea_testutils_lib, kea_util_unittests_lib],
|
||||
)
|
||||
test('kea_config_backend_tests_exe', kea_config_backend_tests_exe)
|
||||
test('kea_config_backend_tests', kea_config_backend_tests, protocol: 'gtest')
|
||||
|
@ -1,4 +1,22 @@
|
||||
kea_cryptolink_lib = library('kea-cryptolink',
|
||||
sources = []
|
||||
if crypto == botan
|
||||
sources += [
|
||||
'botan_common.h',
|
||||
'botan_hash.cc',
|
||||
'botan_hmac.cc',
|
||||
'botan_link.cc',
|
||||
]
|
||||
elif crypto == openssl
|
||||
sources += [
|
||||
'openssl_common.h',
|
||||
'openssl_hash.cc',
|
||||
'openssl_hmac.cc',
|
||||
'openssl_link.cc',
|
||||
]
|
||||
endif
|
||||
|
||||
kea_cryptolink_lib = library(
|
||||
'kea-cryptolink',
|
||||
'cryptolink.cc',
|
||||
'cryptolink.h',
|
||||
'crypto_hash.cc',
|
||||
@ -7,15 +25,12 @@ kea_cryptolink_lib = library('kea-cryptolink',
|
||||
'crypto_hmac.h',
|
||||
'crypto_rng.cc',
|
||||
'crypto_rng.h',
|
||||
'openssl_common.h',
|
||||
'openssl_hash.cc',
|
||||
'openssl_hmac.cc',
|
||||
'openssl_link.cc',
|
||||
sources,
|
||||
dependencies: [crypto],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far = [kea_cryptolink_lib] + libs_built_so_far
|
||||
LIBS_BUILT_SO_FAR = [kea_cryptolink_lib] + LIBS_BUILT_SO_FAR
|
||||
subdir('tests')
|
||||
|
@ -1,10 +1,11 @@
|
||||
kea_cryptolink_tests_exe = executable('kea-cryptolink-tests',
|
||||
kea_cryptolink_tests = executable(
|
||||
'kea-cryptolink-tests',
|
||||
'crypto_unittests.cc',
|
||||
'hash_unittests.cc',
|
||||
'hmac_unittests.cc',
|
||||
'run_unittests.cc',
|
||||
dependencies: [gtest],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
link_with: libs_built_so_far + [kea_util_unittests_lib],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
link_with: LIBS_BUILT_SO_FAR + [kea_util_unittests_lib],
|
||||
)
|
||||
test('kea_cryptolink_tests_exe', kea_cryptolink_tests_exe)
|
||||
test('kea_cryptolink_tests', kea_cryptolink_tests, protocol: 'gtest')
|
||||
|
@ -1,4 +1,5 @@
|
||||
kea_d2srv_lib = library('kea-d2srv',
|
||||
kea_d2srv_lib = library(
|
||||
'kea-d2srv',
|
||||
'd2_cfg_mgr.cc',
|
||||
'd2_cfg_mgr.h',
|
||||
'd2_config.cc',
|
||||
@ -21,9 +22,10 @@ kea_d2srv_lib = library('kea-d2srv',
|
||||
'dns_client.h',
|
||||
'nc_trans.cc',
|
||||
'nc_trans.h',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
dependencies: [crypto],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far += [kea_d2srv_lib]
|
||||
LIBS_BUILT_SO_FAR = [kea_d2srv_lib] + LIBS_BUILT_SO_FAR
|
||||
|
@ -1,4 +1,5 @@
|
||||
kea_database_lib = library('kea-database',
|
||||
kea_database_lib = library(
|
||||
'kea-database',
|
||||
'audit_entry.cc',
|
||||
'audit_entry.h',
|
||||
'backend_selector.cc',
|
||||
@ -18,10 +19,10 @@ kea_database_lib = library('kea-database',
|
||||
'server_collection.h',
|
||||
'server_selector.cc',
|
||||
'server_selector.h',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far = [kea_database_lib] + libs_built_so_far
|
||||
LIBS_BUILT_SO_FAR = [kea_database_lib] + LIBS_BUILT_SO_FAR
|
||||
subdir('tests')
|
||||
|
@ -1,4 +1,5 @@
|
||||
kea_database_tests_exe = executable('kea-database-tests',
|
||||
kea_database_tests = executable(
|
||||
'kea-database-tests',
|
||||
'audit_entry_unittest.cc',
|
||||
'backend_selector_unittest.cc',
|
||||
'database_connection_unittest.cc',
|
||||
@ -8,7 +9,7 @@ kea_database_tests_exe = executable('kea-database-tests',
|
||||
'server_selector_unittest.cc',
|
||||
'server_unittest.cc',
|
||||
dependencies: [gtest],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
link_with: libs_built_so_far + [kea_testutils_lib, kea_util_unittests_lib],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
link_with: LIBS_BUILT_SO_FAR + [kea_testutils_lib, kea_util_unittests_lib],
|
||||
)
|
||||
test('kea_database_tests_exe', kea_database_tests_exe)
|
||||
test('kea_database_tests', kea_database_tests, protocol: 'gtest')
|
||||
|
@ -1,20 +1,19 @@
|
||||
system = build_machine.system()
|
||||
pkt_filter_cc = 'pkt_filter_bpf.cc'
|
||||
pkt_filter_h = 'pkt_filter_bpf.h'
|
||||
if system == 'linux'
|
||||
if SYSTEM == 'linux'
|
||||
iface_mgr = 'iface_mgr_linux.cc'
|
||||
pkt_filter_cc = 'pkt_filter_lpf.cc'
|
||||
pkt_filter_h = 'pkt_filter_lpf.h'
|
||||
elif system == 'freebsd' or system == 'netbsd' or system == 'openbsd' or system == 'darwin'
|
||||
elif SYSTEM == 'freebsd' or SYSTEM == 'netbsd' or SYSTEM == 'openbsd' or SYSTEM == 'darwin'
|
||||
iface_mgr = 'iface_mgr_bsd.cc'
|
||||
elif system == 'sun'
|
||||
elif SYSTEM == 'sun'
|
||||
iface_mgr = 'iface_mgr_sun.cc'
|
||||
elif system == 'osx'
|
||||
else
|
||||
error(f'Build failed: Unsupported system "@system@".')
|
||||
error(f'Build failed: Unsupported system "@SYSTEM@".')
|
||||
endif
|
||||
|
||||
kea_dhcp_lib = library('kea-dhcp',
|
||||
kea_dhcp_lib = library(
|
||||
'kea-dhcp',
|
||||
'classify.cc',
|
||||
'classify.h',
|
||||
'dhcp4.h',
|
||||
@ -111,9 +110,9 @@ kea_dhcp_lib = library('kea-dhcp',
|
||||
'protocol_util.h',
|
||||
'socket_info.h',
|
||||
'std_option_defs.h',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far += [kea_dhcp_lib]
|
||||
LIBS_BUILT_SO_FAR = [kea_dhcp_lib] + LIBS_BUILT_SO_FAR
|
||||
|
@ -1,4 +1,5 @@
|
||||
kea_dhcp_ddns_lib = library('kea-dhcp_ddns',
|
||||
kea_dhcp_ddns_lib = library(
|
||||
'kea-dhcp_ddns',
|
||||
'dhcp_ddns_log.cc',
|
||||
'dhcp_ddns_log.h',
|
||||
'dhcp_ddns_messages.cc',
|
||||
@ -9,10 +10,10 @@ kea_dhcp_ddns_lib = library('kea-dhcp_ddns',
|
||||
'ncr_msg.h',
|
||||
'ncr_udp.cc',
|
||||
'ncr_udp.h',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far = [kea_dhcp_ddns_lib] + libs_built_so_far
|
||||
LIBS_BUILT_SO_FAR = [kea_dhcp_ddns_lib] + LIBS_BUILT_SO_FAR
|
||||
subdir('tests')
|
||||
|
@ -1,11 +1,12 @@
|
||||
kea_dhcp_ddns_tests_exe = executable('kea-dhcp_ddns-tests',
|
||||
kea_dhcp_ddns_tests = executable(
|
||||
'kea-dhcp_ddns-tests',
|
||||
'ncr_udp_unittests.cc',
|
||||
'ncr_unittests.cc',
|
||||
'run_unittests.cc',
|
||||
'test_utils.cc',
|
||||
'test_utils.h',
|
||||
dependencies: [gtest],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
link_with: libs_built_so_far + [kea_testutils_lib, kea_util_unittests_lib],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
link_with: LIBS_BUILT_SO_FAR + [kea_testutils_lib, kea_util_unittests_lib],
|
||||
)
|
||||
test('kea_dhcp_ddns_tests_exe', kea_dhcp_ddns_tests_exe)
|
||||
test('kea_dhcp_ddns_tests', kea_dhcp_ddns_tests, protocol: 'gtest')
|
||||
|
@ -1,4 +1,5 @@
|
||||
kea_dhcpsrv_lib = library('kea-dhcpsrv',
|
||||
kea_dhcpsrv_lib = library(
|
||||
'kea-dhcpsrv',
|
||||
'allocation_state.cc',
|
||||
'allocation_state.h',
|
||||
'allocator.cc',
|
||||
@ -76,6 +77,8 @@ kea_dhcpsrv_lib = library('kea-dhcpsrv',
|
||||
'd2_client_mgr.cc',
|
||||
'd2_client_mgr.h',
|
||||
'db_type.h',
|
||||
'ddns_params.cc',
|
||||
'ddns_params.h',
|
||||
'dhcp4o6_ipc.cc',
|
||||
'dhcp4o6_ipc.h',
|
||||
'dhcpsrv_exceptions.h',
|
||||
@ -186,10 +189,14 @@ kea_dhcpsrv_lib = library('kea-dhcpsrv',
|
||||
'tracking_lease_mgr.h',
|
||||
'utils.h',
|
||||
'writable_host_data_source.h',
|
||||
cpp_args: ['-DDHCP_DATA_DIR="@0@"'.format(meson.current_build_dir()), f'-DKEA_LFC_EXECUTABLE="@kea_lfc@"'],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
cpp_args: [
|
||||
f'-DDHCP_DATA_DIR="@TOP_BUILD_DIR@"',
|
||||
f'-DKEA_LFC_EXECUTABLE="@KEA_LFC@"',
|
||||
],
|
||||
dependencies: [crypto],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far += [kea_dhcpsrv_lib]
|
||||
LIBS_BUILT_SO_FAR = [kea_dhcpsrv_lib] + LIBS_BUILT_SO_FAR
|
||||
|
@ -1,4 +1,5 @@
|
||||
kea_dns_lib = library('kea-dns',
|
||||
kea_dns_lib = library(
|
||||
'kea-dns',
|
||||
'char_string.cc',
|
||||
'char_string.h',
|
||||
'edns.cc',
|
||||
@ -55,10 +56,10 @@ kea_dns_lib = library('kea-dns',
|
||||
'tsigrecord.cc',
|
||||
'tsigrecord.h',
|
||||
'txt_like.h',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far = [kea_dns_lib] + libs_built_so_far
|
||||
LIBS_BUILT_SO_FAR = [kea_dns_lib] + LIBS_BUILT_SO_FAR
|
||||
subdir('tests')
|
||||
|
@ -1,4 +1,5 @@
|
||||
kea_dns_tests_exe = executable('kea-dns-tests',
|
||||
kea_dns_tests = executable(
|
||||
'kea-dns-tests',
|
||||
'dns_exceptions_unittest.cc',
|
||||
'edns_unittest.cc',
|
||||
'labelsequence_unittest.cc',
|
||||
@ -44,11 +45,11 @@ kea_dns_tests_exe = executable('kea-dns-tests',
|
||||
'unittest_util.cc',
|
||||
'unittest_util.h',
|
||||
cpp_args: [
|
||||
'-DTEST_DATA_BUILDDIR="@0@/testdata"'.format(meson.current_build_dir()),
|
||||
'-DTEST_DATA_SRCDIR="@0@/testdata"'.format(meson.current_source_dir()),
|
||||
f'-DTEST_DATA_BUILDDIR="@TOP_BUILD_DIR@/src/lib/dns/tests/testdata"',
|
||||
f'-DTEST_DATA_SRCDIR="@TOP_SOURCE_DIR@/src/lib/dns/tests/testdata"',
|
||||
],
|
||||
dependencies: [gtest],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
link_with: libs_built_so_far + [kea_util_unittests_lib],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
link_with: LIBS_BUILT_SO_FAR + [kea_util_unittests_lib],
|
||||
)
|
||||
test('kea_dns_tests_exe', kea_dns_tests_exe)
|
||||
test('kea_dns_tests', kea_dns_tests, protocol: 'gtest')
|
||||
|
@ -1,4 +1,5 @@
|
||||
kea_eval_lib = library('kea-eval',
|
||||
kea_eval_lib = library(
|
||||
'kea-eval',
|
||||
'dependency.cc',
|
||||
'dependency.h',
|
||||
'evaluate.cc',
|
||||
@ -15,10 +16,10 @@ kea_eval_lib = library('kea-eval',
|
||||
'parser.h',
|
||||
'token.cc',
|
||||
'token.h',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far = [kea_eval_lib] + libs_built_so_far
|
||||
LIBS_BUILT_SO_FAR = [kea_eval_lib] + LIBS_BUILT_SO_FAR
|
||||
subdir('tests')
|
||||
|
@ -1,4 +1,5 @@
|
||||
kea_eval_tests_exe = executable('kea-eval-tests',
|
||||
kea_eval_tests = executable(
|
||||
'kea-eval-tests',
|
||||
'boolean_unittest.cc',
|
||||
'context_unittest.cc',
|
||||
'dependency_unittest.cc',
|
||||
@ -6,7 +7,7 @@ kea_eval_tests_exe = executable('kea-eval-tests',
|
||||
'run_unittests.cc',
|
||||
'token_unittest.cc',
|
||||
dependencies: [gtest],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
link_with: libs_built_so_far + [kea_testutils_lib, kea_util_unittests_lib],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
link_with: LIBS_BUILT_SO_FAR + [kea_testutils_lib, kea_util_unittests_lib],
|
||||
)
|
||||
test('kea_eval_tests_exe', kea_eval_tests_exe)
|
||||
test('kea_eval_tests', kea_eval_tests, protocol: 'gtest')
|
||||
|
@ -1,11 +1,12 @@
|
||||
kea_exceptions_lib = library('kea-exceptions',
|
||||
kea_exceptions_lib = library(
|
||||
'kea-exceptions',
|
||||
'exceptions.cc',
|
||||
'exceptions.h',
|
||||
'isc_assert.h',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far = [kea_exceptions_lib] + libs_built_so_far
|
||||
LIBS_BUILT_SO_FAR = [kea_exceptions_lib] + LIBS_BUILT_SO_FAR
|
||||
subdir('tests')
|
||||
|
@ -1,8 +1,9 @@
|
||||
kea_exceptions_tests_exe = executable('kea-exceptions-tests',
|
||||
kea_exceptions_tests = executable(
|
||||
'kea-exceptions-tests',
|
||||
'exceptions_unittest.cc',
|
||||
'run_unittests.cc',
|
||||
dependencies: [gtest],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
link_with: libs_built_so_far,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
test('kea_exceptions_tests_exe', kea_exceptions_tests_exe)
|
||||
test('kea_exceptions_tests', kea_exceptions_tests, protocol: 'gtest')
|
||||
|
@ -1,4 +1,5 @@
|
||||
kea_hooks_lib = library('kea-hooks',
|
||||
kea_hooks_lib = library(
|
||||
'kea-hooks',
|
||||
'callout_handle.cc',
|
||||
'callout_handle.h',
|
||||
'callout_handle_associate.cc',
|
||||
@ -28,10 +29,10 @@ kea_hooks_lib = library('kea-hooks',
|
||||
'pointer_converter.h',
|
||||
'server_hooks.cc',
|
||||
'server_hooks.h',
|
||||
cpp_args: ['-DDEFAULT_HOOKS_PATH="@0@"'.format(meson.current_build_dir())],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
cpp_args: [f'-DDEFAULT_HOOKS_PATH="@TOP_BUILD_DIR@"'],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far += [kea_hooks_lib]
|
||||
LIBS_BUILT_SO_FAR = [kea_hooks_lib] + LIBS_BUILT_SO_FAR
|
||||
|
@ -1,4 +1,5 @@
|
||||
kea_http_lib = library('kea-http',
|
||||
kea_http_lib = library(
|
||||
'kea-http',
|
||||
'auth_config.h',
|
||||
'auth_log.cc',
|
||||
'auth_log.h',
|
||||
@ -57,9 +58,9 @@ kea_http_lib = library('kea-http',
|
||||
'url.cc',
|
||||
'url.h',
|
||||
dependencies: [crypto],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far += [kea_http_lib]
|
||||
LIBS_BUILT_SO_FAR = [kea_http_lib] + LIBS_BUILT_SO_FAR
|
||||
|
@ -1,8 +1,5 @@
|
||||
sources = [
|
||||
'message.cc']
|
||||
|
||||
kea_msg_compiler = executable('kea-msg-compiler',
|
||||
sources,
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
link_with : [exceptions_lib, log_lib, util_lib],
|
||||
executable('kea-msg-compiler',
|
||||
'message.cc',
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
link_with : LIBS_BUILT_SO_FAR,
|
||||
install : true)
|
||||
|
@ -1,13 +1,14 @@
|
||||
kea_log_interprocess_lib = library('kea-log-interprocess',
|
||||
kea_log_interprocess_lib = library(
|
||||
'kea-log-interprocess',
|
||||
'interprocess_sync.h',
|
||||
'interprocess_sync_file.cc',
|
||||
'interprocess_sync_file.h',
|
||||
'interprocess_sync_null.cc',
|
||||
'interprocess_sync_null.h',
|
||||
cpp_args: ['-DLOCKFILE_DIR="@0@"'.format(meson.current_build_dir())],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
cpp_args: [f'-DLOCKFILE_DIR="@TOP_BUILD_DIR@"'],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far = [kea_log_interprocess_lib] + libs_built_so_far
|
||||
LIBS_BUILT_SO_FAR = [kea_log_interprocess_lib] + LIBS_BUILT_SO_FAR
|
||||
|
@ -1,5 +1,6 @@
|
||||
subdir('interprocess')
|
||||
kea_log_lib = library('kea-log',
|
||||
kea_log_lib = library(
|
||||
'kea-log',
|
||||
'buffer_appender_impl.cc',
|
||||
'buffer_appender_impl.h',
|
||||
'logger.cc',
|
||||
@ -40,12 +41,12 @@ kea_log_lib = library('kea-log',
|
||||
'message_types.h',
|
||||
'output_option.cc',
|
||||
'output_option.h',
|
||||
cpp_args: ['-DTOP_BUILDDIR="@0@"'.format(meson.project_build_root())],
|
||||
cpp_args: [f'-DTOP_BUILDDIR="@TOP_BUILD_DIR@"'],
|
||||
dependencies: [log4cplus],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far = [kea_log_lib] + libs_built_so_far
|
||||
LIBS_BUILT_SO_FAR = [kea_log_lib] + LIBS_BUILT_SO_FAR
|
||||
subdir('tests')
|
||||
|
@ -2,6 +2,7 @@ SUBDIRS = .
|
||||
|
||||
# Define the flags used in each set of tests.
|
||||
AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
|
||||
AM_CPPFLAGS += -DTEMP_DIR=\"${build_dir}\"
|
||||
AM_CPPFLAGS += $(BOOST_INCLUDES) $(GTEST_INCLUDES) $(LOG4CPLUS_INCLUDES)
|
||||
|
||||
AM_CXXFLAGS = $(KEA_CXXFLAGS)
|
||||
|
@ -1,4 +1,5 @@
|
||||
kea_log_tests_exe = executable('kea-log-tests',
|
||||
kea_log_tests = executable(
|
||||
'kea-log-tests',
|
||||
'buffer_appender_unittest.cc',
|
||||
'logger_level_impl_unittest.cc',
|
||||
'logger_level_unittest.cc',
|
||||
@ -14,9 +15,9 @@ kea_log_tests_exe = executable('kea-log-tests',
|
||||
'message_reader_unittest.cc',
|
||||
'output_option_unittest.cc',
|
||||
'run_unittests.cc',
|
||||
cpp_args: ['-DTEMP_DIR="@0@"'.format(meson.current_build_dir())],
|
||||
cpp_args: [f'-DTEMP_DIR="@TOP_BUILD_DIR@"'],
|
||||
dependencies: [gtest, log4cplus],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
link_with: libs_built_so_far + [kea_util_unittests_lib],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
link_with: LIBS_BUILT_SO_FAR + [kea_util_unittests_lib],
|
||||
)
|
||||
test('kea_log_tests_exe', kea_log_tests_exe)
|
||||
test('kea_log_tests', kea_log_tests, protocol: 'gtest')
|
||||
|
@ -1,21 +0,0 @@
|
||||
// Copyright (C) 2011-2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
#ifndef TEMPDIR_H
|
||||
#define TEMPDIR_H
|
||||
|
||||
/// \brief Define temporary directory
|
||||
///
|
||||
/// Defines the temporary directory in which temporary files used by the
|
||||
/// unit tests are created.
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace {
|
||||
std::string TEMP_DIR("@builddir@");
|
||||
}
|
||||
|
||||
#endif // TEMPDIR_H
|
@ -2,17 +2,18 @@ if not mysql.found()
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
kea_mysql_lib = library('kea-mysql',
|
||||
kea_mysql_lib = library(
|
||||
'kea-mysql',
|
||||
'mysql_binding.cc',
|
||||
'mysql_binding.h',
|
||||
'mysql_connection.cc',
|
||||
'mysql_connection.h',
|
||||
'mysql_constants.h',
|
||||
cpp_args: [f'-DKEA_ADMIN="@kea_admin@"'],
|
||||
cpp_args: [f'-DKEA_ADMIN="@KEA_ADMIN@"'],
|
||||
dependencies: [mysql],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far += [kea_mysql_lib]
|
||||
LIBS_BUILT_SO_FAR = [kea_mysql_lib] + LIBS_BUILT_SO_FAR
|
||||
|
@ -1,17 +1,18 @@
|
||||
if not postgresql.found()
|
||||
if not postgresql.found() or not postgresql_server_header.found()
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
kea_pgsql_lib = library('kea-pgsql',
|
||||
kea_pgsql_lib = library(
|
||||
'kea-pgsql',
|
||||
'pgsql_connection.cc',
|
||||
'pgsql_connection.h',
|
||||
'pgsql_exchange.cc',
|
||||
'pgsql_exchange.h',
|
||||
cpp_args: [f'-DKEA_ADMIN="@kea_admin@"'],
|
||||
dependencies: [postgresql],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
cpp_args: [f'-DKEA_ADMIN="@KEA_ADMIN@"'],
|
||||
dependencies: [postgresql, postgresql_server_header],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far += [kea_pgsql_lib]
|
||||
LIBS_BUILT_SO_FAR = [kea_pgsql_lib] + LIBS_BUILT_SO_FAR
|
||||
|
@ -1,10 +1,17 @@
|
||||
kea_cfgrpt_lib = library('kea-cfgrpt',
|
||||
config_report_cc = configure_file(
|
||||
input: 'config_report.cc.in',
|
||||
output: 'config_report.cc',
|
||||
configuration: conf_data,
|
||||
)
|
||||
|
||||
kea_cfgrpt_lib = library(
|
||||
'kea-cfgrpt',
|
||||
'cfgrpt.cc',
|
||||
'config_report.cc',
|
||||
config_report_cc,
|
||||
'config_report.h',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far = [kea_cfgrpt_lib] + libs_built_so_far
|
||||
LIBS_BUILT_SO_FAR = [kea_cfgrpt_lib] + LIBS_BUILT_SO_FAR
|
||||
|
@ -1,5 +1,6 @@
|
||||
subdir('cfgrpt')
|
||||
kea_process_lib = library('kea-process',
|
||||
kea_process_lib = library(
|
||||
'kea-process',
|
||||
'cb_ctl_base.h',
|
||||
'config_base.cc',
|
||||
'config_base.h',
|
||||
@ -24,10 +25,10 @@ kea_process_lib = library('kea-process',
|
||||
'process_messages.h',
|
||||
'redact_config.cc',
|
||||
'redact_config.h',
|
||||
cpp_args: ['-DDATA_DIR="@0@"'.format(meson.current_build_dir())],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
cpp_args: [f'-DDATA_DIR="@TOP_BUILD_DIR@"'],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far += [kea_process_lib]
|
||||
LIBS_BUILT_SO_FAR = [kea_process_lib] + LIBS_BUILT_SO_FAR
|
||||
|
@ -1,14 +1,15 @@
|
||||
kea_stats_lib = library('kea-stats',
|
||||
kea_stats_lib = library(
|
||||
'kea-stats',
|
||||
'context.cc',
|
||||
'context.h',
|
||||
'observation.cc',
|
||||
'observation.h',
|
||||
'stats_mgr.cc',
|
||||
'stats_mgr.h',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far = [kea_stats_lib] + libs_built_so_far
|
||||
LIBS_BUILT_SO_FAR = [kea_stats_lib] + LIBS_BUILT_SO_FAR
|
||||
subdir('tests')
|
||||
|
@ -1,10 +1,11 @@
|
||||
kea_stats_tests_exe = executable('kea-stats-tests',
|
||||
kea_stats_tests = executable(
|
||||
'kea-stats-tests',
|
||||
'context_unittest.cc',
|
||||
'observation_unittest.cc',
|
||||
'run_unittests.cc',
|
||||
'stats_mgr_unittest.cc',
|
||||
dependencies: [gtest],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
link_with: libs_built_so_far + [kea_testutils_lib, kea_util_unittests_lib],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
link_with: LIBS_BUILT_SO_FAR + [kea_testutils_lib, kea_util_unittests_lib],
|
||||
)
|
||||
test('kea_stats_tests_exe', kea_stats_tests_exe)
|
||||
test('kea_stats_tests', kea_stats_tests, protocol: 'gtest')
|
||||
|
@ -1,4 +1,5 @@
|
||||
kea_tcp_lib = library('kea-tcp',
|
||||
kea_tcp_lib = library(
|
||||
'kea-tcp',
|
||||
'mt_tcp_listener_mgr.cc',
|
||||
'mt_tcp_listener_mgr.h',
|
||||
'tcp_connection.cc',
|
||||
@ -15,9 +16,9 @@ kea_tcp_lib = library('kea-tcp',
|
||||
'tcp_stream_msg.cc',
|
||||
'tcp_stream_msg.h',
|
||||
dependencies: [crypto],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far += [kea_tcp_lib]
|
||||
LIBS_BUILT_SO_FAR = [kea_tcp_lib] + LIBS_BUILT_SO_FAR
|
||||
|
@ -1,4 +1,5 @@
|
||||
kea_testutils_lib = library('kea-testutils',
|
||||
kea_testutils_lib = library(
|
||||
'kea-testutils',
|
||||
'gtest_utils.h',
|
||||
'io_utils.cc',
|
||||
'io_utils.h',
|
||||
@ -15,8 +16,8 @@ kea_testutils_lib = library('kea-testutils',
|
||||
'user_context_utils.cc',
|
||||
'user_context_utils.h',
|
||||
dependencies: [gtest],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
|
@ -1,9 +1,10 @@
|
||||
kea_util_io_lib = library('kea-util-io',
|
||||
kea_util_io_lib = library(
|
||||
'kea-util-io',
|
||||
'fd.cc',
|
||||
'fd.h',
|
||||
'pktinfo_utilities.h',
|
||||
'sockaddr_util.h',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
link_with: libs_built_so_far,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
libs_built_so_far = [kea_util_io_lib] + libs_built_so_far
|
||||
LIBS_BUILT_SO_FAR = [kea_util_io_lib] + LIBS_BUILT_SO_FAR
|
||||
|
@ -1,4 +1,5 @@
|
||||
kea_util_lib = library('kea-util',
|
||||
kea_util_lib = library(
|
||||
'kea-util',
|
||||
'bigints.h',
|
||||
'boost_time_utils.cc',
|
||||
'boost_time_utils.h',
|
||||
@ -51,12 +52,12 @@ kea_util_lib = library('kea-util',
|
||||
'watched_thread.h',
|
||||
'watch_socket.cc',
|
||||
'watch_socket.h',
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: kea_exceptions_lib,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
subdir('io')
|
||||
subdir('unittests')
|
||||
libs_built_so_far = [kea_util_lib] + libs_built_so_far
|
||||
LIBS_BUILT_SO_FAR = [kea_util_lib] + LIBS_BUILT_SO_FAR
|
||||
subdir('tests')
|
||||
|
@ -1,4 +1,5 @@
|
||||
kea_util_tests_exe = executable('kea-util-tests',
|
||||
kea_util_tests = executable(
|
||||
'kea-util-tests',
|
||||
'bigint_unittest.cc',
|
||||
'boost_time_utils_unittest.cc',
|
||||
'buffer_unittest.cc',
|
||||
@ -32,9 +33,12 @@ kea_util_tests_exe = executable('kea-util-tests',
|
||||
'versioned_csv_file_unittest.cc',
|
||||
'watched_thread_unittest.cc',
|
||||
'watch_socket_unittests.cc',
|
||||
cpp_args: ['-DABS_SRCDIR="@0@"'.format(meson.current_source_dir()), '-DTEST_DATA_BUILDDIR="@0@"'.format(meson.current_build_dir())],
|
||||
cpp_args: [
|
||||
f'-DABS_SRCDIR="@TOP_SOURCE_DIR@/src/lib/util/tests"',
|
||||
f'-DTEST_DATA_BUILDDIR="@TOP_BUILD_DIR@/src/lib/util/tests"',
|
||||
],
|
||||
dependencies: [gtest],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
link_with: libs_built_so_far + [kea_util_unittests_lib],
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
link_with: LIBS_BUILT_SO_FAR + [kea_util_unittests_lib],
|
||||
)
|
||||
test('kea_util_tests_exe', kea_util_tests_exe)
|
||||
test('kea_util_tests', kea_util_tests, protocol: 'gtest')
|
||||
|
@ -1,4 +1,5 @@
|
||||
kea_util_unittests_lib = library('kea-util-unittests',
|
||||
kea_util_unittests_lib = library(
|
||||
'kea-util-unittests',
|
||||
'check_valgrind.cc',
|
||||
'check_valgrind.h',
|
||||
'fork.cc',
|
||||
@ -17,6 +18,6 @@ kea_util_unittests_lib = library('kea-util-unittests',
|
||||
'wiredata.cc',
|
||||
'wiredata.h',
|
||||
dependencies: [gtest],
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
link_with: libs_built_so_far,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
)
|
||||
|
@ -2,7 +2,8 @@ if not netconf_deps_found
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
kea_yang_lib = library('kea-yang',
|
||||
kea_yang_lib = library(
|
||||
'kea-yang',
|
||||
'adaptor.cc',
|
||||
'adaptor.h',
|
||||
'adaptor_config.cc',
|
||||
@ -45,9 +46,10 @@ kea_yang_lib = library('kea-yang',
|
||||
'yang_models.h',
|
||||
'yang_revisions.h',
|
||||
dependencies: netconf_deps_array,
|
||||
include_directories: [include_directories('.')] + includes,
|
||||
include_directories: [include_directories('.')] + INCLUDES,
|
||||
install: true,
|
||||
install_dir: 'lib',
|
||||
link_with: libs_built_so_far,
|
||||
link_with: LIBS_BUILT_SO_FAR,
|
||||
override_options: ['cpp_std=c++20'],
|
||||
)
|
||||
libs_built_so_far += [kea_yang_lib]
|
||||
LIBS_BUILT_SO_FAR = [kea_yang_lib] + LIBS_BUILT_SO_FAR
|
||||
|
@ -0,0 +1 @@
|
||||
|
@ -0,0 +1 @@
|
||||
|
@ -0,0 +1 @@
|
||||
|
Loading…
x
Reference in New Issue
Block a user