From 1ec5408d7a87a6d9a086078bf58b3e2be7b37fe2 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sun, 16 Mar 2025 15:48:48 +0000 Subject: [PATCH 1/2] Find boost in CONFIG mode of CMake To silence CMake's warning Fix #1934 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 348024b7..8c899867 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -261,7 +261,7 @@ endif() tristate_option(I18N "Native language support (i18n)") if(WANT_I18N) - find_package(Boost ${TRISTATE_I18N_REQUIRED} COMPONENTS locale) + find_package(Boost ${TRISTATE_I18N_REQUIRED} COMPONENTS locale CONFIG) find_package(Gettext ${TRISTATE_I18N_REQUIRED}) endif() if(Boost_LOCALE_FOUND AND GETTEXT_MSGFMT_EXECUTABLE) From 50f085cc2fe1aecbc0775c7f26111987e036ebec Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sun, 4 May 2025 10:36:48 +0100 Subject: [PATCH 2/2] Disable i18n test when i18n is disabled --- test/integration/tests/scripting.cpp | 4 ++++ test/integration/znctestconfig.h.cmake.in | 1 + 2 files changed, 5 insertions(+) diff --git a/test/integration/tests/scripting.cpp b/test/integration/tests/scripting.cpp index 86c3f950..442c2092 100644 --- a/test/integration/tests/scripting.cpp +++ b/test/integration/tests/scripting.cpp @@ -444,6 +444,10 @@ TEST_F(ZNCTest, ModpythonCommand) { client.Write("PRIVMSG *cmdtest :ping or"); client.ReadUntil(":*cmdtest!cmdtest@znc.in PRIVMSG nick :ping or pong"); +#ifndef HAVE_I18N + GTEST_SKIP() << "I18N is disabled, skipping the rest of this test"; +#endif + InstallTranslation("cmdtest", "ru_RU", R"( msgid "" msgstr "" diff --git a/test/integration/znctestconfig.h.cmake.in b/test/integration/znctestconfig.h.cmake.in index 571b99f7..d37f09c2 100644 --- a/test/integration/znctestconfig.h.cmake.in +++ b/test/integration/znctestconfig.h.cmake.in @@ -19,5 +19,6 @@ #cmakedefine WANT_PYTHON 1 #cmakedefine WANT_PERL 1 +#cmakedefine HAVE_I18N 1 #endif /* ZNCTESTCONFIG_H */