]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3734] Meson changes facilitated by the removal of autotools
authorAndrei Pavel <andrei@isc.org>
Tue, 6 May 2025 13:09:41 +0000 (16:09 +0300)
committerAndrei Pavel <andrei@isc.org>
Fri, 30 May 2025 07:57:39 +0000 (10:57 +0300)
config.h.in [moved from meson-config.h.in with 94% similarity]
kea_version.h.in [moved from meson-kea_version.h.in with 100% similarity]
meson.build
src/lib/testutils/test_to_element.h

similarity index 94%
rename from meson-config.h.in
rename to config.h.in
index 21f7c2e47dbbaa9ea283fc48c1ba91e664c56c56..4958e2d07b31b0736a265a383da982cb690c549b 100644 (file)
 /* 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
 
similarity index 100%
rename from meson-kea_version.h.in
rename to kea_version.h.in
index a79397f70e61909f8f0b509a042329c463b00549..737df0b2e452bd81383d6bd79f5cab4c03bd09e7 100644 (file)
@@ -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,
index 6270d9f136c0217d017dc39296585437e0b1587e..6d429b0281d8c2669917f82ec1431d6e4bcb0311 100644 (file)
@@ -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)) {