From 0629db330c32d65f69607c1cf39e3172b4978174 Mon Sep 17 00:00:00 2001 From: Andrei Pavel Date: Tue, 6 May 2025 16:09:41 +0300 Subject: [PATCH] [#3734] Meson changes facilitated by the removal of autotools --- meson-config.h.in => config.h.in | 6 ------ meson-kea_version.h.in => kea_version.h.in | 0 meson.build | 12 ++++++------ src/lib/testutils/test_to_element.h | 8 +------- 4 files changed, 7 insertions(+), 19 deletions(-) rename meson-config.h.in => config.h.in (94%) rename meson-kea_version.h.in => kea_version.h.in (100%) diff --git a/meson-config.h.in b/config.h.in similarity index 94% rename from meson-config.h.in rename to config.h.in index 21f7c2e47d..4958e2d07b 100644 --- a/meson-config.h.in +++ b/config.h.in @@ -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 header file. */ -#mesondefine HAVE_BOTAN_ASIO_STREAM_H - /* Whether gtest defines edit_distance::CreateUnifiedDiff */ #mesondefine HAVE_CREATE_UNIFIED_DIFF diff --git a/meson-kea_version.h.in b/kea_version.h.in similarity index 100% rename from meson-kea_version.h.in rename to kea_version.h.in diff --git a/meson.build b/meson.build index a79397f70e..737df0b2e4 100644 --- a/meson.build +++ b/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, diff --git a/src/lib/testutils/test_to_element.h b/src/lib/testutils/test_to_element.h index 6270d9f136..6d429b0281 100644 --- a/src/lib/testutils/test_to_element.h +++ b/src/lib/testutils/test_to_element.h @@ -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 #include #include -#ifdef HAVE_IS_BASE_OF #include -#endif #ifndef CONFIG_H_WAS_INCLUDED #error config.h must be included before test_to_element.h @@ -52,10 +50,8 @@ template void runToElementTest(const std::string& expected, const Cfg& cfg) { using namespace isc::data; -#ifdef HAVE_IS_BASE_OF static_assert(std::is_base_of::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 void runToElementTest(isc::data::ConstElementPtr expected, const Cfg& cfg) { -#ifdef HAVE_IS_BASE_OF static_assert(std::is_base_of::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)) {