mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-21 17:37:56 +00:00
[#3734] Meson changes facilitated by the removal of autotools
This commit is contained in:
parent
3a922204f0
commit
0629db330c
@ -13,15 +13,9 @@
|
|||||||
/* Fuzzing enabled. */
|
/* Fuzzing enabled. */
|
||||||
#mesondefine FUZZING
|
#mesondefine FUZZING
|
||||||
|
|
||||||
/* Fuzzing running in CI. */
|
|
||||||
#mesondefine FUZZING_IN_CI
|
|
||||||
|
|
||||||
/* AFL compiler enabled. */
|
/* AFL compiler enabled. */
|
||||||
#mesondefine HAVE_AFL
|
#mesondefine HAVE_AFL
|
||||||
|
|
||||||
/* Whether you have the <botan/asio_stream.h> header file. */
|
|
||||||
#mesondefine HAVE_BOTAN_ASIO_STREAM_H
|
|
||||||
|
|
||||||
/* Whether gtest defines edit_distance::CreateUnifiedDiff */
|
/* Whether gtest defines edit_distance::CreateUnifiedDiff */
|
||||||
#mesondefine HAVE_CREATE_UNIFIED_DIFF
|
#mesondefine HAVE_CREATE_UNIFIED_DIFF
|
||||||
|
|
12
meson.build
12
meson.build
@ -123,9 +123,10 @@ KEA_MSG_COMPILER = disabler()
|
|||||||
|
|
||||||
#### Configuration Data
|
#### Configuration Data
|
||||||
|
|
||||||
# 'HAVE_BOTAN_ASIO_STREAM_H': false,
|
# TODO: Remaining define macros used in code, but not handled by meson:
|
||||||
# 'HAVE_PGSQL_SSL': false,
|
# - HAVE_PGSQL_SSL
|
||||||
# 'USE_STATIC_LINK': false,
|
# - USE_STATIC_LINK
|
||||||
|
|
||||||
conf_data = configuration_data(
|
conf_data = configuration_data(
|
||||||
{
|
{
|
||||||
'PACKAGE': 'kea',
|
'PACKAGE': 'kea',
|
||||||
@ -489,7 +490,6 @@ endif
|
|||||||
#### Other checks.
|
#### Other checks.
|
||||||
|
|
||||||
if POSTGRESQL_DEP.found()
|
if POSTGRESQL_DEP.found()
|
||||||
# TODO: change to proper check, not version check.
|
|
||||||
version = POSTGRESQL_DEP.version()
|
version = POSTGRESQL_DEP.version()
|
||||||
conf_data.set(
|
conf_data.set(
|
||||||
'HAVE_PGSQL_TCP_USER_TIMEOUT',
|
'HAVE_PGSQL_TCP_USER_TIMEOUT',
|
||||||
@ -989,7 +989,7 @@ CONFIG_REPORT = configure_file(
|
|||||||
|
|
||||||
# TODO: Change to config.h.in when autotools are removed.
|
# TODO: Change to config.h.in when autotools are removed.
|
||||||
configure_file(
|
configure_file(
|
||||||
input: 'meson-config.h.in',
|
input: 'config.h.in',
|
||||||
output: 'config.h',
|
output: 'config.h',
|
||||||
configuration: conf_data,
|
configuration: conf_data,
|
||||||
install: true,
|
install: true,
|
||||||
@ -998,7 +998,7 @@ configure_file(
|
|||||||
|
|
||||||
# TODO: Change to kea_version.h.in when autotools are removed.
|
# TODO: Change to kea_version.h.in when autotools are removed.
|
||||||
configure_file(
|
configure_file(
|
||||||
input: 'meson-kea_version.h.in',
|
input: 'kea_version.h.in',
|
||||||
output: 'kea_version.h',
|
output: 'kea_version.h',
|
||||||
configuration: conf_data,
|
configuration: conf_data,
|
||||||
install: true,
|
install: true,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2017-2024 Internet Systems Consortium, Inc. ("ISC")
|
// Copyright (C) 2017-2025 Internet Systems Consortium, Inc. ("ISC")
|
||||||
//
|
//
|
||||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
// 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
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@ -11,9 +11,7 @@
|
|||||||
#include <cc/cfg_to_element.h>
|
#include <cc/cfg_to_element.h>
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#ifdef HAVE_IS_BASE_OF
|
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_H_WAS_INCLUDED
|
#ifndef CONFIG_H_WAS_INCLUDED
|
||||||
#error config.h must be included before test_to_element.h
|
#error config.h must be included before test_to_element.h
|
||||||
@ -52,10 +50,8 @@ template <typename Cfg>
|
|||||||
void
|
void
|
||||||
runToElementTest(const std::string& expected, const Cfg& cfg) {
|
runToElementTest(const std::string& expected, const Cfg& cfg) {
|
||||||
using namespace isc::data;
|
using namespace isc::data;
|
||||||
#ifdef HAVE_IS_BASE_OF
|
|
||||||
static_assert(std::is_base_of<CfgToElement, Cfg>::value,
|
static_assert(std::is_base_of<CfgToElement, Cfg>::value,
|
||||||
"CfgToElement is not a base of the template parameter");
|
"CfgToElement is not a base of the template parameter");
|
||||||
#endif
|
|
||||||
ConstElementPtr json;
|
ConstElementPtr json;
|
||||||
ASSERT_NO_THROW(json = Element::fromJSON(expected)) << expected;
|
ASSERT_NO_THROW(json = Element::fromJSON(expected)) << expected;
|
||||||
ConstElementPtr unparsed;
|
ConstElementPtr unparsed;
|
||||||
@ -77,10 +73,8 @@ runToElementTest(const std::string& expected, const Cfg& cfg) {
|
|||||||
/// @param cfg an instance of the Cfg class
|
/// @param cfg an instance of the Cfg class
|
||||||
template<typename Cfg>
|
template<typename Cfg>
|
||||||
void runToElementTest(isc::data::ConstElementPtr expected, const Cfg& cfg) {
|
void runToElementTest(isc::data::ConstElementPtr expected, const Cfg& cfg) {
|
||||||
#ifdef HAVE_IS_BASE_OF
|
|
||||||
static_assert(std::is_base_of<isc::data::CfgToElement, Cfg>::value,
|
static_assert(std::is_base_of<isc::data::CfgToElement, Cfg>::value,
|
||||||
"CfgToElement is not a base of the template parameter");
|
"CfgToElement is not a base of the template parameter");
|
||||||
#endif
|
|
||||||
isc::data::ConstElementPtr unparsed;
|
isc::data::ConstElementPtr unparsed;
|
||||||
ASSERT_NO_THROW(unparsed = cfg.toElement());
|
ASSERT_NO_THROW(unparsed = cfg.toElement());
|
||||||
if (!isEquivalent(expected, unparsed)) {
|
if (!isEquivalent(expected, unparsed)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user