Skip to content

Commit

Permalink
[#3443] Extra additions to the additions to the Meson Proof of Concept
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-pavel committed Feb 4, 2025
1 parent 7ddd626 commit 9d66d0d
Show file tree
Hide file tree
Showing 113 changed files with 698 additions and 643 deletions.
1 change: 1 addition & 0 deletions compiler-checks/have-generic-tls-method.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

int main() {
auto _(boost::asio::ssl::context::tls);
return 0;
}
1 change: 1 addition & 0 deletions compiler-checks/have-sa-len.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
int main() {
struct sockaddr sa;
sa.sa_len = 0;
return 0;
}
1 change: 1 addition & 0 deletions compiler-checks/mysql-my-bool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

int main() {
my_bool _(0);
return 0;
}
1 change: 1 addition & 0 deletions compiler-checks/stream-truncated-error.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

int main() {
auto _(boost::asio::ssl::error::stream_truncated);
return 0;
}
12 changes: 7 additions & 5 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ conf_data = configuration_data(
boost = dependency('boost', version: '>=1.66')
gtest = dependency('gtest', required: false)
log4cplus = dependency('log4cplus')
threads = dependency('threads')

# Cryptography
crypto = disabler()
Expand All @@ -135,10 +136,7 @@ elif botan.found()
conf_data.set('WITH_BOTAN', true)
message('Using Botan.')
message('Checking Botan Boost support.')
cpp.has_header(
'botan/asio_stream.h',
dependencies: botan,
required: true)
cpp.has_header('botan/asio_stream.h', dependencies: [botan], required: true)
endif
if not crypto.found()
error('Build failed: Could not find neither botan nor openssl libraries.')
Expand Down Expand Up @@ -213,7 +211,7 @@ foreach dep : ['yang', 'yang-cpp', 'sysrepo', 'sysrepo-cpp']
if lib.found()
netconf_deps = netconf_deps + {
dep: declare_dependency(
dependencies: lib,
dependencies: [lib],
include_directories: include_directories(
f'/opt/@dep@/include',
),
Expand Down Expand Up @@ -309,13 +307,17 @@ configure_file(
input: 'meson-config.h.in',
output: 'config.h',
configuration: conf_data,
install: true,
install_dir: 'include/kea',
)

# 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,
install: true,
install_dir: 'include/kea',
)

#### Default Includes
Expand Down
2 changes: 1 addition & 1 deletion src/bin/admin/kea-admin.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

# Copyright (C) 2014-2024 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2014-2025 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
Expand Down
8 changes: 2 additions & 6 deletions src/bin/admin/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ kea_admin_conf_data.set('variables', 'variables')
configure_file(
input: 'kea-admin.in',
output: 'kea-admin',
configuration: kea_admin_conf_data
)
configure_file(
input: 'admin-utils.sh.in',
output: 'admin-utils.sh',
copy: true
configuration: kea_admin_conf_data,
)
configure_file(input: 'admin-utils.sh.in', output: 'admin-utils.sh', copy: true)
# install?
2 changes: 1 addition & 1 deletion src/bin/dhcp4/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ executable(
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'sbin',
link_with: LIBS_BUILT_SO_FAR + [dhcp4_lib],
link_with: [dhcp4_lib] + LIBS_BUILT_SO_FAR,
)
12 changes: 1 addition & 11 deletions src/bin/dhcp6/meson.build
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
dhcp6_lib = static_library(
'dhcp6',
'client_handler.cc',
'client_handler.h',
'ctrl_dhcp6_srv.cc',
'ctrl_dhcp6_srv.h',
'dhcp6to4_ipc.cc',
'dhcp6to4_ipc.h',
'dhcp6_lexer.cc',
'dhcp6_log.cc',
'dhcp6_log.h',
'dhcp6_messages.cc',
'dhcp6_messages.h',
'dhcp6_parser.cc',
'dhcp6_parser.h',
'dhcp6_srv.cc',
'dhcp6_srv.h',
'json_config_parser.cc',
'json_config_parser.h',
'main.cc',
'parser_context.cc',
'parser_context.h',
'parser_context_decl.h',
dependencies: [crypto],
include_directories: [include_directories('.')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
Expand All @@ -32,5 +22,5 @@ executable(
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'sbin',
link_with: LIBS_BUILT_SO_FAR + [dhcp6_lib],
link_with: [dhcp6_lib] + LIBS_BUILT_SO_FAR,
)
7 changes: 3 additions & 4 deletions src/bin/lfc/meson.build
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
lfc_lib = static_library(
'lfc',
'lfc_controller.cc',
'lfc_controller.h',
'lfc_log.cc',
'lfc_log.h',
'lfc_messages.cc',
'lfc_messages.h',
dependencies: [boost],
include_directories: [include_directories('.')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
executable(
'kea-lfc',
'main.cc',
dependencies: [boost],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'sbin',
link_with: LIBS_BUILT_SO_FAR + [lfc_lib],
link_with: [lfc_lib] + LIBS_BUILT_SO_FAR,
)
18 changes: 3 additions & 15 deletions src/bin/perfdhcp/meson.build
Original file line number Diff line number Diff line change
@@ -1,38 +1,26 @@
perfdhcplib_lib = static_library(
'perfdhcplib',
'abstract_scen.h',
'avalanche_scen.cc',
'avalanche_scen.h',
'basic_scen.cc',
'basic_scen.h',
'command_options.cc',
'command_options.h',
'localized_option.h',
'packet_storage.h',
'perf_pkt4.cc',
'perf_pkt4.h',
'perf_pkt6.cc',
'perf_pkt6.h',
'perf_socket.cc',
'perf_socket.h',
'pkt_transform.cc',
'pkt_transform.h',
'rate_control.cc',
'rate_control.h',
'receiver.cc',
'receiver.h',
'stats_mgr.cc',
'stats_mgr.h',
'test_control.cc',
'test_control.h',
dependencies: [boost],
include_directories: [include_directories('.')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
executable(
'perfdhcp',
'main.cc',
dependencies: [boost],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'sbin',
link_with: LIBS_BUILT_SO_FAR + [perfdhcplib_lib],
link_with: [perfdhcplib_lib] + LIBS_BUILT_SO_FAR,
)
5 changes: 2 additions & 3 deletions src/hooks/dhcp/bootp/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ dhcp_bootp_lib = library(
'dhcp_bootp',
'bootp_callouts.cc',
'bootp_log.cc',
'bootp_log.h',
'bootp_messages.cc',
'bootp_messages.h',
'version.cc',
dependencies: [boost],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
link_with: LIBS_BUILT_SO_FAR,
name_suffix: 'so'
name_suffix: 'so',
)
4 changes: 1 addition & 3 deletions src/hooks/dhcp/flex_option/meson.build
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
dhcp_flex_option_lib = library(
'dhcp_flex_option',
'flex_option.cc',
'flex_option.h',
'flex_option_callouts.cc',
'flex_option_log.cc',
'flex_option_log.h',
'flex_option_messages.cc',
'flex_option_messages.h',
'version.cc',
dependencies: [crypto],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
link_with: LIBS_BUILT_SO_FAR,
name_suffix: 'so',
)
15 changes: 1 addition & 14 deletions src/hooks/dhcp/high_availability/meson.build
Original file line number Diff line number Diff line change
@@ -1,36 +1,23 @@
dhcp_high_availability_lib = library(
'dhcp_high_availability',
'command_creator.cc',
'command_creator.h',
'communication_state.cc',
'communication_state.h',
'ha_callouts.cc',
'ha_config.cc',
'ha_config.h',
'ha_config_parser.cc',
'ha_config_parser.h',
'ha_impl.cc',
'ha_impl.h',
'ha_log.cc',
'ha_log.h',
'ha_messages.cc',
'ha_messages.h',
'ha_relationship_mapper.h',
'ha_server_type.h',
'ha_service.cc',
'ha_service.h',
'ha_service_states.cc',
'ha_service_states.h',
'lease_sync_filter.cc',
'lease_sync_filter.h',
'lease_update_backlog.cc',
'lease_update_backlog.h',
'query_filter.cc',
'query_filter.h',
'version.cc',
dependencies: [crypto],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
link_with: LIBS_BUILT_SO_FAR,
name_suffix: 'so',
)
6 changes: 1 addition & 5 deletions src/hooks/dhcp/lease_cmds/meson.build
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
dhcp_lease_cmds_lib = library(
'dhcp_lease_cmds',
'lease_cmds.cc',
'lease_cmds.h',
'lease_cmds_callouts.cc',
'lease_cmds_exceptions.h',
'lease_cmds_log.cc',
'lease_cmds_log.h',
'lease_cmds_messages.cc',
'lease_cmds_messages.h',
'lease_parser.cc',
'lease_parser.h',
'version.cc',
dependencies: [crypto],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
link_with: LIBS_BUILT_SO_FAR,
name_suffix: 'so',
)
13 changes: 1 addition & 12 deletions src/hooks/dhcp/mysql/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,21 @@ dhcp_mysql_lib = library(
'dhcp_mysql',
'mysql_callouts.cc',
'mysql_cb_dhcp4.cc',
'mysql_cb_dhcp4.h',
'mysql_cb_dhcp6.cc',
'mysql_cb_dhcp6.h',
'mysql_cb_impl.cc',
'mysql_cb_impl.h',
'mysql_cb_log.cc',
'mysql_cb_log.h',
'mysql_cb_messages.cc',
'mysql_cb_messages.h',
'mysql_hb_log.cc',
'mysql_hb_log.h',
'mysql_hb_messages.cc',
'mysql_hb_messages.h',
'mysql_host_data_source.cc',
'mysql_host_data_source.h',
'mysql_lb_log.cc',
'mysql_lb_log.h',
'mysql_lb_messages.cc',
'mysql_lb_messages.h',
'mysql_lease_mgr.cc',
'mysql_lease_mgr.h',
'mysql_query_macros_dhcp.h',
'version.cc',
dependencies: [crypto, mysql],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
link_with: LIBS_BUILT_SO_FAR,
name_suffix: 'so',
)
9 changes: 1 addition & 8 deletions src/hooks/dhcp/perfmon/meson.build
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
dhcp_perfmon_lib = library(
'dhcp_perfmon',
'alarm.cc',
'alarm.h',
'alarm_store.cc',
'alarm_store.h',
'monitored_duration.cc',
'monitored_duration.h',
'monitored_duration_store.cc',
'monitored_duration_store.h',
'perfmon_callouts.cc',
'perfmon_config.cc',
'perfmon_config.h',
'perfmon_log.cc',
'perfmon_log.h',
'perfmon_messages.cc',
'perfmon_messages.h',
'perfmon_mgr.cc',
'perfmon_mgr.h',
'version.cc',
dependencies: [crypto],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
link_with: LIBS_BUILT_SO_FAR,
name_suffix: 'so',
)
13 changes: 1 addition & 12 deletions src/hooks/dhcp/pgsql/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,21 @@ dhcp_pgsql_lib = library(
'dhcp_pgsql',
'pgsql_callouts.cc',
'pgsql_cb_dhcp4.cc',
'pgsql_cb_dhcp4.h',
'pgsql_cb_dhcp6.cc',
'pgsql_cb_dhcp6.h',
'pgsql_cb_impl.cc',
'pgsql_cb_impl.h',
'pgsql_cb_log.cc',
'pgsql_cb_log.h',
'pgsql_cb_messages.cc',
'pgsql_cb_messages.h',
'pgsql_hb_log.cc',
'pgsql_hb_log.h',
'pgsql_hb_messages.cc',
'pgsql_hb_messages.h',
'pgsql_host_data_source.cc',
'pgsql_host_data_source.h',
'pgsql_lb_log.cc',
'pgsql_lb_log.h',
'pgsql_lb_messages.cc',
'pgsql_lb_messages.h',
'pgsql_lease_mgr.cc',
'pgsql_lease_mgr.h',
'pgsql_query_macros_dhcp.h',
'version.cc',
dependencies: [crypto, postgresql],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
link_with: LIBS_BUILT_SO_FAR,
name_suffix: 'so',
)
Loading

0 comments on commit 9d66d0d

Please sign in to comment.