Skip to content

Instantly share code, notes, and snippets.

@musqz
Created September 17, 2026 08:42
Show Gist options
  • Select an option

  • Save musqz/f175f0cb18999185fb1942dc4187694b to your computer and use it in GitHub Desktop.

Select an option

Save musqz/f175f0cb18999185fb1942dc4187694b to your computer and use it in GitHub Desktop.
conky-mabox-patch
diff --git i/tests/CMakeLists.txt w/tests/CMakeLists.txt
index 05fc413e..e9f006b3 100644
--- i/tests/CMakeLists.txt
+++ w/tests/CMakeLists.txt
@@ -14,14 +14,14 @@ if(NOT OS_DARWIN)
list(FILTER test_srcs EXCLUDE REGEX ".*darwin.*\.cc?")
endif()
-add_library(Catch2 STATIC catch2/catch_amalgamated.cpp)
+find_package(Catch2 3 REQUIRED)
add_executable(test-conky test-common.cc ${test_srcs})
target_include_directories(test-conky PRIVATE
${CMAKE_SOURCE_DIR}/src
${CMAKE_BINARY_DIR})
target_link_libraries(test-conky
- PRIVATE Catch2
+ PRIVATE Catch2::Catch2WithMain
PUBLIC conky_core
)
catch_discover_tests(test-conky)
diff --git i/tests/test-algebra.cc w/tests/test-algebra.cc
index 6f7c787b..970cabf4 100644
--- i/tests/test-algebra.cc
+++ w/tests/test-algebra.cc
@@ -1,4 +1,4 @@
-#include "catch2/catch.hpp"
+#include "catch2/catch_all.hpp"
#include <content/algebra.h>
#include <config.h>
diff --git i/tests/test-colours.cc w/tests/test-colours.cc
index ecd31913..fd8ffcf0 100644
--- i/tests/test-colours.cc
+++ w/tests/test-colours.cc
@@ -1,4 +1,4 @@
-#include "catch2/catch.hpp"
+#include "catch2/catch_all.hpp"
#include <content/colours.hh>
#include <config.h>
diff --git i/tests/test-common.cc w/tests/test-common.cc
index 7e50ad99..64fd86d4 100644
--- i/tests/test-common.cc
+++ w/tests/test-common.cc
@@ -29,7 +29,7 @@
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do
// this in one cpp file
-#include "catch2/catch.hpp"
+#include "catch2/catch_all.hpp"
#include <common.h>
#include <conky.h>
diff --git i/tests/test-conky.cc w/tests/test-conky.cc
index 685a5612..be8c191a 100644
--- i/tests/test-conky.cc
+++ w/tests/test-conky.cc
@@ -26,7 +26,7 @@
*
*/
-#include "catch2/catch.hpp"
+#include "catch2/catch_all.hpp"
#include <conky.h>
#include <lua/lua-config.hh>
diff --git i/tests/test-core.cc w/tests/test-core.cc
index 769be768..573adaa7 100644
--- i/tests/test-core.cc
+++ w/tests/test-core.cc
@@ -26,7 +26,7 @@
*
*/
-#include "catch2/catch.hpp"
+#include "catch2/catch_all.hpp"
#include <core.h>
diff --git i/tests/test-darwin.cc w/tests/test-darwin.cc
index 96cdc62e..346800a5 100644
--- i/tests/test-darwin.cc
+++ w/tests/test-darwin.cc
@@ -26,7 +26,7 @@
*
*/
-#include "catch2/catch.hpp"
+#include "catch2/catch_all.hpp"
#include <data/os/darwin.h>
diff --git i/tests/test-diskio.cc w/tests/test-diskio.cc
index d094e6cf..8b11adfa 100644
--- i/tests/test-diskio.cc
+++ w/tests/test-diskio.cc
@@ -26,7 +26,7 @@
*
*/
-#include "catch2/catch.hpp"
+#include "catch2/catch_all.hpp"
#include <config.h>
#include <conky.h>
diff --git i/tests/test-fs.cc w/tests/test-fs.cc
index 977d8fbc..a4b1235e 100644
--- i/tests/test-fs.cc
+++ w/tests/test-fs.cc
@@ -26,7 +26,7 @@
*
*/
-#include "catch2/catch.hpp"
+#include "catch2/catch_all.hpp"
#include <data/fs.h>
diff --git i/tests/test-gradient.cc w/tests/test-gradient.cc
index 40812d38..c143cbb0 100644
--- i/tests/test-gradient.cc
+++ w/tests/test-gradient.cc
@@ -26,7 +26,7 @@
*
*/
-#include "catch2/catch.hpp"
+#include "catch2/catch_all.hpp"
#include <conky.h>
#include <content/colours.hh>
diff --git i/tests/test-graph.cc w/tests/test-graph.cc
index 84b34437..c10d24a9 100644
--- i/tests/test-graph.cc
+++ w/tests/test-graph.cc
@@ -27,7 +27,7 @@
*/
#include <tuple>
-#include "catch2/catch.hpp"
+#include "catch2/catch_all.hpp"
#include <conky.h>
#include <content/specials.h>
diff --git i/tests/test-linux.cc w/tests/test-linux.cc
index a3b0b787..3244be70 100644
--- i/tests/test-linux.cc
+++ w/tests/test-linux.cc
@@ -26,7 +26,7 @@
*
*/
-#include "catch2/catch.hpp"
+#include "catch2/catch_all.hpp"
#include <data/os/linux.h>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment