mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-22 01:49:48 +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. */
|
||||
#mesondefine FUZZING
|
||||
|
||||
/* Fuzzing running in CI. */
|
||||
#mesondefine FUZZING_IN_CI
|
||||
|
||||
/* AFL compiler enabled. */
|
||||
#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 */
|
||||
#mesondefine HAVE_CREATE_UNIFIED_DIFF
|
||||
|
12
meson.build
12
meson.build
@ -123,9 +123,10 @@ KEA_MSG_COMPILER = disabler()
|
||||
|
||||
#### Configuration Data
|
||||
|
||||
# 'HAVE_BOTAN_ASIO_STREAM_H': false,
|
||||
# 'HAVE_PGSQL_SSL': false,
|
||||
# 'USE_STATIC_LINK': false,
|
||||
# TODO: Remaining define macros used in code, but not handled by meson:
|
||||
# - HAVE_PGSQL_SSL
|
||||
# - USE_STATIC_LINK
|
||||
|
||||
conf_data = configuration_data(
|
||||
{
|
||||
'PACKAGE': 'kea',
|
||||
@ -489,7 +490,6 @@ endif
|
||||
#### Other checks.
|
||||
|
||||
if POSTGRESQL_DEP.found()
|
||||
# TODO: change to proper check, not version check.
|
||||
version = POSTGRESQL_DEP.version()
|
||||
conf_data.set(
|
||||
'HAVE_PGSQL_TCP_USER_TIMEOUT',
|
||||
@ -989,7 +989,7 @@ CONFIG_REPORT = configure_file(
|
||||
|
||||
# TODO: Change to config.h.in when autotools are removed.
|
||||
configure_file(
|
||||
input: 'meson-config.h.in',
|
||||
input: 'config.h.in',
|
||||
output: 'config.h',
|
||||
configuration: conf_data,
|
||||
install: true,
|
||||
@ -998,7 +998,7 @@ configure_file(
|
||||
|
||||
# TODO: Change to kea_version.h.in when autotools are removed.
|
||||
configure_file(
|
||||
input: 'meson-kea_version.h.in',
|
||||
input: 'kea_version.h.in',
|
||||
output: 'kea_version.h',
|
||||
configuration: conf_data,
|
||||
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
|
||||
// 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 <gtest/gtest.h>
|
||||
#include <string>
|
||||
#ifdef HAVE_IS_BASE_OF
|
||||
#include <type_traits>
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_H_WAS_INCLUDED
|
||||
#error config.h must be included before test_to_element.h
|
||||
@ -52,10 +50,8 @@ template <typename Cfg>
|
||||
void
|
||||
runToElementTest(const std::string& expected, const Cfg& cfg) {
|
||||
using namespace isc::data;
|
||||
#ifdef HAVE_IS_BASE_OF
|
||||
static_assert(std::is_base_of<CfgToElement, Cfg>::value,
|
||||
"CfgToElement is not a base of the template parameter");
|
||||
#endif
|
||||
ConstElementPtr json;
|
||||
ASSERT_NO_THROW(json = Element::fromJSON(expected)) << expected;
|
||||
ConstElementPtr unparsed;
|
||||
@ -77,10 +73,8 @@ runToElementTest(const std::string& expected, const Cfg& cfg) {
|
||||
/// @param cfg an instance of the Cfg class
|
||||
template<typename 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,
|
||||
"CfgToElement is not a base of the template parameter");
|
||||
#endif
|
||||
isc::data::ConstElementPtr unparsed;
|
||||
ASSERT_NO_THROW(unparsed = cfg.toElement());
|
||||
if (!isEquivalent(expected, unparsed)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user